Tag Archives: $_

PowerShell: How to check for drives with less than 10GB of free diskspace

PowerShell

I’ve been working on a simple PowerShell command today to import into our endpoint management solution so we can alert on disks with low diskspace. It’s been a while since I’ve dabbled with PowerShell, and it reminded me just how flexible it is and much I love it!

So I thought I would walk you through the evolution of the command I ended up with.

Continue reading

PowerShell: How to add all users in an OU to a Security Group using Get-ADUser and Add-ADGroupMember

PowerShellI’m currently setting up a new system for a client and wanted to add all users in a specific Organisational Unit (OU) to a specific Security Group.

I’ve written about Get-ADUser a few times before, so by combining that with another PowerShell cmdlet Add-ADGroupMember to add users to a group we should be in business!

In this example we’ll add users in the OU Head Office to the SSLVPN Users Security Group.

Continue reading