Trying to atomize the Installation of Software's using SCCM from Service-Now. written Powershell Scripts which run in the Firewall and connects to the SCCM Server. But we are getting the following error.
gwmi : The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)At C:\Users\zSvcServiceNowDev\AppData\Local\Temp\script.7552768326357979154.PS1:11 char:15+ $dev = gwmi -cn mtlwicmcs011 -ns root/sms/site_cas -query "select *from ...+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ CategoryInfo : InvalidOperation: (:) [Get-WmiObject], COMException+ FullyQualifiedErrorId : GetWMICOMException,Microsoft.PowerShell.Commands.GetWmiObjectCommand0x00010001; Device not foundStack Trace:
On searching various sites, I understand that it might be one of the following issue:
1. RPC Service is not running
2. Firewall protecting the SCCM Server
3. The server from where we are running the PowerShell and the SCCM server might be on different AD.
I would require your assistance in understanding why such errors occur and if there are any other reasons for this error/exception. Any expert advice on PowerShell scripting is also appreciated.