Last active
November 8, 2016 13:01
-
-
Save chrisbaldauf/c3f9f84299f095d4ee27 to your computer and use it in GitHub Desktop.
cmd vs powershell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
net use x: \\server\share /user:domain\username p@$$w0rd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$secpasswd = ConvertTo-SecureString "p@ssw0rd" -AsPlainText -Force | |
$mycreds = New-Object System.Management.Automation.PSCredential ("domain\username", $secpasswd) | |
New-PSDrive -Name "x" -PSProvider FileSystem -Root "\\server\share" -Persist -Credential $mycreds |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment