Advertisement
Guest User

Untitled

a guest
Sep 13th, 2017
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #Find current working directory and add directory to variable
  2. $add = $pwd.Path+"\Scripts\AddManual.ps1"
  3. $add #results in C:\PShell 2\Scripts\AddManual.ps1
  4.  
  5. $add = $add.Replace(" ","` ")
  6. $add #results in    C:\PShell 2\Scripts\AddManual.ps1           removing my `
  7.  
  8. start powershell -credential "" $add #This will fail to start because of spaces
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement