Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Powershell Invoke-WMIMethod on remote machine works for one user but not another

$
0
0

Hi,

I have a powershell script that I can run on one machine in domain A that does an svn update on another machine in the same domain A.   We are using Powershell 4 on windows 2012R2 servers.


[string]$Cmd = "C:\Program Files (x86)\Subversion\bin\svn.exe update e:\inetpub\wwwroot\content"
Invoke-WmiMethod –class Win32_process -name Create -ArgumentList ($Cmd) -ComputerName $HostName

running the Invoke-WmiMethod above works for one user but not the other user.

Both users are local admin on both local and the remote machine.

Both users have write access to the destination folder.  The svn.exe exists on both machines the same as does the content folder.

The user that works is also a domain admin which shouldnt make a difference.

Any thoughts on why one user would work and the other not?  I dont get any errors and the output is the same for both except processID

PS E:\bamboo-agent-home\xml-data\build-dir\ND-QNCDN-JOB1\build> Invoke-WmiMethod –class Win32_process -name Create  -ArgumentList ($Cmd) -ComputerName RemoteMachineName


__GENUS          : 2
__CLASS          : __PARAMETERS
__SUPERCLASS     :
__DYNASTY        : __PARAMETERS
__RELPATH        :
__PROPERTY_COUNT : 2
__DERIVATION     : {}
__SERVER         :
__NAMESPACE      :
__PATH           :
ProcessId        : 7708
ReturnValue      : 0
PSComputerName   :

Any ideas?  Thanks in advance.


Thanks Lance



Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>