Office 365 Password Policy returns Empty Values in PowerShell

o365-logo1Regular readers will be aware of a script I wrote some time ago to remind people to change their password, sending them an email when it was due to be changed. I wanted to extend this up to Office 365 but at the time, when I checked it out the relevant data was not exposed by using the Get-MSOLPasswordPolicy cmdlet. Or so I thought.

Whilst chatting with co-conspirator Tim Barrett yesterday he sent me a link to Spice Works where someone named bbeckers had indeed published a modified version of my original script that was talking to Office 365, and, to my surprise was dated back in 2016.

Of course I wanted to try it out, but on my production tenant, the information returned from Get-MSOLPasswordPolicy was an error saying ‘You do not have permission to call this cmdlet’

Read more of this post

DHCP Option Values and PowerShell

Following on from my previous post, i wanted to share a small bit of PowerShell i created whilst on a site visit.

This was before i had worked on Vendor Classes but actually follows on quite nicely. In the previous post i mentioned a requirement to set an alternate NTP Server address, and used 1.uk.pool.ntp.org.

For those who may have worked with those NTP Servers in the past you may know that (as the name suggests) they are a pool of servers and the IP address returned changes frequently. So, setting that value statically and forgetting about it led me to find a new Phone on a clients desk was not syncing the time.  Read more of this post

Install Windows Server Essentials with a Custom Domain Suffix

After a brief argument with Susan Bradley, and i use the term brief and argument loosely, Grey Lancaster and i were left with a problem…

So can someone blog that/post that on TechNet so that folks aren’t hacking up what they are doing now?

Grey, of course, deferred to me. So here i am Saturday night and I’m writing this. I don’t mind of course because i have nothing better to do, but i digress.

Yes, you can install Essentials 2012 R2 (and probably other versions) with any domain suffix, not just the “.local” that the Essentials Configuration Wizard (ECW) will default to..

Read more of this post

Windows Server Essentials – Configuration Troubleshooter

powershell2xa4I had a support case this week where it became apparent to me that there is no quick and easy way to test Essentials Servers for Configuration errors. Manually working through IIS or Certificates is prone to human error, as was proved to me, by me missing certain key things.

Uncharacteristically i decided to write a PowerShell script to save me from this sort of embarrassment in the future, and make me look really good next time i need to troubleshoot an Essentials Server.

You can download the tool from here, and am very interested to hear how it works for you.

If you have already downloaded it, i have updated the tool so you should download it again!

Read more of this post

PowerShell, Make it do something useful!

powershell2xa4$users = ((Get-ADUser -filter * | where-object { $_.GivenName -ne $null }) | foreach{ $_.Name})
foreach ($user in $users)
{
        $FirstName = (Get-ADUser -filter {Name -eq $User} | foreach {$_.GivenName}).ToString()
        $SurName = (Get-ADUser -filter {Name -eq $User} | foreach {$_.SurName}).ToString()
        $DisplayName = ("$Firstname" + " " + "$Surname")
        $DisplayName
        Set-ADUser $User -DisplayName $DisplayName
        Set-ADUser $User -Description "User Created by Windows Server 2012 Essentials Dashboard"
}

You might be wondering what the hell that means?

Read more of this post

SBS 2011 Standard: Add a PSConfig Email Alert

sbsstdA client called me today to say ‘we cant get on the internet’, I asked what happened when they loaded up the browser, and they got a 503 Service Unavailable.

Read more of this post

SBS 2011 Essentials : PowerShell Cmdlets

sbse-conPowerShell is pretty cool. There does not seem to be much you can’t find out with it, or configure with it.

Not being a developer i struggle to build complex PowerShell scripts

Read more of this post

<span>%d</span> bloggers like this: