Rookie Mistake: Don’t Forget to Register NPS Server in AD

I have been playing around with NPS for a while but today was the first time I had ever set up an Network Policy Service Server on a Member Server in a domain. I then wanted to use it as the Primary Server for Authentication for one of our RADIUS clients but couldn’t figure out why I wasn’t getting Authenticated, I had set it up exactly the same as my other NPS Servers. Checking the Event Viewer I noticed that I was receiving the Event ID 4402 reporting that “There is no domain controller available for domain %1”. A lot of posts out on the Internet were leading me in the direction of DNS issues or Firewall issues but none of these were the issue. I then found this post by Geoff @ UVM and it became very clear what I had forgot to do! I forgot to Register the NPS Server in Active Directory. As soon as I had done that, everything started working as expected!

To Register the NPS Server in Active Directory:

  1. Open the NPS management console
  2. Right-click on NPS (Local)
  3. Click on Register server in Active Directory

I won’t forget that one again!

Until next time!

Exchange PowerShell: Find Mailbox with Specific Email Address

Every now and then I get asked to find the mailbox that an email has been sent to with only an email address to go off. Thankfully, PowerSshell makes this very easy to find the owner straight away.

Get-Mailbox | Where {$_.emailaddresses -like "smtp:phil@ctrlf5.me"} | FT Name,Alias

All you need to do is change the email address from phil@ctrlf5.me to the email address you are trying to find. The FT Name,Alias just shows me the information I need to see, but you are welcome to change that to suit your needs.

Until Next Time!

Another Atlassian Upgrade – Confluence 4.3

We had been running Confluence 3.5 for some time now and have been meaning to upgrade for so long, but it has been one of those things where I felt that I should upgrade JIRA first and because I just never got round to upgrading JIRA, I just never got around to upgrading Confluence. There is always something with a higher priority to work on. Well over the weekend, I completed the upgrade to version 4.3. This is not the latest version, but is the latest version we can upgrade to before upgrading to the latest version. The upgrade went quite smoothly and today, there has only been one issue which is more of a plugin issue than a Confluence issue.

Running through the upgrade in the test lab first is definitely a key part of having a smooth upgrade!

Until next time!

PowerShell Script: Delete Files Older Than 7 Days

Another file operations PowerShell script that was recently required. This time we had a folder that contains a large number of log files that were never rotated and took up a large amount of disk space. These logs are only used for troubleshooting issues if they occur and it is rarely required for us to go over log files older than 7 days, so why are we keeping the rest?

Here is an easy one liner to help!

Until next time!

Get-ChildItem –Path “E:\TEMP\Logs” –Recurse | Where-Object{$_.LastWriteTime –lt (Get-Date).AddDays(-7)} | Remove-Item