PowerShell Inventory Operating Systems in Active Directory
Nov13

PowerShell Inventory Operating Systems in Active Directory

PowerShell Inventory KB ID 0001838 Problem I needed to get a list of operating systems  ‘in-use’ in my active directory this week. bear in mind this will pull information from all enables computer accounts in AD, so if you are ‘not good’ at tidying out old machines and servers you might get a lot of garbage in your output! Solution: PowerShell Inventory Use the following PowerShell. Get-ADComputer -Filter...

Read More
Bulk Creating Users For Your Test Network
Jan17

Bulk Creating Users For Your Test Network

KB ID 0000784  Problem Update Jan 2023: Feel free to use this Bulk-Create-AD-Users-Script (Just remeber to change the domain details in the “Global Variables’ Sections to give you 10o0 users, with sensible names addreeses etc. Having a test network, is great for both learning, and testing. I’ve got some major migrations coming up in the next few months, so I’m in the process of running up some new test servers. I...

Read More
PowerShell: Bulk Add/Remove Users From Groups
Oct15

PowerShell: Bulk Add/Remove Users From Groups

KB ID 0001475 Problem I had to do this a few weeks ago, so I documented it. I had a list of usernames in a CSV file and I needed to bulk-add them to a security group. Bulk Add Group Users Solution Firstly you will need the usernames (sAMAccountNames) in .csv format like so,  (Note: As a header Im using User-Name.) I’ve saved the file to C:\Temp on my server. Execute the following commands; Import-Module ActiveDirectory ...

Read More
PowerShell: Bulk Enable / Disable Users
Sep11

PowerShell: Bulk Enable / Disable Users

KB ID 0001469 Problem I needed to work out how to bulk disable some domain users from a .CSV file this week, so I thought I’d write it up. Disable Domain Users in Bulk from CSV Well firstly, you need to have your users in a CSV file. For the live job I just exported all the SamAccountNames to a CSV, but here for testing I just loaded a few in manually; Then execute the following two commands; Import-Module ActiveDirectory ...

Read More
Forward Mail From Exchange (On-Prem) To Office 365
Sep06

Forward Mail From Exchange (On-Prem) To Office 365

KB ID 0001467 Problem WARNING: Do not do this, if you are carrying out a Hybrid migration to Office 365! I’ve been doing an On-Prem to Office 365 migration recently. It was a little unusual because the ‘on-prem’ Exchange was not in the clients domain. So rather than migrate all the mail to their domain, and them migrate it to Office 365  we chose to use a third party migration solution ODME (Quest On Demand Migration...

Read More