Skip to main content

Category: Uncategorized

Script for Setting the License for Multiple Office 365 User Accounts

A script for setting the Office 365 license for multiple users. Requires a CSV file named users.csv. This file must in the same directory as the script. The CSV file must contain three columns. The title of the columns should be UPN, UsageLocation, and SKU. BulkSet-MsolUserLicense.ps1

The User Profile Service service failed the logon

One of my clients had a really strange issue the other day. He has a domain admin account in his domain and was not able to login to a server that I recently built. The server was an Exchange 2013 box, and was used in Coexistence mode to migrate his company from an Exchange 2007 box. He was getting this error message when attempting to login: This is a classic error message that I’m sure most technicians have seen before.

Azure AD Connect Password Sync – Disabled and Grayed Out

Ran into a problem earlier with the new Azure AD Connect Wizard. We had configured the wizard and synced around 500 AD accounts. However, password sync was not working. I opened the wizard to confirm the configuration and found that “Password Hash Synchronization” was disabled. It was greyed out and could not be enabled. I called Microsoft and worked for a couple hours with a technician to resolve the issue. Thought I should post the resolution here in case anyone else encounters this.

Finding All Mailboxes with a Forwarding Address in Exchange 2003

Believe it or not, the MSP I work for still has a client who is using Exchange 2003 as their primary email service. Despite several attempts at convincing them of the power of Office 365, they refuse to migrate. Last week the CFO contacted me and requested we provide them with a report of all users who have their email forwarded to another mailbox. “Ok, no problem.” I said helpfully as the client informed me of their request (at the time I didn’t even think about them having Exchange 2003…).

Script for Querying All AD Computers Time Source

This script will iterate through all computers in Active Directory and return the configured time server for each computer. <# .SYNOPSIS Get time source for all computers in domain .EXAMPLE Get-TimeSource .NOTES Author: Ryan Nemeth - RyanNemeth@live.com Site: http://www.geekyryan.com .LINK http://www.geekyryan.com .DESCRIPTION This function will iterate through all computers/servers in a domain and return the time source for each. #> Write-Host -foregroundcolor Red -BackgroundColor black "This script must be run on a domain controller and requires that the AD Powershell module be installed" $module = Get-Module -ListAvailable | Select-Object -ExpandProperty Name if($module -notcontains "ActiveDirectory") { Write-Host -foregroundcolor red -backgroundcolor black "***Active Directory Powershell Module Not Found***" } else { Write-Host -foregroundcolor yellow "Found Active Directory Powershell Module.

Error When Reinstalling DirSync

Today is just not my day! After a failed attempt at installing/configuring DirSync, I removed it and tried to install and configure it again. This time did not prove any more successful. I was getting this error midway through the install process: I was able to figure this out after a little while and wanted to sure what I learned. If you are seeing this error message after removing DirSync and trying to reinstall, here’s what you need to do:

Failed to Mount Exchange 2010 Database

Recently, one of my users’ came to me and said he was missing two months worth of email. This was just after migrating to Exchange Online. We were using Exchange 2010 with System Center DPM for backups. I restored the database that the users’ mailbox was on from a backup then copied it over to the Exchange server from the network share I restored it to. All was going well, until I tried to mount the darn thing.

Ping Sweeping with FPing

I generally use NMAP for any type of host discovery, but recently started experimenting with FPing. One thing I found is that, when performing a ping sweep, not only do I see the hosts that replied to the ping, but FPing also sends any unreachable IP addresses to stdout (which is super annoying and ugly if you ask me…). Anyway, after a bit of research, I found a nifty way to suppress these messages.

Powershell: SID to Username

This is a simple script to convert a SID to a username # Returns a username based on a SID # Author: Ryan Nemeth # Date: 12/2/2014 $SID = read-host “Please enter the SID: ” $object = New-Object System.Security.Principal.SecurityIdentifier($SID) $User = $object.Translate( \[System.Security.Principal.NTAccount\]) write-host “The user is: ” $User.Value