WordPress.com
# PowerShell code- Deepak Kaushik# Do Not continue in case of an error$ErrorActionPreference = "Stop" # Connect to a connection to get SubscriptionId & TenantId$Connection = Get-AutomationConnection -Name "AzureRunAsConnection"$TenantId = $Connection.TenantId$SubscriptionId = $Connection.SubscriptionId # Get the Credentials for the automation account. $SPCredential = Get-AutomationPSCredential -Name "AzureDWHAutomation" # Login to Azure ($null is to prevent output)Write-Output "Login to Azure using automation account 'AzureDWHAutomation'."$null = Login-AzureRmAccount -TenantId $TenantId -SubscriptionId $SubscriptionId -Credential $SPCredential # Select the correct subscriptionWrite-Output "Selecting subscription '$($SubscriptionId)'."$null = Select-AzureRmSubscription -SubscriptionID $SubscriptionId # Get variables $ResourceGroupName = Get-AutomationVariable -Name 'ResourceGroupName'$ServerName = Get-AutomationVariable -Name 'ServerName'$DatabaseName = Get-AutomationVariable -Name 'DatabaseName' # Check old status (for testing/logging purpose only)$OldDbSetting = Get-AzureRmSqlDatabase -DatabaseName $DatabaseName -ServerName $ServerName -ResourceGroupName $ResourceGroupName$OldStatus = $OldDbSetting.Status #Write-Output "Resuming $($DatabaseName). Current status: $($OldStatus)" #$null = Resume-AzureRmSqlDatabase -DatabaseName $DatabaseName -ServerName $ServerName -ResourceGroupName $ResourceGroupName Write-Output "Pausing $($DatabaseName). Current status: $($OldStatus)"$null = Suspend-AzureRmSqlDatabase -DatabaseName $DatabaseName -ServerName $ServerName -ResourceGroupName $ResourceGroupName # once finished Write Output Write-Output "Done" ................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related searches
- wordpress passing data between pages
- wordpress business templates
- wordpress rss feed not working
- wordpress jquery is not defined
- create wordpress blog
- wordpress roles editor
- wordpress full rss feed
- wordpress rss feed settings
- wordpress rss feed plugin
- wordpress display rss feed
- wordpress rss feed link
- wordpress rss feed to post