Skip to content

Commit b50e0d8

Browse files
author
Maddie Clayton
authored
Merge pull request #5480 from maddieclayton/fixstartupscript
Fix Startup Scripts to properly export aliases
2 parents af207f0 + 236fe2f commit b50e0d8

File tree

24 files changed

+37
-13
lines changed

24 files changed

+37
-13
lines changed

src/ResourceManager/AnalysisServices/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Current Release
21+
* Fixed issue with importing aliases
2122

2223
* Add support of firewall and query scaleout feature, as well as support of 2017-08-01 api version.
2324

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@
1616
"Login-AzureAsAccount" = "Add-AzureAnalysisServicesAccount";
1717
"Restart-AzureAsInstance" = "Restart-AzureAnalysisServicesInstance";
1818
"Sync-AzureAsInstance" = "Sync-AzureAnalysisServicesInstance";
19-
}.GetEnumerator() | Select @{Name='Name'; Expression={$_.Key}}, @{Name='Value'; Expression={$_.Value}} | Set-Alias -Description "AzureAlias"
19+
}.GetEnumerator() | Select @{Name='Name'; Expression={$_.Key}}, @{Name='Value'; Expression={$_.Value}} | `
20+
ForEach-Object {if (!(Get-Alias -Name $_.Name -ErrorAction Ignore)) {Set-Alias -Name $_.Name -Value $_.Value -Description "AzureAlias" -Scope Global}} | Out-Null

src/ResourceManager/Automation/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Current Release
21+
* Fixed issue with importing aliases
2122

2223
## Version 4.2.1
2324
* Added alias from New-AzureRmAutomationModule to Import-AzureRmAutomationModule

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

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

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

src/ResourceManager/Cdn/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Current Release
21+
* Fixed issue with importing aliases
2122

2223
## Version 4.1.0
2324
* Added Location Completer to -Location parameters allowing tab completion through valid Locations

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

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

1515
@{
1616
"Validate-AzureRmCdnCustomDomain" = "Test-AzureRmCdnCustomDomain";
17-
}.GetEnumerator() | Select @{Name='Name'; Expression={$_.Key}}, @{Name='Value'; Expression={$_.Value}} | Set-Alias -Description "AzureAlias"
17+
}.GetEnumerator() | Select @{Name='Name'; Expression={$_.Key}}, @{Name='Value'; Expression={$_.Value}} | `
18+
ForEach-Object {if (!(Get-Alias -Name $_.Name -ErrorAction Ignore)) {Set-Alias -Name $_.Name -Value $_.Value -Description "AzureAlias" -Scope Global}} | Out-Null

src/ResourceManager/HDInsight/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Current Release
21+
* Fixed issue with importing aliases
2122

2223
## Version 4.0.2
2324
* Added Location Completer to -Location parameters allowing tab completion through valid Locations

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

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

src/ResourceManager/Network/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
--->
2020

2121
## Current Release
22+
* Fixed issue with importing aliases
2223

2324
## Version 5.2.0
2425
* Added cmdlet to create a new connection monitor

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

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

src/ResourceManager/OperationalInsights/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Current Release
21+
* Fixed issue with importing aliases
2122

