run a function within a script with different credentials
35 views
Skip to first unread message
RG
unread,
Dec 18, 2009, 6:46:01 PM12/18/09
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
I have a powershell script that is launching a process on a remote machine. I would like to have it so the script prompts for the persons username and password (get-credential) and then takes those credentials and uses them to launch the process. The script works find if I launch powershell with the credentials that need to launch the process on the remote machine, but if I launch the powershell script with credentials that don't have access to that machine it fails. Could somebody provide an example of this?
David Trimboli
unread,
Dec 22, 2009, 4:13:18 PM12/22/09
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Here is a blog that indicates you can do it with a System.Diagnostics.ProcessStartInfo object: