Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $computer = $env:computername
- New-PSDrive -Name "tempD" -PSProvider "FileSystem" -Root "\\p-rd-hd07\c$\users\administrator\desktop\shared" -Credential pandrdentalcslt\pdegrazia
- 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"
- 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"
- Invoke-Command -ComputerName $computer -ScriptBlock {
- Start-Process C:\users\MyEppServicesZap64.exe -Wait
- }
- Start-Sleep -s 2
- Invoke-Command -ComputerName $computer -ScriptBlock {
- Start-Process C:\users\MyEppClientSetup_x86_64.msi -Wait
- }
- remove-psdrive tempd
- remove-item -path C:\users\MyEppServicesZap64.exe
- remove-item -path C:\users\MyEppClientSetup_x86_64.msi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement