UPDATED: 12/25/2016
Script update as Azure RM cmdlet has changed since original script was created
Redid video as old video was bad quality and also the script changes needed to reflect in new video.
This article covers the demonstration of a custom script I created to automate Azure DNS and Office 365 (O365) domain configuration. The script will login into Azure and Office 365 to automate the adding, verifying of domain and adding the necessary DNS records to AzureDNS to complete domain setup in Office 365 portal. Requirements for running script are;
Add Office 365 Domain using AzureDNS
Syntax:
.\Add-O365DomainAzureDNS.ps1 -Domain <Domain> -SubscriptionId <SubscriptionId> -ResourceGroupName <ResourceGroup>
Example:
.\Add-O365DomainAzureDNS.ps1 -Domain testme.o365tech.us -SubscriptionId 1d6737e7-4f6c-4a9e-8cd4-996b6f003d0e -ResourceGroupName AzureT
This is another script in my toolbox, I have tweaked it a little to look pretty and work in other environment. The script is used to update certificates on the ADFS server and to update the ADFS signing certificate on Office 365 Federated domains. It’s not in any way a perfect script but gets the work done. Download script here
Let me start off with state that i know there are other ways that might be simpler for other people (i.e. Performance Counter) but i still like the old fashion way. Below is how i check my exchange queues when someone reports a delay issue.
Just 2 lines does the job effectively
$tServer = (Get-ExchangeServer | ? {$_.serverrole -like "*Mailbox*"}).name $tServer | % {Get-Queue -Server $_ | ? {$_.messagecount -ge 0}}
Where the “0” in the script can be change to any thing you deem significant, example;
$tServer | % {Get-Queue -Server $_ | ? {$_.messagecount -ge 10}
Please note that this is only for Exchange 2013 and 2016
Enjoy!!!
The article covers storing credential ‘securely’ to be used later in a PowerShell script. It involves export credential into a xml file and importing that credential when need to authenticate.
I used the store credential process to customize an existing script, this method can be used anywhere where a PowerShell script needs a credential.
—————————————-————————
One of numerous videos in my Two-Click (2C) series
2C YouTube Playlist: https://www.youtube.com/playlist?list=PLURKD77y7MK9f3vrr7SnQE_1L2QjzdMUM
Other 2C Article: http://hazelnest.com/blog/blog/tag/2c/
Other PowerShell Article: http://hazelnest.com/blog/blog/tag/PowerShell/