SCCM Client Actions Tool PowerShell Edition aka PoshCAT

Updated 28.08.2013

Description
SCCM Client Actions Tool PowerShell Edition aka PoshCAT is a practical and simple PowerShell application for performing most common day-to-day administrative tasks on System Center 2012 Configuration Manager Clients. The tool allows running actions remotely on one or more computers simultaneously. A list of computers can be provided either from a file (CSV, TXT) or loaded from Configuration Manager Collection importer or through Add Computer prompt.

You can find the old version from here SCCMCAT https://sccmcat.codeplex.com/ by Christjan Schumann.

Please read the documentation first and blog posts!

Please read this post how to install PoshCAT – How to Install PoshCAT

Building PoshCAT Part 1 – Create different Client Actions listshttp://blog.coretech.dk/kaj/building-poshcat-part-1-create-different-client-actions-lists/

Building PoshCAT Part 2 – Adding your own custom functions http://blog.coretech.dk/kaj/building-poshcat-part-2-adding-your-own-custom-functions/

Building PoshCAT Part 3 – Enabling PowerShell Remoting through Group Policy for PoshCAT http://blog.coretech.dk/kaj/building-poshcat-part-3-enabling-powershell-remoting-through-group-policy-for-poshcat/

Features

· Multithreaded – 10 jobs at one time

· CSV reporting

· Configuration Manager 2012 Collection browser

· Configuration file for Client Actions

· Possibility to add own functions

· Support for two different job types

· Ability to create different Client Actions sets for different Support groups

· Alternate Credentials Support

· Active Directory Connector

image

Currently the tasks that can be performed are classified by 7 categories:

Tool Actions

Client schedule actions

· Hardware Inventory Cycle

· Software Inventory Cycle

· Discovery Data Collection Cycle (Send DDR)

· Machine Policy Retrieval & Evaluation Cycle

· Software Updates Deployment Evaluation Cycle

· Software Updates Scan Cycle

· File Collection Cycle

· Windows Installer Source List Update Cycle

· Software Metering Usage Report Cycle

· Desired Configuration Manager Cycle

· Application Machine Policy Cycle

· Application Global Evaluation Cycle

Client agent actions

· Get ConfigMgr Client Management Point

· Restart SMS Agent Host service

· Get SMS Agent Host Service State

· Reassign ConfigMgr Client Site Code

· Create a new SMSCFG.ini file

· Reset ConfigMgr Client policies

· Repair ConfigMgr Client

· Uninstall ConfigMgr Client

· Install ConfigMgr Client

· Get ConfigMgr Client Inventory Dates

· Get ConfigMgr Client Cache Information

· Remove ConfigMgr Client Cache Items

· Set ConfigMgr Client Cache Size

Client health actions

· Reset WMI Repository

· Salvage WMI Repository

· Get WMI Repository State

· Get Admin$ Share Status

Software Updates and Endpoint Protection Actions

· Get ConfigMgr Client WSUS Content Location

· Get Windows Update Agent Version

· Get Missing Updates

· Install Missing Updates

· Query Updates Status

· Start Endpoint Protection Full Scan

· Get Endpoint Protection Applied Policies

· Get Endpoint Protection Last Scan Date

Application Virtualization

· Get APP-V Client Packages

· Get APP-V Client Configuration

· Get APP-V Client Version

· Enable APP-V Client Package Scripts

Deployment / Advertisement Actions

· Get ConfigMgr Client Available Applications

Other actions

· Restart Computer

· Shut down Computer

· Ping Computer

· Get Reboot Pending State

· Log off current user

· Get logged-on user

· Get system uptime

· Get Applied Group Policies

· Refresh Group Policies

· Get Free Disk Space

PoshCAT requirements

· Windows Management Framework 3.0

· Microsoft .Net Framework 4.0 or newer

· Windows 7, Windows 8 or Windows Server 2012

· Administrative Permissions

· PowerShell Remoting

Coretech License terms for using the product

CORETECH A/S SOFTWARE LICENSE TERMS

These license terms are an agreement between Coretech A/S and you. Please read them. They apply to the software you are downloading from Coretech.dk, which includes the media on which you received it, if any. The terms also apply to any Coretech A/S updates for this software, unless other terms accompany those items. If so, those terms apply.

BY USING THE SOFTWARE, YOU ACCEPT THESE TERMS. IF YOU DO NOT ACCEPT THEM, DO NOT USE THE SOFTWARE.

If you comply with these license terms, you have the rights below.

1. INSTALLATION AND USE RIGHTS. You may install and use any number of copies of the software on your devices.

