.net - Powershell : same input command, but different outputs depending on remote / local execution -
i have check if driver installed on virtual machine.
need output drivers list using powershell (msinfo32.exe -> software components, system drivers).
(impersonated) user account want check "test".
when run command locally "test" using remote desktop, works fine, drivers :
ps c:\users\test> get-wmiobject win32_systemdriver
so can check if concerned driver running :
ps c:\users\test> get-wmiobject win32_systemdriver | where-object{$_.name -eq "vsepflt"} displayname : vfilefilter name : vsepflt state : running status : ok started : true
now need computer, doesn't output full list (just 3 instead) :
ps c:\users\lh> get-wmiobject win32_systemdriver -computername $ip -credential $credtest displayname : common log (clfs) name : clfs state : running status : ok started : true displayname : netbt name : netbt state : running status : ok started : true displayname : remote access auto connection driver name : rasacd state : stopped status : ok started : false
so of course can't check concerned driver, because not in list, , should be.
note: works if use admin account credential on same vm, full list. can driver :
ps c:\users\lh> get-wmiobject win32_systemdriver -computername $ip -credential $credadmin | where-object{$_.name -eq "vsepflt"} displayname : vfilefilter name : vsepflt state : running status : ok started : true
that's need output "test" account
why don't full list on user account remotly, if run command locally ? , how fix ?
thanks
edit : same results using invoke-command , enter-pssession.
edit 2 : if makes difference, machine runs ps 4.0, , vm (with both admin , "test" users) runs 3.0.
Comments
Post a Comment