Cheat for PowerShell connecting to remote machine
Yes I know, it's quite easy to connect against a remote machine to run PowerShell. But I am not doing it on a regular basis so I always forget:
Enter-PSSession -ComputerName COMPUTER -Credential USER
So to make my life easier I have created a really easy script with a shortcut on my desktop, that just ask for remote computer name and my password.
Script:
$RemoteMachine = Read-Host -Prompt "Input name of remote machine"
Powershell -noexit Enter-PSSession -ComputerName $RemoteMachine -Credential AdminMan
You can find a nice guide on "How-To Geek":
How to Run PowerShell Commands on Remote Computers
Or read more on Enter-PSSession on Microsoft Docs
Enter-PSSession -ComputerName COMPUTER -Credential USER
So to make my life easier I have created a really easy script with a shortcut on my desktop, that just ask for remote computer name and my password.
Script:
$RemoteMachine = Read-Host -Prompt "Input name of remote machine"
Powershell -noexit Enter-PSSession -ComputerName $RemoteMachine -Credential AdminMan
You can find a nice guide on "How-To Geek":
How to Run PowerShell Commands on Remote Computers
Or read more on Enter-PSSession on Microsoft Docs