2. Scope of License. The software is licensed, not sold. This agreement only gives you some rights to use the software. Coretech reserves all other rights. Unless applicable law gives you more rights despite this limitation, you may use the software only as expressly permitted in this agreement. In doing so, you must comply with any technical limitations in the software that only allow you to use it in certain ways. You may not

· Work around any technical limitations in the binary versions of the software;

· reverse engineer, decompile or disassemble the binary versions of the software, except and only to the extent that applicable law expressly permits, despite this limitation;

· make more copies of the software than specified in this agreement or allowed by applicable law, despite this limitation;

· publish the software for others to copy;

· rent, lease or lend the software;

· transfer the software or this agreement to any third party; or

3. DOCUMENTATION. Any person that has valid access to your computer or internal network may copy and use the documentation for your internal, reference purposes.

4. SUPPORT SERVICES. Because this software is “as is,” we may not provide support services for it.

5. Entire Agreement. This agreement, and the terms for supplements and updates that you use, are the entire agreement for the software and support services.

6. Applicable Law.

a. United States. If you acquired the software in the United States, Washington state law governs the interpretation of this agreement and applies to claims for breach of it, regardless of conflict of laws principles. The laws of the state where you live govern all other claims, including claims under state consumer protection laws, unfair competition laws, and in tort.

b. Outside the United States. If you acquired the software in any other country, the laws of that country apply.

7. Legal Effect. This agreement describes certain legal rights. You may have other rights under the laws of your country. You may also have rights with respect to the party from whom you acquired the software. This agreement does not change your rights under the laws of your country if the laws of your country do not permit it to do so.

8. Disclaimer of Warranty. The software is licensed “as-is.” You bear the risk of using it. CORETECH A/S gives no express warranties, guarantees or

You can download the tool and documentation from here

zip PoshCAT_v0.2.zip 151.25 kB
Downloaded 16000 times


docx PoshCAT Documentation 306.83 kB
Downloaded 8292 times


Comments (59):

  1. […] can download the tool and documentation from here Share Related PostsCoretech WMI and PowerShell Explorer Categories: Uncategorized Tags: configmgr […]

  2. Awesome work Kaido!!
    How did you create your GUI ? Which tool did you use ?

    I’m using PowerShell Studio to create WinForm, It’s pretty cool!

    • Kaido Järvemets Kaido Järvemets says:

      Hi,

      Thanks! All my UI´s are done with Visual Studio (WPF Application)

      Best,
      Kaido Järvemets

  3. Wacado says:

    LMAO! Too funny, I gotta tell… Was testing this *wonderful* tool on the sccm server, and using my own desktop as a test machine to run a few actions on after getting a WinRM GPO setup (http://www.briantist.com/how-to/powershell-remoting-group-policy/), and then suddenly, when I got down to OTHER ACTIONS -> ‘Log of Current User’, my computer just suddenly logs off…abruptly closing everything I hod open…and I was like huh, what the heck?! LOL Then it his me…small typo, it’s not ‘Log OF current user’ it’s Log OFF current user. I know, I know, it’s obvious now, but when just popping down the list, my mind read it as is, thinking grabbing logs…oh well. Anyway, had to share…and fix the typo…LOL!

    You guys do great things for us…keep it up, it is always very much appreciated! =) Cheers!

  4. Ricardo Soares says:

    Hi,
    first of all congratulations for this marvellous work.
    The look and the layout seems more stable and professional.

    In my opinion, just one little thing is missing. Just the option to add a computer name manually in spit of a txt file.

    Thanks
    Regards

  5. Wacado says:

    @Ricardo – It’s not missing, just maybe needs a button to be more obvious. Just right-click in the large field under the Load… button and you’ll get two options, Add Computers and Remove this Computer. =) ..it’s in the documentation too.

  6. amnon says:

    Download link for the zip file not working

    • Kaido Järvemets Kaido Järvemets says:

      Hi,

      This link is working for me and many others. Can you please check your browser settings or please try it from another computer.

  7. Steve says:

    Love the tool, it’s going to be very handy. I’m curious though as to why there doesn’t seem to be a task to initiate an application deployment evaluation cycle on the client?

    • Kaido Järvemets Kaido Järvemets says:

      Hi,

      Thats a good question why I didnt add that :) but you can add it very easily through XML.

      Best,

  8. […] Edition aka PoshCAT August 27, 2013 robertrieglerwien Leave a comment Go to comments SCCM Client Actions Tool PowerShell Edition aka PoshCAT Share this:PrintEmailLike this:Like Loading… Categories: MS: Deployment […]

  9. […] can donwload PoshCAT 0.2 version from here Share Related PostsNo related posts found Categories: […]

  10. Martin Andersen says:

    How do you import the All Systems Device collection?

    • Kaido Järvemets Kaido Järvemets says:

      Hi,

      You need to click on ROOT and it should list all the collections under Device Collection node.

      Best,

  11. […] Coretech Blog » Blog Archive » SCCM Client Actions Tool PowerShell Edition aka PoshCAT. […]

  12. joe says:

    C:\WINDOWS\system32>powershell.exe -executionpolicy remotesigned C:\TEMP\POSH\st
    art-poshcat.ps1
    C:\TEMP\POSH\start-poshcat.ps1 : File C:\TEMP\POSH\start-poshcat.ps1 cannot be
    loaded. The file C:\TEMP\POSH\start-poshcat.ps1 is not digitally signed. The
    script will not execute on the system. For more information, see
    about_Execution_Policies at http://go.microsoft.com/fwlink/?LinkID=135170.
    At line:1 char:1
    + C:\TEMP\POSH\start-poshcat.ps1
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : SecurityError: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess

    I keep getting this message, not sure how to get past it, any ideas?

  13. Kaido Järvemets Kaido Järvemets says:

    Hi,

    You need to unblock the files. Right-click on the file choose properties and there is a button unblock. Unblock all the files.

    Best

  14. […] First : you can download the tool here. […]

  15. Kevin Wornell says:

    I downloaded the tool and attemtped to run it. Got a message to Download the Windows Management Framework which I have already installed on this machine. Not sure where to go from here

  16. Kevin Wornell says:

    As soon as I posted I realized that the prompt for from the tool says Version 3 of the Framework and the requirement son this page say Version 4. I will download version 4 and see if that corrects the issue.

  17. Brice P. says:

    I can’t download from the link provided on site. It redirects to http://blog.coretech.dk/kaj/sccm-client-actions-tool-powershell-edition-aka-poshcat/

    Can I get it from another share? Would love to try out your product. Thanks

    • Dooley Do says:

      Download link is still broken…

      • Kaido Järvemets Kaido Järvemets says:

        Hi,

        Nope, it works for me and many others.

        Best,
        Kaido

        • Dooley Do says:

          Hmm, still doesn’t work for me in IE, Firefox or Chrome. Hovering over the link shows a link address of

          1. Download and Unzip




          and it does just redirect to this page.

        • Dooley Do says:

          Hi, the link on this page is not broken but the link at the top of the How to install PoshCAT page is.

          • Babak says:

            Yes the link at the how to install is indeed broken and i took me a while to find the link down this page. Thanks

  18. Brice P. says:

    nvm I got it thank you for the hard work

  19. Jose says:

    Is there a reason why the Client Health actions were limited down to just WMI? CAT would check services,assigned site, registry, inventory age, client version, admin share. I found these pretty pretty useful considering the version difference would tell you if hotfixes were missing and such.

  20. Paul says:

    On a machine that comes back as Inconsistent for WMI state when you run Salvage it comes back with an error code:0x8007041B, you get that when you dont shutdown WMI and its dependencies, why wouldnt the salvage function stop these services prior to running this command?

  21. Jerry G says:

    Will this tool work with SCCM 2007? We haven’t upgraded to 2012 yet. Planned for this year.

    • Kaido Järvemets Kaido Järvemets says:

      Hi,

      I think yes.

      Best,
      Kaido

      • Ryan Brown says:

        As near as I can tell (http://msdn.microsoft.com/en-us/library/cc144997.aspx) SCCM 2007 doesn’t support ObjectType=5000 (at least it’s not in the MSDN reference). When I tried it as is, I kept getting a generic WMI error at line 662 in Start-PoSHCAT.ps1, which I then traced back to query being stored in $QuerySplat. I ended up changing line 649 and 653 to:

        $QuerySplat[‘Query’] = “select * from SMS_Collection where CollectionID like ‘$($SiteCodeQuery.SiteCode)%'”

  22. […] SCCM Client Actions Tool (PoshCAT New) […]

  23. SCCM Noob says:

    Hi, When I try to load a collection I get the below error. Any idea how I can resolve this?

    ScriptLineNumber: 370
    Message: At C:\Users\123\PoshCAT_v0.2\Start-PoshCAT.ps1:370 char:9
    + Get-WmiObject -Namespace Root\SMS -Class SMS_ProviderLocation -ComputerN …
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Exception: The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
    ErrorID: GetWMICOMException,Microsoft.PowerShell.Commands.GetWmiObjectCommand
    ScriptLineNumber: 618
    Message: At C:\Users\123\PoshCAT_v0.2\Start-PoshCAT.ps1:618 char:28
    + $RootFolders = Get-WmiObject -Namespace “Root\SMS\Site_$($SiteCodeQu …
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  24. PowerShellNoob_SF says:

    Hey – heck of a tool!
    Question –
    Trying to add the CCMEval function to it. When I try to execute it, it gets hung on on WMI Repository Read/Write Test. Any suggestions? Copied the Log from CCMeval.log and the PS function.

    ccmeval version: 5.0.7958.1000 CcmEval 8/29/2014 11:25:06 AM 6876 (0x1ADC)
    Loading manifest file: C:\Windows\ccm\CcmEval.xml CcmEval 8/29/2014 11:25:06 AM 6876 (0x1ADC)
    Successfully loaded ccmeval manifest file. CcmEval 8/29/2014 11:25:06 AM 6876 (0x1ADC)
    Begin evaluating client health rules. CcmEval 8/29/2014 11:25:06 AM 6876 (0x1ADC)
    Successfully retrieved all client health checks. CcmEval 8/29/2014 11:25:06 AM 6876 (0x1ADC)
    Evaluating health check rule {4AB7D77D-3BB0-4EAB-BEFD-7C0F7DA10296} : Verify WMI service exists. CcmEval 8/29/2014 11:25:06 AM 6876 (0x1ADC)
    Evaluating health check rule {518C0699-03F8-4F38-85C4-4D319EAEFC05} : Verify/Remediate WMI service startup type. CcmEval 8/29/2014 11:25:06 AM 6876 (0x1ADC)
    Evaluating health check rule {7F4B6E15-2221-455B-9615-93C379E470D5} : Verify/Remediate WMI service status. CcmEval 8/29/2014 11:25:06 AM 6876 (0x1ADC)
    Evaluating health check rule {14E6774A-1795-4E09-B17D-B6F36A124205} : WMI Repository Read/Write Test. CcmEval 8/29/2014 11:25:06 AM 6876 (0x1ADC)

    Function Execute-CCMEval
    {
    $DObject = New-Object PSObject
    $DObject | Add-Member -MemberType NoteProperty -Name “ComputerName” -Value $env:ComputerName

    Try{
    #Start the ccmeval.exe
    $Command = Invoke-Expression “$($env:windir)\ccm\ccmeval.exe” -ErrorAction STOP
    $DObject | Add-Member -MemberType NoteProperty -Name “CCMEvaluation” -Value $Command
    }
    Catch{
    $DObject | Add-Member -MemberType NoteProperty -Name “CCMEvaluation” -Value $_.Exception.Message
    }

    $DObject

  25. Pankaj says:

    Hi,

    I want to refresh the client policy useing powershell for SCCM 2012 but it seems none of the commands I got from google are working. I am unable to find the correct WMI class which can do the job for me as I am new to SCCM. I request you to let me know the class and method I need to use. Below is an example I got from google which work for SCCM 2007 but not for 2012

    $ms = new-object system.management.managementscope
    $ms.path = “\\$computer\root\CCM”
    $mc = New-Object System.Management.ManagementClass($ms , `sms_client’,$null)
    $mc.invokeMethod(`TriggerSchedule’,'{00000000-0000-0000-0000-000000000001}’)

  26. Young Pae says:

    Hi Kaido,

    Thanks for your great work here!

    I have a quick question how to
    1) add my .PS1 file (not just a function)
    2) add a command to PoshCAT to trigger the external powershell script
    3) feed currently selected computer name(s) as a parameter to use it as $ComputerName or $ComputerNames

    Basically, I created a powershell script called CMAdd2Coll.ps1 (Based on Peter van der Woude’s ImportComputerForm_v091p.ps1 Script) to allow support staff to add a machine to a collection from the (limited) list of collections without using AdminConsole and I would like to integrate it with PoshCAT.

    http://sysdevpro.com/blog/microsoft/sccm-2012-r2-cmadd2coll-ps1-adding-machine-to-a-collection/

    Thanks!

    Young-

  27. Ghion says:

    Loved the power on poshCAT , Loved the flexibility of previous Sccm CAT mainly the ability to copy and paste the target machines , from a list file or typing it in directly. also can’t delete on the spot, can this be improved?
    Thanks

  28. Tom says:

    The previous version, SCCM CAT, had the ability to copy a file to computers. Will you be adding this back?

  29. Everett says:

    this script is awesome. I’ve noticed that when using the software updates (SU scan or SU dep and Eval) features of the script, there is a long pause at the end and it still says please wait. the script has already run through all of the computers in list and everything is logged successfully. I’ve never seen it finish before I closed and went on to do something else. What is the pause at the end for?

  30. Alex says:

    i have a problem to load computers from collection:

    Exception: The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
    ErrorID: GetWMICOMException,Microsoft.PowerShell.Commands.GetWmiObjectCommand
    ScriptLineNumber: 370
    Message: At D:\_Tools\PoshCAT\PoshCAT_0.2\Start-PoshCAT.ps1:370 char:9
    + Get-WmiObject -Namespace Root\SMS -Class SMS_ProviderLocation -ComputerN …
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Exception: The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
    ErrorID: GetWMICOMException,Microsoft.PowerShell.Commands.GetWmiObjectCommand
    ScriptLineNumber: 618
    Message: At D:\_Tools\PoshCAT\PoshCAT_0.2\Start-PoshCAT.ps1:618 char:28
    + $RootFolders = Get-WmiObject -Namespace “Root\SMS\Site_$($SiteCodeQu …
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Is there a solution?

    Many thanks in advance!

    • jaegermaster says:

      I have same issue, it worked a few months back.

      I suspect windows update or upgrade to sccm 2012 R2 sp1 changed something

      • jaegermaster says:

        LOL

        actually, it was because I reinstalled POSH CAT and you need to edit the commands.xml :

        YOURSCCMSERVER

  31. Pp says:

    This tool is fantastic for starting a patching cycle across a group of machines. One thing it appears to be missing is a way to check if a patching cycle has finished. Is this possible with the current version of the tool?

  32. Rob says:

    I tip my hat to you Kaido!!!

    If I may offer one badly need feature on my end. Scan SCCM for devices that are in a Disabled OU and/or that have a Machine account “disabled” in AD, then a button to delete these devices from SCCM.

    We push updates to these “ghost devices” and they are listed as failed to updated because they are flagged as inactive due to being deleted from AD but left to live in SCCM to haunt my monthly update reports.
    Maybe add the ability to view; when & what account deleted the AD Object going back 2+ years and to copy from your console would be great 😉

    thanks,
    Rob

  33. Ali says:

    Hi,

    thanks for this great tool! :)

    After changing the script for our SCCM 2007 environment, like Ryan Brown said: 9th Jun 2014 at 18:40, it worked for me.

    What I’ve changed is:

    $QuerySplat[‘Query’] = “select * from SMS_Collection where CollectionID like ‘$($SiteCodeQuery.SiteCode)%’” to
    $QuerySplat[‘Query’] = “select * from SMS_Collection where CollectionID like ‘$($SiteCodeQuery.SiteCode)%'”

    Pay attention to the quotation marks. :)

    Cheers
    Ali

  34. […] Client Actions Tool / PoshCAT (Original  /  New) As described on site: SCCM Client Actions Tool PowerShell Edition aka PoshCAT is a practical and […]

  35. vijay says:

    Hi
    I want a option where client machines having DNS issue (unable run nslookup command).
    any suggest !

  36. Tim says:

    Hi,

    I love this tool but have a question on using it.
    I’m trying to get it to ‘Install Missing Updates’ The command executes fine but the updates don’t install.
    All tests for remote commands with powershell work

    Selected command: Install Missing Updates
    Reporting disabled in configuration file
    Starting to run Install Missing Updates
    Job Type: Remote
    Adding TESTSERVER PSH JOB
    Install Missing Updates Completed on TESTSERVER
    Removing JOB ID: 28 from the array
    ——————————————————————————-
    TOTAL FAILED JOBS: 0
    TOTAL SUCCESS JOBS: 1
    TOTAL TIME: 0.0768743533333333 minutes

  37. Frank says:

    Hi !

    Is there a way to change the Maintenance Windows Schedule ?

  38. Leonard Hopkins says:

    What on earth could I be doing wrong???

    Selected command: Get Admin$ Share Status
    Starting to run Get Admin$ Share Status
    Job Type: Remote
    Adding IKOPV01 PSH JOB
    Get Admin$ Share Status failed on IKOPV01 with error Connecting to remote server IKOPV01 failed with the following error message : The client cannot connect to the destination specified in the request. Verify that the service on the destination is running and is accepting requests. Consult the logs and documentation for the WS-Management service running on the destination, most commonly IIS or WinRM. If the destination is the WinRM service, run the following command on the destination to analyze and configure the WinRM service: “winrm quickconfig”. For more information, see the about_Remote_Troubleshooting Help topic.

  39. evasive says:

    Leonard: log in on your IKOPV01 server, open a command prompt, type
    winrm quickconfig

    That should get WinRM running. If you still cannot get it to run, start checking your firewall config on that server and elsewhere in the network.

Leave a Reply