2223
## Version 4.2.0
2324
* Added support for V2 API querying via Invoke-AzureRmOperationalInsightsQuery. See [https://dev.loganalytics.io/](https://dev.loganalytics.io/) for more info on the new API.

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

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

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

src/ResourceManager/Profile/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Current Release
21+
* Fixed issue with importing aliases
2122
* Load version 10.0.3 of Newtonsoft.Json side-by-side with version 6.0.8
2223

2324
## Version 4.3.1

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
"Remove-AzureRmAccount" = "Disconnect-AzureRmAccount";
2323
"Logout-AzAccount" = "Disconnect-AzureRmAccount";
2424
"Logout-AzureRmAccount" = "Disconnect-AzureRmAccount";
25-
}.GetEnumerator() | Select @{Name='Name'; Expression={$_.Key}}, @{Name='Value'; Expression={$_.Value}} | Set-Alias -Description "AzureAlias" | Out-Null
25+
}.GetEnumerator() | Select @{Name='Name'; Expression={$_.Key}}, @{Name='Value'; Expression={$_.Value}} | `
26+
ForEach-Object {if (!(Get-Alias -Name $_.Name -ErrorAction Ignore)) {Set-Alias -Name $_.Name -Value $_.Value -Description "AzureAlias" -Scope Global}} | Out-Null
2627

2728
if (Test-Path "$PSScriptRoot\..\NewAssemblies")
2829
{

src/ResourceManager/RecoveryServices.SiteRecovery/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Current Release
21+
* Fixed issue with importing aliases
2122

2223
## Version 0.2.1
2324
* Fixed assembly loading issue that caused some cmdlets to fail when executing

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

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

src/ResourceManager/RecoveryServices/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Current Release
21+
* Fixed issue with importing aliases
2122

2223
## Version 4.0.2
2324
* Added Location Completer to -Location parameters allowing tab completion through valid Locations

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

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

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

src/ResourceManager/Resources/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Current Release
21+
* Fixed issue with importing aliases
2122

2223
## Version 5.4.0
2324
* Register-AzureRmProviderFeature: Added missing example in the docs

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

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

1515
@{
1616
"Get-AzureRmResourceProviderAction" = "Get-AzureRmProviderOperation";
17-
}.GetEnumerator() | Select @{Name='Name'; Expression={$_.Key}}, @{Name='Value'; Expression={$_.Value}} | Set-Alias -Description "AzureAlias" | Out-Null
17+
}.GetEnumerator() | Select @{Name='Name'; Expression={$_.Key}}, @{Name='Value'; Expression={$_.Value}} | `
18+
ForEach-Object {if (!(Get-Alias -Name $_.Name -ErrorAction Ignore)) {Set-Alias -Name $_.Name -Value $_.Value -Description "AzureAlias" -Scope Global}} | Out-Null

src/ResourceManager/Sql/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Current Release
21+
* Fixed issue with importing aliases
2122
* Get-AzureRmSqlServer, New-AzureRmSqlServer, and Remove-AzureRmSqlServer response now includes FullyQualifiedDomainName property.
2223

2324
## Version 4.2.0

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,6 @@
1818
"Remove-AzureRmSqlDatabaseServerAuditing" = "Remove-AzureRmSqlServerAuditing";
1919
"Set-AzureRmSqlDatabaseServerAuditingPolicy" = "Set-AzureRmSqlServerAuditingPolicy";
2020
"Use-AzureRmSqlDatabaseServerAuditingPolicy" = "Use-AzureRmSqlServerAuditingPolicy";
21-
}.GetEnumerator() | Select @{Name='Name'; Expression={$_.Key}}, @{Name='Value'; Expression={$_.Value}} | Set-Alias -Description "AzureAlias"
21+
}.GetEnumerator() | Select @{Name='Name'; Expression={$_.Key}}, @{Name='Value'; Expression={$_.Value}} | `
22+
ForEach-Object {if (!(Get-Alias -Name $_.Name -ErrorAction Ignore)) {Set-Alias -Name $_.Name -Value $_.Value -Description "AzureAlias" -Scope Global}} | Out-Null
2223

src/ResourceManager/Websites/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Current Release
21+
* Fixed issue with importing aliases
2122

2223
## Version 4.1.0
2324
* Added Location Completer to -Location parameters allowing tab completion through valid Locations

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

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

1515
@{
1616
"Swap-AzureRmWebAppSlot" = "Switch-AzureRmWebAppSlot";
17-
}.GetEnumerator() | Select @{Name='Name'; Expression={$_.Key}}, @{Name='Value'; Expression={$_.Value}} | Set-Alias -Description "AzureAlias"
17+
}.GetEnumerator() | Select @{Name='Name'; Expression={$_.Key}}, @{Name='Value'; Expression={$_.Value}} | `
18+
ForEach-Object {if (!(Get-Alias -Name $_.Name -ErrorAction Ignore)) {Set-Alias -Name $_.Name -Value $_.Value -Description "AzureAlias" -Scope Global}} | Out-Null

0 commit comments

Comments
 (0)