Skip to content

Commit bea7d23

Browse files
author
maddieclayton
committed
fix recoveryservices
1 parent 291e7a4 commit bea7d23

File tree

12 files changed

+13
-14
lines changed

12 files changed

+13
-14
lines changed

src/ResourceManager/AnalysisServices/Commands.AnalysisServices.Dataplane/StartupScripts/AnalysisServicesDataplaneStartup.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717
"Restart-AzureAsInstance" = "Restart-AzureAnalysisServicesInstance";
1818
"Sync-AzureAsInstance" = "Sync-AzureAnalysisServicesInstance";
1919
}.GetEnumerator() | Select @{Name='Name'; Expression={$_.Key}}, @{Name='Value'; Expression={$_.Value}} | `
20-
ForEach-Object {Set-Alias -Name $_.Name -Value $_.Value -Description "AzureAlias" -Scope Global} | Out-Null
20+
ForEach-Object {if (!(Get-Alias -Name $_.Name -ErrorAction SilentlyContinue)) {Set-Alias -Name $_.Name -Value $_.Value -Description "AzureAlias" -Scope Global}} | Out-Null

src/ResourceManager/Automation/Commands.Automation/StartupScripts/AzureRmAutomationStartup.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
@{
1616
"Import-AzureRmAutomationModule" = "New-AzureRmAutomationModule";
1717
}.GetEnumerator() | Select @{Name='Name'; Expression={$_.Key}}, @{Name='Value'; Expression={$_.Value}} | `
18-
ForEach-Object {Set-Alias -Name $_.Name -Value $_.Value -Description "AzureAlias" -Scope Global} | Out-Null
18+
ForEach-Object {if (!(Get-Alias -Name $_.Name -ErrorAction SilentlyContinue)) {Set-Alias -Name $_.Name -Value $_.Value -Description "AzureAlias" -Scope Global}} | Out-Null

src/ResourceManager/Cdn/Commands.Cdn/StartupScripts/CdnStartup.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
@{
1616
"Validate-AzureRmCdnCustomDomain" = "Test-AzureRmCdnCustomDomain";
1717
}.GetEnumerator() | Select @{Name='Name'; Expression={$_.Key}}, @{Name='Value'; Expression={$_.Value}} | `
18-
ForEach-Object {Set-Alias -Name $_.Name -Value $_.Value -Description "AzureAlias" -Scope Global} | Out-Null
18+
ForEach-Object {if (!(Get-Alias -Name $_.Name -ErrorAction SilentlyContinue)) {Set-Alias -Name $_.Name -Value $_.Value -Description "AzureAlias" -Scope Global}} | Out-Null

src/ResourceManager/HDInsight/Commands.HDInsight/StartupScripts/AzureRmHDInsightStartup.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717
"Disable-AzureRmHDInsightOMS" = "Disable-AzureRmHDInsightOperationsManagementSuite";
1818
"Get-AzureRmHDInsightOMS" = "Get-AzureRmHDInsightOperationsManagementSuite";
1919
}.GetEnumerator() | Select @{Name='Name'; Expression={$_.Key}}, @{Name='Value'; Expression={$_.Value}} | `
20-
ForEach-Object {Set-Alias -Name $_.Name -Value $_.Value -Description "AzureAlias" -Scope Global} | Out-Null
20+
ForEach-Object {if (!(Get-Alias -Name $_.Name -ErrorAction SilentlyContinue)) {Set-Alias -Name $_.Name -Value $_.Value -Description "AzureAlias" -Scope Global}} | Out-Null

src/ResourceManager/Network/Commands.Network/StartupScripts/AzureRmNetworkStartup.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717
"List-AzureRmApplicationGatewayAvailableSslOptions" = "Get-AzureRmApplicationGatewayAvailableSslOptions"
1818
"List-AzureRmApplicationGatewaySslPredefinedPolicy" = "Get-AzureRmApplicationGatewaySslPredefinedPolicy"
1919
}.GetEnumerator() | Select @{Name='Name'; Expression={$_.Key}}, @{Name='Value'; Expression={$_.Value}} | `
20-
ForEach-Object {Set-Alias -Name $_.Name -Value $_.Value -Description "AzureAlias" -Scope Global} | Out-Null
20+
ForEach-Object {if (!(Get-Alias -Name $_.Name -ErrorAction SilentlyContinue)) {Set-Alias -Name $_.Name -Value $_.Value -Description "AzureAlias" -Scope Global}} | Out-Null

src/ResourceManager/OperationalInsights/Commands.OperationalInsights/StartupScripts/OperationalInsightsStartup.ps1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,4 @@
1414

1515
@{
1616
"New-AzureRmOperationalInsightsAzureAuditDataSource" = "New-AzureRmOperationalInsightsAzureActivityLogDataSource";
17-
}.GetEnumerator() | Select @{Name='Name'; Expression={$_.Key}}, @{Name='Value'; Expression={$_.Value}} | `
18-
ForEach-Object {Set-Alias -Name $_.Name -Value $_.Value -Description "AzureAlias" -Scope Global} | Out-Null
17+
}.GetEnumerator() | Select @{Name='Name'; Expression={$_.Key}}, @{Name='Value'; Expression={$_.Value}} | Set-Alias -Name $_.Name -Value $_.Value -Description "AzureAlias" -Scope Global | Out-Null

src/ResourceManager/Profile/Commands.Profile/StartupScripts/AzureRmProfileStartup.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@
2323
"Logout-AzAccount" = "Disconnect-AzureRmAccount";
2424
"Logout-AzureRmAccount" = "Disconnect-AzureRmAccount";
2525
}.GetEnumerator() | Select @{Name='Name'; Expression={$_.Key}}, @{Name='Value'; Expression={$_.Value}} | `
26-
ForEach-Object {Set-Alias -Name $_.Name -Value $_.Value -Description "AzureAlias" -Scope Global} | Out-Null
26+
ForEach-Object {if (!(Get-Alias -Name $_.Name -ErrorAction SilentlyContinue)) {Set-Alias -Name $_.Name -Value $_.Value -Description "AzureAlias" -Scope Global}} | Out-Null
2727

src/ResourceManager/RecoveryServices.SiteRecovery/Commands.RecoveryServices.SiteRecovery/StartupScripts/RecoveryServicesAsrStartup.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,4 @@
8888
"Update-ASRServicesProvider" = "Update-AzureRmRecoveryServicesAsrServicesProvider";
8989
"Update-ASRvCenter" = "Update-AzureRmRecoveryServicesAsrvCenter";
9090
}.GetEnumerator() | Select @{Name='Name'; Expression={$_.Key}}, @{Name='Value'; Expression={$_.Value}} | `
91-
ForEach-Object {Set-Alias -Name $_.Name -Value $_.Value -Description "AzureAlias" -Scope Global} | Out-Null
91+
ForEach-Object {if (!(Get-Alias -Name $_.Name -ErrorAction SilentlyContinue)) {Set-Alias -Name $_.Name -Value $_.Value -Description "AzureAlias" -Scope Global}} | Out-Null

src/ResourceManager/RecoveryServices/Commands.RecoveryServices/StartupScripts/AzureRmRecoveryServicesStartup.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313
# ----------------------------------------------------------------------------------
1414

1515
@{
16-
"Get-AzureRmRecoveryServicesBackupProperty" = "Get-AzureRmRecoveryServicesBackupProperties";
16+
"Get-AzureRmRecoveryServicesBackupProperties" = "Get-AzureRmRecoveryServicesBackupProperty";
1717
}.GetEnumerator() | Select @{Name='Name'; Expression={$_.Key}}, @{Name='Value'; Expression={$_.Value}} | `
18-
ForEach-Object {Set-Alias -Name $_.Name -Value $_.Value -Description "AzureAlias" -Scope Global} | Out-Null
18+
ForEach-Object {if (!(Get-Alias -Name $_.Name -ErrorAction SilentlyContinue)) {Set-Alias -Name $_.Name -Value $_.Value -Description "AzureAlias" -Scope Global}} | Out-Null

src/ResourceManager/Resources/Commands.Resources/StartupScripts/AzureRmResourcesStartup.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
@{
1616
"Get-AzureRmResourceProviderAction" = "Get-AzureRmProviderOperation";
1717
}.GetEnumerator() | Select @{Name='Name'; Expression={$_.Key}}, @{Name='Value'; Expression={$_.Value}} | `
18-
ForEach-Object {Set-Alias -Name $_.Name -Value $_.Value -Description "AzureAlias" -Scope Global} | Out-Null
18+
ForEach-Object {if (!(Get-Alias -Name $_.Name -ErrorAction SilentlyContinue)) {Set-Alias -Name $_.Name -Value $_.Value -Description "AzureAlias" -Scope Global}} | Out-Null

src/ResourceManager/Sql/Commands.Sql/StartupScripts/SqlStartup.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@
1919
"Set-AzureRmSqlDatabaseServerAuditingPolicy" = "Set-AzureRmSqlServerAuditingPolicy";
2020
"Use-AzureRmSqlDatabaseServerAuditingPolicy" = "Use-AzureRmSqlServerAuditingPolicy";
2121
}.GetEnumerator() | Select @{Name='Name'; Expression={$_.Key}}, @{Name='Value'; Expression={$_.Value}} | `
22-
ForEach-Object {Set-Alias -Name $_.Name -Value $_.Value -Description "AzureAlias" -Scope Global} | Out-Null
22+
ForEach-Object {if (!(Get-Alias -Name $_.Name -ErrorAction SilentlyContinue)) {Set-Alias -Name $_.Name -Value $_.Value -Description "AzureAlias" -Scope Global}} | Out-Null
2323

src/ResourceManager/Websites/Commands.Websites/StartupScripts/WebsitesStartup.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
@{
1616
"Swap-AzureRmWebAppSlot" = "Switch-AzureRmWebAppSlot";
1717
}.GetEnumerator() | Select @{Name='Name'; Expression={$_.Key}}, @{Name='Value'; Expression={$_.Value}} | `
18-
ForEach-Object {Set-Alias -Name $_.Name -Value $_.Value -Description "AzureAlias" -Scope Global} | Out-Null
18+
ForEach-Object {if (!(Get-Alias -Name $_.Name -ErrorAction SilentlyContinue)) {Set-Alias -Name $_.Name -Value $_.Value -Description "AzureAlias" -Scope Global}} | Out-Null

0 commit comments

Comments
 (0)