Create SPN for Running PowerShell into Azure as Scheduled Task

So yes, It has been 2 years since I posted <sigh> You would think with Covid I would have been all over this, but well .. we all agree that time of our lives sucked and here we are. As we have all had, I recently had the requirement to… Continue reading

Get-ADGroupMember : The size limit for this request was exceeded

This is due to a limit with Get-ADGroupMember having a 5k limit, so this is telling you that the group you are trying to get members from has more than 5k Members. To get around this you can use this Myself I ran it as such so I can do… Continue reading

Powershell – Getting Formatted Date Info

This is a simple one, want to get today, yesterday, last month or last year .. try this $Date = Get-Date $Today = $Date | Get-date -Format MM/dd/yyyy $Yesterday = $Date.AddDays(-1) | Get-Date -Format MM/dd/yyyy $LastMonth = $Date.AddMonths(-1) | Get-date -Format MM/dd/yyyy $LastYear = $Date.AddYears(-1) | Get-Date -Format MM/dd/yyyy You… Continue reading

Quick Powershell ShortCut

Shortcut If you are using the where command Get-Mailbox * | Where-Object {$_.EmailAddress -like “*something.com”} you can use a question mark Get-Mailbox * | ? {$_.EmailAddress -like “*something.com”} Some others I often use: Format-List = FL Format-Table = FT Get-Item = gi Export-CSV = epcsv Import-PSSession = ipsn Add-PsSnapIn =… Continue reading