Hello,
The Problem:
In our Domain we use Matrix/Empirum to Deploy Software/Images/Patches etc.
In the last 5 Month´something went wrong with the Inventory Function of the Program.
To Force an Update of this Inventory on all clients I have to do some tasks on them.
e.g.: Set a new Regfile ( is done )
Start a Service ( is done too)
The Last Step in my Script is to Start a little but complex *.cmd File.
"C:\WINDOWS\system32\Empirum\EmpInventory.exe" /C:\\IPADDRESS\Configurator$\User\EmpInvScan_Win_PX.xml" /O:\\IPADDRESS\EmpInv$\%UserDomain%.%ComputerName%.xml" /E /DMI /WMI /AUT /V2 /M /T /ZIP /DIFF
If I Start this little cmd File on the client everything works fine.
In case your´ll ask. Yes, I work with Domain Admin Rights,
Powershell Remoting is on, Firewall is ok, everything else in my PS Scripts works very well.
I tried with the Invoke Function:
$xcmd = 'the command from the top...'
Invoke-Command -ComputerName $_ -ScriptBlock{$xcmd} -Credential $credentials
with different Scenarios like "CMD.EXE /C " + $xcmd
with [Scriptblock}::create("command..")
I tried with WmiObject etc..etc..everything I believe I can find in a long google search and try.
What I can see is, that something IS happening on my client (Taskmanager),
but the report I d like to see is not beeing generated.
The Code above is definitly correct, it works perfekt on the client itselt but not remote.
Anyone here who could give me advice?