PowerShell/CMD one-liners

I figured I should gather up some useful commands that I often use in once place. I expect this list to expand as time goes on.

Check logged in users

Check server uptime

Find filenames longer than 256 characters

Get info on AD account such as last logged in and password expiration date

Run Powershell as admin

Run cmd as other user

Start control panel as other user

Kill an application remotely

Kill and restart the clipboard