Share via


PowerShell Tip: How to Unlock Remote Machines using PowerShell

Question

How to Unlock Remote Machine Using PowerShell?

Answer

Yes, it's possible provided your PowerShell execution policies are in place and Remoting enabled.

Solution

Invoke-Command  -ComputerName 'RemoteMachine' -ScriptBlock { rundll32.exe user32.dll,LockWorkStation }

Help

help Invoke-Command -Detailed

help Invoke-Command -Examples

Help about_Remote_Troubleshooting

Enjoy PowerShell