posts-powershell

Preferring WLAN Connections

When you are connected both to a LAN and a WLAN, and would like to prefer one network over the other, you can adjust the network metric. The lower...

Locking the Screen with PowerShell

Here is a PowerShell function called Lock-Screen that can lock the screen and prohibit user interaction. There can be a custom message, and the...

Blocking User Input

If a PowerShell script needs to perform critical steps, and user interaction must be prohibited, you can use API calls to temporarily disable all...

Passing Arguments to Encoded Commands

Encoding PowerShell code is a great way to run PowerShell code outside the PowerShell environment, i.e. in batch files. Here is some sample code...

Repairing PowerShell Context Menus

When you right-click a PowerShell script in File Explorer, you typically find a context menu entry called “Run with PowerShell” which...

Repairing PowerShellGet Publishing

If you are using Publish-Module to publish your modules to a PowerShell repository, and you keep getting exceptions about unsupported commands, it...

1 25 26 27 28 29 237