List applications in a task sequence

List applications in a task sequence


Ever needed to list all applications in a Tasksequence via powershell?

Function TaskSequenceReferences()
  {
  $AllTS = Get-CMTaskSequence | select Name, sequence
  Foreach($TSName in $AllTS.name)
  {

  $TS = Get-CMTaskSequence -Name “$TSName” | select Sequence
  $TSxml = ConvertTo-Xml $TS#.Sequence
  [xml]$XML = $TSxml.OuterXml.Replace(‘&gt;’,’>’).Replace(‘&lt;’,'<‘)
  #Application info
  $AppList = ($XML.SelectNodes(“//defaultVarList/variable”) | Where-Object {$_.property -like    “AppInfo*DisplayName”}).’#text’

     Foreach($Appl in $AppList)
    {
    Write-Host $Tsname”,”$Appl
    }
}
}

Comments

Popular posts from this blog

SCCM CB Monitoring | Deployment Reporting using SQL

Download an appx application locally to be used in SCCM CB

Pxeboot over slow line - speed it up