RDP connectivity issues to Azure

Various issues from Win 7 clients continually disconnecting/re-connecting to an RDS cluster in Azure. All clients were up-to-date with the latest RDP 8.1 support using the following patches,

KB2857650
KB2574819-v2
KB2830477
KB2913751

However had to also run the following to stop the disconnects

https://support.microsoft.com/en-us/kb/2923545

Advertisements

Set Password Expiration Policies in Azure Active Directory

Using “Windows Active Directory Module for windows Powershell”
Connect-MSOLService

List all Azure AD accounts to determine whether the password will expire
Get-MSOLUser | Select UserPrincipalName, PasswordNeverExpires

Change a specific Azure AD account to not expire
Set-MsolUser -UserPrincipalName -PasswordNeverExpires $true

Change all Azure AD accounts to not expire
Get-MSOLUser | Set-MsolUser -PasswordNeverExpires $true

https://msdn.microsoft.com/en-us/library/azure/hh967633.aspx

Executing Scripts in Azure

It is useful to do various tasks from Azure. Excellent places to use this are to shut down specific servers overnight and restart in the morning to conserve consumption.

It is currently free for the first 500 minutes (job time) usage per month otherwise there is a small charge http://azure.microsoft.com/en-us/pricing/details/automation/

From the ACTIVE DIRECTORY module create a new user for the specific purpose of scripting

From the AUTOMATION module create a new Automation account for the relevant (don’t currently have North Europe for UK so have to execute this from the West Europe datacentre)

Open the new Automation account, from the ASSETS tab and then ADD SETTING to add the script user credentials for scripting

Select the RUNBOOKS tab, and add a new Runbook

Open the Runbook and use the following script

workflow automation-startup
{

$AutomationCredential = “scriptuser” #Credential used for authentication
$AzureSubscription = “Azure in Open” #Name of Azure subscription

$Cred = Get-AutomationPSCredential -Name $AutomationCredential

# Connect to Azure (ignore output)
$output = Add-AzureAccount -Credential $Cred

# Select subscription
Select-AzureSubscription -SubscriptionName $AzureSubscription
get-azurevm -service myservice -name myvm | start-azurevm
}

Publish the Runbook

Finally, Setup a convenient Schedule
If planning weekdays only, you will need to setup a schedule for each day and have it repeat every 7 days