View Single Post
Old 08-20-2008   #2 (permalink)
Kryten


 
 

Re: How to pass credentials?

Hi,

If I understand properly you want to pass your credentials to the
target computer from within the gwmi cmdlet?

If so,

gwmi -computername . -credentials "Administrator"

Will result in the username "Administrator" being presented and an
authentication dialog popped up for you to enter
the corresponding password. Note the period after the -computername
parameter to signify the local machine. Thats about it AFAIK.

It's also possible to send a credential "object" that can be
synthesised via the get-credential cmdlet, but I've never even tried
that personally.

help get-wmiobject -detailed

would be a good place to start.

Good luck,
Stuart
My System SpecsSystem Spec