PowerShell – List All Domain Users and Their Last Logon Time
KB ID 0000752 Problem In the past I’ve looked at third party tools to do this but what if you wanted to use PowerShell? Solution Heres’ a cool solution that might interest you also Updating Domain Computer Objects with User and Machine Information 1. On your server paste the following script into Notepad; $NumDays = 0 $LogDir = “.Users-Last-Logon.csv” $currentDate = [System.DateTime]::Now $currentDateUtc...
Exchange – Export Distribution Groups AND Members to a file
KB ID 0000209 Problem Yes you can use the Powershell commands, Get-DistributionGroupMember –identity “group name” | ft name, primarysmtpaddress But you have to do that for every group and I’ve tried Piping the Get-DistributionGroup in there but it does not seem to want to work 🙁 Solution 1. Download this script and extract it to the root of the Exchange servers C: drive. 2. On the Exchange server > Click > Start > All...
Excel – IP Address Formula for ‘Auto fill’
KB ID 0000928 Problem I got asked this week if I know how to do this, a colleague was doing a spreadsheet, and needed to quickly put in IP addresses. The Problem is if you use ‘Auto Fill’ to continue your IP addresses, it does not behave quite like you would expect. Solution A quick search got me most of the way there, but the solution is different depending on which ‘octet’ of the IP address you want to...
Bulk Export Users From One Domain, and Import Into Another
KB ID 0000794 Problem I’ve written in the past about bulk importing users with CSVDE, but what if you want to move/migrate your users to another domain? You first need to export all the users, then import them into the new domain. Solution Step 1 Export Domain Users to CSV File 1. Here all my users are in one OU, if that OU has ‘nested OU’s within it that’s OK. 2. The command to ‘export’ is as...