Lock your workstation using PowerShell
filed in PowerShell, Scripting on Mar.18, 2010
One other nice thing IĀ found with PowerShell is it’s ability of using APIs by importing DLLs. Below is one example, where user32.dll is imported and LockWorkstation Function is invoked to lock the desktop. Btw, I grabbed this script from TechNet Library Function Lock-WorkStation { $signature = @” [DllImport("user32.dll", SetLastError = true)] public static extern bool [...]



