Tag Archives: powershell

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 , , , , , , , , , | Leave a 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 , , , , , , , , , | Leave a comment

PowerShell: BitLocker Encryption Progress Bar

When enabling Bitlocker I want to know how far through the process of encrypting the drive it has got. The script gets the encryption status from the manage-bde.exe command, parses it using a regular expression to get the percent complete, … Continue reading

Rate this:

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

Fix PowerShell WinRM remote connection errors

I’ve had two annoying PowerShell errors today, both for the same server: Enter-PSSession : Connecting to remote server server-a.rcmtech.co.uk failed with the following error message : The client cannot connect to the destination specified in the request. Verify that the … Continue reading

Rate this:

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

Connection State Announcer

I’ve been having some very annoying problems with my home broadband where the connection keeps dropping every few minutes. I wrote this quick script to monitor a site on the internet and tell me when it can’t be reached anymore, … Continue reading

Rate this:

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

Standard user launching a command with elevated credentials

I needed standard users to be able to run certain executables with administrator credentials, but ideally without wanting to give them an administrator account and password, and certainly without adding them to the Administrators group. I also needed a log … Continue reading

Rate this:

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

PowerShell: Active Directory User to SID and SID to User

I was recently asked to find the username associated with a particular Active Directory SID (technically I was given the RID). This is actually pretty easy in PowerShell, and quite intuitive using basic AD cmdlets. Get the user for a … Continue reading

Rate this:

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