powershell script to export applications and its requirement in weird way
$SiteCode = 'DEV'
$sccmserver = 'covid-100'
$Applications = Get-WmiObject -Namespace "root\SMS\Site_$SiteCode" -Class SMS_Application -ComputerName $SCCMServer
foreach ($apps in $Applications){
$DTS = Get-CMDeploymentType -ApplicationName $apps.LocalizedDisplayName
foreach ($DT in $DTS){
$req = Get-CMDeploymentTypeRequirement -InputObject $DT
"$($apps.LocalizedDisplayName) ; $($req.name)" | Out-File -FilePath "C:\Users\username\Desktop\dtsssss.csv" -Append
}
}
Comments
Post a Comment