I've been getting to grips with Windows Autopilot recently and, having a long history working with SCCM, I've found it hard not to compare it with the power of traditional OSD using a task sequence. In fact, one of my goals was to basically try to reproduce what I'm doing in OSD with Autopilot in … Continue reading Setting the Computer Description During Windows Autopilot
Category: Active Directory
Monitoring Changes to Active Directory Sites and Subnets with PowerShell
If you work with SCCM and you use AD Forest Discovery to automatically create boundaries from AD Sites or Subnets, you know how important it is for AD to stay up to date with the current information. And when something is changed in Sites or Subnets, you need to be made aware of it so … Continue reading Monitoring Changes to Active Directory Sites and Subnets with PowerShell
Removing Disabled Computer Accounts from SCCM with PowerShell
In System Center Configuration Manager there are 2 Site Maintenance tasks that help take care of stale or obsolete client records: Delete Aged Discovery Data and Delete Inactive Client Discovery Data. However in some cases some records can remain in SCCM and are not removed by these tasks, for example, when a system is no longer active but … Continue reading Removing Disabled Computer Accounts from SCCM with PowerShell
Finding the ‘LastLogon’ Date from all Domain Controllers with PowerShell
In an Active Directory environment, probably the most reliable way to query the last logon time of a computer is to use the Last-Logon attribute. The Last-Logon-Timestamp attribute could be used, but this will not likely be up-to-date due to the replication lag. If you are using PowerShell, the LastLogonDate attribute can also be used, however … Continue reading Finding the ‘LastLogon’ Date from all Domain Controllers with PowerShell
Creating a Simple Class Library for PowerShell 5
PowerShell 5 brings some nice capability to PowerShell, including support for the creation of custom classes. Very simply, a class can be used to define a custom type, and allow you to create an object of that custom type. This can be useful for example, if you want to create an object that has specific properties … Continue reading Creating a Simple Class Library for PowerShell 5
Ping all the Computers in an AD OU
Here is a clean and simple PowerShell script to ping all the computer accounts in an Active Directory OU, and return the Name, IP Address and any errors into a csv file.