I've got a real simple get-adobject script, that simply lists all my users who are persons. (Included below). I want to run this as "Network Service", but I can't seem to get it to. I'm using the -credential parameter, and have tried "nt authority\network service", "nt authority\networkservice", and various others...but it still always prompts me for the password, which obviously, there isn't one. I've also tried to set the credentials using a get-credential to a variable, but that too is prompting for the password. How can I do this?
Get-ADObject-Filter{(ObjectClass-eq"User")-and(ObjectCategory-eq"person")}-Credential'nt authority\networkservice'|selectName,ObjectClass,ObjectCategory
mpleaf