Tag Archives: get

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

List All Domain Controllers and roles with PowerShell

New job, new infrastructure, and I needed a way to quickly find out what Active Directory Domain Controllers were present, where they were located, and what roles and functions they all performed. So I wrote this simple script to do … Continue reading

Rate this:

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

PowerShell: Get AD attributes

A while back I posted a script to monitor Active Directory LDAP response times. As part of this I had a chunk of code that not only did an LDAP lookup, but also pulled all the AD attributes into a … Continue reading

Rate this:

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

PowerShell script to get temperature from NetBotz

Wrote this to extract the temperature reading from a few NetBotz devices that I have in my datacentres. Note that the second time I call the function, it is getting the temperature from a second (non-docked) sensor pod attached to … Continue reading

Rate this:

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

Get and delete DNS A and PTR records via PowerShell

My Remote Desktop Session Host build process is now pretty slick. I can easily rebuild a lot of RDSH VMs very quickly. The process basically involved powering off the existing VM, deleting both it and its Active Directory account, and … Continue reading

Rate this:

Posted in PowerShell, Scripting, Windows | Tagged , , , , , , , , , , , , | 4 Comments

Find vSphere VM locations: Folder, vApp and Resource Pool

The vSphere client doesn’t seem to give you a nice overview where you can see all the location data about your virtual machines. You can see the Folder and vApp by expanding all the branches in the VMs & Templates view, … Continue reading

Rate this:

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