Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <############################################################
- Author : PC-Aide
- Title : Enable PowerShell remoting
- Youtube channel : https://www.youtube.com/user/Boliccov
- SRC : http://www.tomsitpro.com/articles/powershell-remote-management,2-781.html
- https://msdn.microsoft.com/en-us/powershell/scripting/core-powershell/running-remote-commands
- https://msdn.microsoft.com/en-us/powershell/reference/3.0/microsoft.powershell.core/new-pssession
- https://www.howtogeek.com/117192/how-to-run-powershell-commands-on-remote-computers/
- http://pastebin.com/u/PC_Aide
- ############################################################>
- # First time
- # Enabling PowerShell remoting
- # if succesful, you see 2 services, WinRM - imgur ► https://imgur.com/A8XOejU)
- Enable-PSRemoting -Force
- # Testing the connection:
- # Describe - imgur ► https://imgur.com/1QVZZG8
- Test-WSMan serv
- # Executing a remote command
- # imgur ► https://imgur.com/UeOASWk
- # imgur 2 (all commands possible : Cmdlet) ► https://imgur.com/J3jMyvJ
- # Invoke-Command -ComputerName COMPUTER -ScriptBlock { COMMAND } -credential USERNAME
- Invoke-Command -ComputerName serv -ScriptBlock { COMMAND } -credential administrator
- # Staring a remote session
- # imgur ► https://imgur.com/zdgkvRK
- # imgur 2 ► https://imgur.com/W7qD6TD
- # Enter-PSSession -ComputerName COMPUTER -Credential USER
- Enter-PSSession -ComputerName serv -Credential administrator
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement