RPC Server unavailable error when script is started via batch file
at beginning words setup:
in domain environement there powershell script on server clear eventlogs @ clients. script called in batch file:# powershell.exe "d:\scripts\script.ps1 -ad -clear" # argument -ad tells ps script process computers in activedirectory, -clear argument tells script clear eventlogs. powershell scripts cycles through computers in ad, tries ping them , if computer alive determines os version , tries clear eventlog.
at 1 single computer in whole domain script errors @ following line:
$osversion = gwmi win32_operatingsystem -comp $computer
with error rpc server unavailable hresult: 0x800706ba
when launch cmdlet in powershell commandline works without error. error shows single computer , when powershell script startet batch.
regards, thomas
hi,
please enable following firewall rules on destined machine check whether code becomes work.
remote administration (rpc)
remote administration (rpc-epmap)
thanks.
Windows Server > Windows PowerShell
Comments
Post a Comment