Tag Archives: powershell

GUI to log off Remote Desktop users by non-admins

I’ve blogged about the issues with the well-intentioned but ill-though-out Remote Desktop Management Server concept in Windows Server 2012 (inc R2) before, trying to come up with workarounds to all the things you used to be able to do easily … Continue reading

Rate this:

Posted in PowerShell, Remote Desktop, Windows | Tagged , , , , , , , , , , , | Leave a comment

Function to invoke PowerShell ISE from shell

Another little function to add to your PowerShell profile. If you’re in the PowerShell Integrated Scripting Environment you can use the command psedit <filename> to open the file in the ISE editor – and it doesn’t just have to be … Continue reading

Rate this:

Posted in PowerShell | Tagged , , , | Leave a comment

Get Uptime with Get-Uptime

I’ve been using this for ages, and have now finally got around to a) blogging it, and b) updating it to use Get-CimInstance. The latter makes it particularly easy to code and thus makes the function very compact due to … Continue reading

Rate this:

Posted in PowerShell | Tagged , , , , , , | Leave a comment

Remote PowerShell to an IP Address

PowerShell remoting works over the WS-Man protocol, which in Windows is implemented via WinRM. By default this uses Kerberos authentication, and in most domain environments everything “just works”. If the machine isn’t correctly registered in DNS you’ll get an error: … Continue reading

Rate this:

Posted in PowerShell | Tagged , , , , , , | Leave a comment

PowerShell Transcription to a file share breaks everything, and how to fix it

There’s been a bit of noise about PowerShell-based malware recently, and given the “assume breach” security mindset, I thought it was about time I enabled some of the PowerShell logging features in Windows. The basis behind “assume breach” is that … Continue reading

Rate this:

Posted in PowerShell, Security | Tagged , , , , , , , , , , , | Leave a comment

Collect user and group SIDs and names from Active Directory

Ever found yourself looking through the Access Control List of a file/folder/share and mixed in along with the group names (hopefully not user names!) you see some SIDs? These look something like S-1-5-21-0123456789-0123456789-0123456789-0123. These are the Security IDs of deleted … Continue reading

Rate this:

Posted in PowerShell, Security, Windows | Tagged , , , , , , | Leave a comment

PowerShell Exchange mailbox move progress monitor

This is a very basic script that’ll give you a progress bar to monitor a mailbox move process. You’ll need to run it from an Exchange Management Shell PowerShell prompt.

Rate this:

Posted in Exchange, PowerShell | Tagged , , , , , , , | Leave a comment

Change BitLocker Recovery Password with PowerShell

When BitLocker detects certain changes to the computer it’ll trigger Recovery Mode, and prompt for the Recovery Password. Likewise, you also need the recovery password if you need to access the encrypted disk from another machine or via Windows Recovery … Continue reading

Rate this:

Posted in PowerShell, Security, Windows | Tagged , , , , , , , , , | 1 Comment

Get or update SysInternals tools with PowerShell

This is version 2 – the previous version relied on mapping a new PSDrive directly to \\live.sysinternals.com\tools which made things easy, but that no longer seems to work (or at least not for me, might be my web filtering blocking … Continue reading

Rate this:

Posted in PowerShell, Windows | Tagged , , , , , , | Leave a comment

Network List Manager in PowerShell

I’m writing a network diagnostic script, and wanted to use the network status and connectivity information that’s already been captured by the Network List Manager¬†(NLM). The code for pulling various bits of info is below. NLM_Connectivity¬†was a good opportunity to … Continue reading

Rate this:

Posted in PowerShell | Tagged , , , , , , , , , | 1 Comment