none
Powershell List all Task sequence under a folder RRS feed

  • Question

  • Hi,

    I would like to list alll task sequence under a specific folder. Not sure if a cmdlet or get-WMI is need.

    Any help would be appreciate.

    Thanks

    Friday, September 20, 2019 5:42 PM

Answers

  • Hello,
     
    Thanks for posting in TechNet.
     
    Kindly try the following PoSH scripts.
     
    $SiteCode = "sitecode"
    $FolderName = "name"
    Get-WmiObject -Namespace ROOT\SMS\site_$SiteCode -Class SMS_TaskSequencePackage -Filter "ObjectPath = '/$FolderName'" | select Name
    
     
    Hope my answer could help you and look forward to your feedback.
     
    Best Regards,
    Ray

    Please remembers to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    • Marked as answer by FRacine Wednesday, September 25, 2019 7:29 PM
    Monday, September 23, 2019 3:17 AM

All replies

  • Hi,

    i don't feel to have cmdlet for this specific requirement.

    Best Regards,

    Kannan.CS


    Kannan.CS | kannancs@hotmail.com

    Friday, September 20, 2019 7:39 PM
  • Hi,

    I got a look with wbemtest and found sms_Tasksequence. But this class is empty. Which class may contain that information?

    Or may be an sql query to be run with PowerShell?!


    • Edited by FRacine Saturday, September 21, 2019 3:39 PM
    Saturday, September 21, 2019 10:53 AM
  • Hello,
     
    Thanks for posting in TechNet.
     
    Kindly try the following PoSH scripts.
     
    $SiteCode = "sitecode"
    $FolderName = "name"
    Get-WmiObject -Namespace ROOT\SMS\site_$SiteCode -Class SMS_TaskSequencePackage -Filter "ObjectPath = '/$FolderName'" | select Name
    
     
    Hope my answer could help you and look forward to your feedback.
     
    Best Regards,
    Ray

    Please remembers to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    • Marked as answer by FRacine Wednesday, September 25, 2019 7:29 PM
    Monday, September 23, 2019 3:17 AM
  • Hi,

    Yes! Working perfectly.

    Wednesday, September 25, 2019 7:29 PM