![]() ![]() ![]() Therefore I thought about warping the whole script in an invoke-command like so I have seen a couple of ways to store the get the store the $cred in a way that is not easy (at least at first glance) to work out the password, so this helps to an extentįor example within the script where I need to connect to a remote machine (as above) I can store $cred and use as above, however there are lots of places in the script where I need to user (normal user) to have more rights, therefore this would mean Get-service -computer remote1 -credential $cred I know you can use the credential object like so I see some examples of user Start-Process with the RunAS option but this is to RunAs Administrator as far as I can see not a specific user I need a way to run a PowerShell script as a different user (I do not mean RunAs Administrator)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |