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.
4. Right-click Start-PoshCAT.ps1 and choose Run with PowerShell
5. If you don’t have administrative permissions, this message will be shown.
Enjoy!
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.
Thanks, Good point!
Best,
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!
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,
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?
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,
“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.
[email protected]
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 …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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 …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
hi,
Do you have multiple SMS Providers? If yes, then it is a known bug.
Best,
Kaido
how to make a return on an advert?
Is there a valid source for the download? The link appears to point back to the main url for the article.
Hi,
Download works for me and many others.
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/
Yes, it redirects to http://blog.coretech.dk/kaj/sccm-client-actions-tool-powershell-edition-aka-poshcat/ and you need to scroll download until you see: You can download the tool and documentation from here
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.
Hi,
Yep it will be fixed in next release.
Best,
Kaido
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?
The download link doesn’t appear to be working
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
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
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.
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.
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
Hi. it Works for me. Thanks saved me a lot of work.