![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Switch user credentials using powershell Hi, Is there a way to switch user credentials in powershell script? The reason I want to do this, the script needs to access a network share that only domain administrator can, but I don't want to login as domain administrator just for the purpose of running the script. TIA |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Switch user credentials using powershell right-click on PowerShell icon -> Run As... (for XP/2003), or Run As Administrator in Vista and higher. However there is one problem, that you cannot specify particular account name to launch program (only Administrator is available). To solve this you can use ShellRunAs: http://technet.microsoft.com/en-us/s.../cc300361.aspx -- WBR, Vadims Podans MVP: PowerShell PowerShell blog - www.sysadmins.lv "Danny Ni" <dndn@xxxxxx> rakstija zinojuma "news:#$Eq$GJ3JHA.5728@xxxxxx"... Quote: > Hi, > > Is there a way to switch user credentials in powershell script? The reason > I want to do this, the script needs to access a network share that only > domain administrator can, but I don't want to login as domain > administrator just for the purpose of running the script. > > TIA > |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Trouble with remote file access and passing credentials in Powershell | PowerShell | |||
| problem with Importing Credentials in PowerShell | PowerShell | |||
| User Accounts, Switch User, Hibernate, Sleep, Restart | Vista account administration | |||
| how to get logged-in user credentials? | PowerShell | |||
| Different user credentials | Vista networking & sharing | |||