How to install PoshCAT

1. Download and Unzip PoshCAT_v0.2.zip

2. Right-Click Start-PoshCAT.ps1, WorkerFunctions.ps1, SharedFunctions.ps1 and Commands.xml and select properties.

3. Unblock the files if needed and click OK.

clip_image001

4. Right-click Start-PoshCAT.ps1 and choose Run with PowerShell

5. If you don’t have administrative permissions, this message will be shown.
clip_image002

image 

Enjoy!

About the Author:

Kaido Järvemets
Configuration Manager MVP

25 Comments

  1. Steve August 27, 2013 at 16:49 - Reply

    Most people using this tool probably already know this, but it’s worth noting that if your execution policy is set to restricted or allsigned, it needs to be changed before running poshcat. After Unblocking the files as described in the blog post, Poshcat will run under RemoteSigned.

    For users who don’t want to change their execution policy permanently, you can create a shortcut pointing to:
    “powershell.exe -executionpolicy remotesigned **YOURPATH**start-poshcat.ps1” (replace **YOURPATH** with the appropriate path to the poshcat files on your system)

    This shortcut will run Poshcat in a powershell session with an execution policy of RemoteSigned, but won’t affect your execution policy outside of that session.

    • Kaido Järvemets
      Kaido Järvemets August 28, 2013 at 7:52 - Reply

      Thanks, Good point!

      Best,

  2. Josh Gerner August 28, 2013 at 20:43 - Reply

    I’ve used the SCCMCAT tool in the past and it’s been a pretty useful tool. I am interested in using this PS based tool but do not want to run it from either my Primary Site server or either of my SMS providers. As of right now I am getting a WMI error, which kind of looks like the tool cannot enumerate the SMS WMI classes. Is there a way to run this from a machine that is not part of my CM12 infrastructure?
    Thanks!

    • Kaido Järvemets
      Kaido Järvemets August 29, 2013 at 7:48 - Reply

      Hi,

      You don´t need CM12 infrastructure to run this tool. This tool allows to import computers from different places CM, AD, TXT, CSV etc. If you want to import computers from Configuration Manager, then you need to configure your Primary Site Server that it allows remote PowerShell Queries. You can configure it through Group Policy or you can do it manually also through PowerShell Console – Enable-PSRemoting.

      Best,

  3. jason September 10, 2013 at 19:10 - Reply

    I downloaded your tool extracted the files but I can’t get anything to happen once i click yes on the administrator prompt. It doesn’t bring up the window that is supposed to appear. I believe that i have all the requirements, i am running on windows server 2012. I didn’t see the unblock options that are mentioned in the install directions, do you have any suggestions on what may be causing me the trouble?

    • Kaido Järvemets
      Kaido Järvemets September 11, 2013 at 7:30 - Reply

      Hi,
      You need to unblock all the files separately and please check the PowerShell Exectuon Policy also – Get-ExecutionPolicy. Execution Policy should be RemoteSigned.

      Best,

      • Willy Huynh October 3, 2013 at 18:32 - Reply

        “You need to unblock all the files separately and please check the PowerShell Exectuon Policy also – Get-ExecutionPolicy. Execution Policy should be RemoteSigned.”

        Could you please specify how to do these steps in details?
        I right click each file and don’t see “Unblock”
        Where to set Powershell Execution Policy & Get-ExecutionPolicy?

        Thanks and appreciated for your kind help.

        willyhuynh1@yahoo.com

        • Willy Huynh October 3, 2013 at 18:35 - Reply

          Below is the error I have by running tool without Administrator:

          Exception: Initialization failure
          ErrorID: GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectCommand
          ScriptLineNumber: 370
          Message: At C:Userse136705DesktopToolsPoshCAT_0.2Start-PoshCAT.ps1:370 char:9
          + Get-WmiObject -Namespace RootSMS -Class SMS_ProviderLocation -ComputerN …
          + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          Exception: Initialization failure
          ErrorID: GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectCommand
          ScriptLineNumber: 618
          Message: At C:Userse136705DesktopToolsPoshCAT_0.2Start-PoshCAT.ps1:618 char:28
          + $RootFolders = Get-WmiObject -Namespace “RootSMSSite_$($SiteCodeQu …
          + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

      • Willy Huynh October 3, 2013 at 18:53 - Reply

        The below is the error when I run the tool without Admin right even my login has added to this server as “Administrator”:

        Exception: Initialization failure
        ErrorID: GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectCommand
        ScriptLineNumber: 370
        Message: At C:Userse136705DesktopToolsPoshCAT_0.2Start-PoshCAT.ps1:370 char:9
        + Get-WmiObject -Namespace RootSMS -Class SMS_ProviderLocation -ComputerN …
        + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        Exception: Initialization failure
        ErrorID: GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectCommand
        ScriptLineNumber: 618
        Message: At C:Userse136705DesktopToolsPoshCAT_0.2Start-PoshCAT.ps1:618 char:28
        + $RootFolders = Get-WmiObject -Namespace “RootSMSSite_$($SiteCodeQu …
        + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

        • Kaido Järvemets
          Kaido Järvemets October 5, 2013 at 13:13 - Reply

          hi,

          Do you have multiple SMS Providers? If yes, then it is a known bug.

          Best,
          Kaido

  4. Ronny October 29, 2013 at 15:37 - Reply

    how to make a return on an advert?

  5. Joe August 8, 2014 at 16:52 - Reply

    Is there a valid source for the download? The link appears to point back to the main url for the article.

    • Kaido Järvemets
      Kaido Järvemets August 11, 2014 at 8:19 - Reply

      Hi,

      Download works for me and many others.

  6. Eric Delmotte August 12, 2014 at 11:22 - Reply

    Hello , same issue for me …. the download link doesn’t work.
    it redirect me to http://blog.coretech.dk/kaj/sccm-client-actions-tool-powershell-edition-aka-poshcat/

  7. Thomas Storgaard August 22, 2014 at 14:03 - Reply

    Hi you wrote “Do you have multiple SMS Providers? If yes, then it is a known bug.”, will this be fixed in a new release, I think it is the same issue I got.

  8. Kaido Järvemets
    Kaido Järvemets August 26, 2014 at 5:51 - Reply

    Hi,

    Yep it will be fixed in next release.

    Best,
    Kaido

    • Valerie Boss July 28, 2016 at 14:56 - Reply

      We are still getting the error below:

      Exception: The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
      ErrorID: GetWMICOMException,Microsoft.PowerShell.Commands.GetWmiObjectCommand
      ScriptLineNumber: 370
      Message: At C:Usersvalerie.l.bossDesktopPoshCAT_0.2Start-PoshCAT.ps1:370 char:9
      + Get-WmiObject -Namespace RootSMS -Class SMS_ProviderLocation -ComputerN …
      + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

      Has there been an update beyond v0.2 that corrects this?

  9. Jake March 10, 2015 at 15:18 - Reply

    The download link doesn’t appear to be working

  10. Carl June 18, 2015 at 20:05 - Reply

    I keep getting the following error when trying to pull computers from a collection.

    Exception: The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
    ErrorID: GetWMICOMException,Microsoft.PowerShell.Commands.GetWmiObjectCommand
    ScriptLineNumber: 370
    Message: At C:Userscradcl001Downloadscat2Start-PoshCAT.ps1:370 char:9
    + Get-WmiObject -Namespace RootSMS -Class SMS_ProviderLocation -ComputerN …
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Exception: The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
    ErrorID: GetWMICOMException,Microsoft.PowerShell.Commands.GetWmiObjectCommand
    ScriptLineNumber: 618

  11. Carl June 18, 2015 at 20:05 - Reply

    I keep getting the following error when trying to pull computers from a collection.

    Exception: The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
    ErrorID: GetWMICOMException,Microsoft.PowerShell.Commands.GetWmiObjectCommand
    ScriptLineNumber: 370
    Message: At C:UsersuserDownloadscat2Start-PoshCAT.ps1:370 char:9
    + Get-WmiObject -Namespace RootSMS -Class SMS_ProviderLocation -ComputerN …
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Exception: The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
    ErrorID: GetWMICOMException,Microsoft.PowerShell.Commands.GetWmiObjectCommand
    ScriptLineNumber: 618

    • Rob September 21, 2016 at 22:38 - Reply

      I know this is old, but I ran into the same error and had to use the server name instead of the site code to pull collections.

  12. Johnathan July 30, 2015 at 20:35 - Reply

    Will this tool work with SCCM 2007 thats what we currently use in our environment ? I understand 2007 is old but I need something like this that works in SCCM 2007 environments much like SCCM Client Actions Tool except without getting errors when ever I try to run full inventory scans.

  13. Rajesh R December 7, 2015 at 14:13 - Reply

    I’m getting the below error
    Cannot validate argument on parameter ‘ComputerName’. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again.
    Error in line: 154

  14. Torgeir June 28, 2017 at 9:15 - Reply

    Hi. it Works for me. Thanks saved me a lot of work.

Leave A Comment