Advertisement
Guest User

Untitled

a guest
Aug 21st, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. $computer = $env:computername
  2. New-PSDrive -Name "tempD" -PSProvider "FileSystem" -Root "\\p-rd-hd07\c$\users\administrator\desktop\shared" -Credential pandrdentalcslt\pdegrazia
  3.  
  4. Copy-Item -Path "Microsoft.PowerShell.Core\FileSystem::\\p-rd-hd07\c$\users\administrator\desktop\shared\MyEppServicesZap64.exe" -Destination "Microsoft.PowerShell.Core\FileSystem::\\$computer\c$\users"
  5. Copy-Item -Path "Microsoft.PowerShell.Core\FileSystem::\\p-rd-hd07\c$\users\administrator\desktop\shared\MyEppClientSetup_x86_64.msi" -Destination "Microsoft.PowerShell.Core\FileSystem::\\$computer\c$\users"
  6. Invoke-Command -ComputerName $computer -ScriptBlock {
  7. Start-Process C:\users\MyEppServicesZap64.exe -Wait
  8.  
  9. }
  10.  
  11. Start-Sleep -s 2
  12.  
  13. Invoke-Command -ComputerName $computer -ScriptBlock {
  14. Start-Process C:\users\MyEppClientSetup_x86_64.msi -Wait
  15.  
  16. }
  17.  
  18. remove-psdrive tempd
  19. remove-item -path C:\users\MyEppServicesZap64.exe
  20. remove-item -path C:\users\MyEppClientSetup_x86_64.msi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement