powershell - wmi accelerator and authentication -
it seems can not find written somewhere when using wmi accelerator in powershell script, can not pass on authentication.
a little background ...
i writing powershell scripts sccm 2012 , found, instance, following quite using :
ps r:\> ([wmi]((gwmi -namespace root\sms\site_aaa -class sms_application -filter "localizeddisplayname '%winzip_tartempion%'") .__path)).sdmpackagexml
when executed locally (on sccm primary server, works fine , swiftly. however, following ends in error when executed desktop computer running w7 :
ps r:\> ([wmi]((gwmi -namespace root\sms\site_aaa -credential $cred -computername cemtech -class sms_application -filter "localizeddisplayname '%winzip_tartempion%'") .__path)).sdmpackagexml
for time being, using pssession out of question. current infrastructure have deal with, using sccm commandlet out of question.
my question here : can confirm can not pass authentication wmi accelerator ? @ point, searching answer curiosity. found way manage current constraints. find accelerators "elegant".
now why need ? need access "lazy properties" without using sccm cmdlets, desktop computer user logged on account not same name authorized connect/access sccm primary server.
what still did not find how use "*.__path" get-wmiobject cmdlet.
the wmi-accelerator [wmi]
doesn't support alternate credentials.
why need it? run:
$obj = get-wmiobject -namespace root\sms\site_p41 -credential $cred -computername qs07352 -class sms_application -filter "localizeddisplayname '%winzip_tartempion%'" $obj.get() $obj.sdmpackagexml
Comments
Post a Comment