Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

PowerShell with Credentials

$
0
0

I have an issue with trying to use a stored set of credentials and invoke an executable using the stored set.  Example standard Domain User running migwiz.exe will not work.  I would like to create a script that can use a stored local admin account to run the MigWiz.exe file while the standard user is still logged in.  Any help on this would be greatly appreciated.

$username = 'Domain\User'
$password = 'password''
$cred = New-Object System.Management.Automation.PSCredential -ArgumentList @($username,(ConvertTo-SecureString -String $password -AsPlainText -Force))

I think the above is correct so far but I cant figure out how to execute c:\windows\system32\migwiz\migwiz.exe with the above credentials

Thank you all in advance

Kent



Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>