diff --git a/setup/azurecmdfiles.wxi b/setup/azurecmdfiles.wxi
index 328afceaf728..ea1b8758c72e 100644
--- a/setup/azurecmdfiles.wxi
+++ b/setup/azurecmdfiles.wxi
@@ -14,9 +14,6 @@
-
-
-
@@ -29,6 +26,11 @@
+
+
+
+
+
@@ -202,9 +204,6 @@
-
-
-
@@ -223,6 +222,11 @@
+
+
+
+
+
@@ -231,9 +235,6 @@
-
-
-
@@ -243,6 +244,11 @@
+
+
+
+
+
@@ -574,9 +580,6 @@
-
-
-
@@ -595,6 +598,11 @@
+
+
+
+
+
@@ -603,9 +611,6 @@
-
-
-
@@ -633,6 +638,11 @@
+
+
+
+
+
@@ -816,9 +826,6 @@
-
-
-
@@ -831,6 +838,11 @@
+
+
+
+
+
@@ -868,9 +880,11 @@
-
-
-
+
+
+
+
+
@@ -896,9 +910,6 @@
-
-
-
@@ -989,6 +1000,11 @@
+
+
+
+
+
@@ -997,9 +1013,6 @@
-
-
-
@@ -1012,6 +1025,11 @@
+
+
+
+
+
@@ -1020,9 +1038,6 @@
-
-
-
@@ -1059,6 +1074,11 @@
+
+
+
+
+
@@ -1073,9 +1093,6 @@
-
-
-
@@ -1091,12 +1108,17 @@
-
-
-
+
+
+
+
+
+
+
+
@@ -1320,9 +1342,6 @@
-
-
-
@@ -1341,6 +1360,11 @@
+
+
+
+
+
@@ -1382,12 +1406,14 @@
-
-
-
+
+
+
+
+
@@ -1529,9 +1555,11 @@
-
-
-
+
+
+
+
+
@@ -3069,11 +3097,11 @@
-
+
@@ -3127,19 +3155,19 @@
-
+
-
+
@@ -3241,16 +3269,15 @@
-
+
-
@@ -3260,6 +3287,7 @@
+
@@ -3315,11 +3343,11 @@
-
+
@@ -3331,7 +3359,7 @@
-
+
@@ -3339,7 +3367,6 @@
-
@@ -3370,16 +3397,16 @@
+
-
+
-
@@ -3392,18 +3419,19 @@
+
-
-
+
+
@@ -3471,13 +3499,13 @@
-
+
@@ -3491,8 +3519,8 @@
-
+
@@ -3536,7 +3564,7 @@
-
+
diff --git a/src/ResourceManager/AnalysisServices/Commands.AnalysisServices.Dataplane/Commands.AnalysisServices.Dataplane.csproj b/src/ResourceManager/AnalysisServices/Commands.AnalysisServices.Dataplane/Commands.AnalysisServices.Dataplane.csproj
index cc7da6a7a4be..42196d677bf2 100644
--- a/src/ResourceManager/AnalysisServices/Commands.AnalysisServices.Dataplane/Commands.AnalysisServices.Dataplane.csproj
+++ b/src/ResourceManager/AnalysisServices/Commands.AnalysisServices.Dataplane/Commands.AnalysisServices.Dataplane.csproj
@@ -112,9 +112,6 @@
-
- PreserveNewest
-
PreserveNewest
@@ -122,6 +119,9 @@
Designer
+
+ Always
+
diff --git a/src/ResourceManager/AnalysisServices/Commands.AnalysisServices.Dataplane/Commands/AddAzureASAccount.cs b/src/ResourceManager/AnalysisServices/Commands.AnalysisServices.Dataplane/Commands/AddAzureASAccount.cs
index bd7bf828c1af..61acc3bfc566 100644
--- a/src/ResourceManager/AnalysisServices/Commands.AnalysisServices.Dataplane/Commands/AddAzureASAccount.cs
+++ b/src/ResourceManager/AnalysisServices/Commands.AnalysisServices.Dataplane/Commands/AddAzureASAccount.cs
@@ -32,7 +32,7 @@ namespace Microsoft.Azure.Commands.AnalysisServices.Dataplane
[Cmdlet("Add", "AzureAnalysisServicesAccount", DefaultParameterSetName = "UserParameterSetName", SupportsShouldProcess =true)]
[Alias("Login-AzureAsAccount")]
[OutputType(typeof(AsAzureProfile))]
- public class AddAzureASAccountCommand : AzurePSCmdlet, IModuleAssemblyInitializer
+ public class AddAzureASAccountCommand : AzurePSCmdlet
{
private const string UserParameterSet = "UserParameterSetName";
private const string ServicePrincipalWithPasswordParameterSet = "ServicePrincipalWithPasswordParameterSetName";
@@ -189,22 +189,5 @@ public override void ExecuteCmdlet()
WriteObject(asAzureProfile);
}
}
-
- public void OnImport()
- {
- try
- {
- System.Management.Automation.PowerShell invoker = null;
- invoker = System.Management.Automation.PowerShell.Create(RunspaceMode.CurrentRunspace);
- invoker.AddScript(File.ReadAllText(FileUtilities.GetContentFilePath(
- Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location),
- "AnalysisServicesDataplaneStartup.ps1")));
- invoker.Invoke();
- }
- catch
- {
- // This will throw exception for tests, ignore.
- }
- }
}
}
diff --git a/src/ResourceManager/AnalysisServices/Commands.AnalysisServices.Dataplane/AnalysisServicesDataplaneStartup.ps1 b/src/ResourceManager/AnalysisServices/Commands.AnalysisServices.Dataplane/StartupScripts/AnalysisServicesDataplaneStartup.ps1
similarity index 94%
rename from src/ResourceManager/AnalysisServices/Commands.AnalysisServices.Dataplane/AnalysisServicesDataplaneStartup.ps1
rename to src/ResourceManager/AnalysisServices/Commands.AnalysisServices.Dataplane/StartupScripts/AnalysisServicesDataplaneStartup.ps1
index 598c66c062df..0d2ec372cc43 100644
--- a/src/ResourceManager/AnalysisServices/Commands.AnalysisServices.Dataplane/AnalysisServicesDataplaneStartup.ps1
+++ b/src/ResourceManager/AnalysisServices/Commands.AnalysisServices.Dataplane/StartupScripts/AnalysisServicesDataplaneStartup.ps1
@@ -16,4 +16,4 @@
"Login-AzureAsAccount" = "Add-AzureAnalysisServicesAccount";
"Restart-AzureAsInstance" = "Restart-AzureAnalysisServicesInstance";
"Sync-AzureAsInstance" = "Sync-AzureAnalysisServicesInstance";
-}.GetEnumerator() | Select @{Name='Name'; Expression={$_.Key}}, @{Name='Value'; Expression={$_.Value}} | New-Alias -Description "AzureAlias"
\ No newline at end of file
+}.GetEnumerator() | Select @{Name='Name'; Expression={$_.Key}}, @{Name='Value'; Expression={$_.Value}} | Set-Alias -Description "AzureAlias"
\ No newline at end of file
diff --git a/src/ResourceManager/AnalysisServices/Commands.AnalysisServices/Commands.AnalysisServices.csproj b/src/ResourceManager/AnalysisServices/Commands.AnalysisServices/Commands.AnalysisServices.csproj
index 738bd0f36edb..f578038c5fe0 100644
--- a/src/ResourceManager/AnalysisServices/Commands.AnalysisServices/Commands.AnalysisServices.csproj
+++ b/src/ResourceManager/AnalysisServices/Commands.AnalysisServices/Commands.AnalysisServices.csproj
@@ -70,6 +70,9 @@
Designer
+
+
+
diff --git a/src/ResourceManager/AnalysisServices/Commands.AnalysisServices/StartupScripts/sample.ps1 b/src/ResourceManager/AnalysisServices/Commands.AnalysisServices/StartupScripts/sample.ps1
new file mode 100644
index 000000000000..1a3d1052f460
--- /dev/null
+++ b/src/ResourceManager/AnalysisServices/Commands.AnalysisServices/StartupScripts/sample.ps1
@@ -0,0 +1 @@
+#Placeholder for future scripts: Please delete this file and uncomment Always within the block in the .csproj file.
\ No newline at end of file
diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands.ApiManagement.csproj b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands.ApiManagement.csproj
index 09fa85e234da..75a56203fe65 100644
--- a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands.ApiManagement.csproj
+++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands.ApiManagement.csproj
@@ -145,6 +145,9 @@
Designer
+
+
+
diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement/StartupScripts/sample.ps1 b/src/ResourceManager/ApiManagement/Commands.ApiManagement/StartupScripts/sample.ps1
new file mode 100644
index 000000000000..1a3d1052f460
--- /dev/null
+++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement/StartupScripts/sample.ps1
@@ -0,0 +1 @@
+#Placeholder for future scripts: Please delete this file and uncomment Always within the block in the .csproj file.
\ No newline at end of file
diff --git a/src/ResourceManager/ApplicationInsights/Commands.ApplicationInsights/Commands.ApplicationInsights.csproj b/src/ResourceManager/ApplicationInsights/Commands.ApplicationInsights/Commands.ApplicationInsights.csproj
index 93ce9899df14..1d3de6b22926 100644
--- a/src/ResourceManager/ApplicationInsights/Commands.ApplicationInsights/Commands.ApplicationInsights.csproj
+++ b/src/ResourceManager/ApplicationInsights/Commands.ApplicationInsights/Commands.ApplicationInsights.csproj
@@ -54,7 +54,7 @@
..\..\..\packages\Microsoft.Azure.Management.ApplicationInsights.0.1.1-preview\lib\net452\Microsoft.Azure.Management.ApplicationInsights.dll
True
-
+
@@ -96,6 +96,9 @@
Designer
+
+
+
diff --git a/src/ResourceManager/ApplicationInsights/Commands.ApplicationInsights/StartupScripts/sample.ps1 b/src/ResourceManager/ApplicationInsights/Commands.ApplicationInsights/StartupScripts/sample.ps1
new file mode 100644
index 000000000000..1a3d1052f460
--- /dev/null
+++ b/src/ResourceManager/ApplicationInsights/Commands.ApplicationInsights/StartupScripts/sample.ps1
@@ -0,0 +1 @@
+#Placeholder for future scripts: Please delete this file and uncomment Always within the block in the .csproj file.
\ No newline at end of file
diff --git a/src/ResourceManager/Automation/Commands.Automation/Commands.Automation.csproj b/src/ResourceManager/Automation/Commands.Automation/Commands.Automation.csproj
index c0aae0337ab3..df386099958c 100644
--- a/src/ResourceManager/Automation/Commands.Automation/Commands.Automation.csproj
+++ b/src/ResourceManager/Automation/Commands.Automation/Commands.Automation.csproj
@@ -202,6 +202,9 @@
Designer
+
+
+
diff --git a/src/ResourceManager/Automation/Commands.Automation/StartupScripts/sample.ps1 b/src/ResourceManager/Automation/Commands.Automation/StartupScripts/sample.ps1
new file mode 100644
index 000000000000..1a3d1052f460
--- /dev/null
+++ b/src/ResourceManager/Automation/Commands.Automation/StartupScripts/sample.ps1
@@ -0,0 +1 @@
+#Placeholder for future scripts: Please delete this file and uncomment Always within the block in the .csproj file.
\ No newline at end of file
diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Commands.AzureBackup.csproj b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Commands.AzureBackup.csproj
index e4f79524137a..324ef1315151 100644
--- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Commands.AzureBackup.csproj
+++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Commands.AzureBackup.csproj
@@ -141,6 +141,9 @@
Designer
+
+
+
diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/StartupScripts/sample.ps1 b/src/ResourceManager/AzureBackup/Commands.AzureBackup/StartupScripts/sample.ps1
new file mode 100644
index 000000000000..1a3d1052f460
--- /dev/null
+++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/StartupScripts/sample.ps1
@@ -0,0 +1 @@
+#Placeholder for future scripts: Please delete this file and uncomment Always within the block in the .csproj file.
\ No newline at end of file
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Commands.Batch.csproj b/src/ResourceManager/AzureBatch/Commands.Batch/Commands.Batch.csproj
index c2d5213d6d41..83c273d7bed6 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch/Commands.Batch.csproj
+++ b/src/ResourceManager/AzureBatch/Commands.Batch/Commands.Batch.csproj
@@ -218,6 +218,9 @@
Designer
+
+
+
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/StartupScripts/sample.ps1 b/src/ResourceManager/AzureBatch/Commands.Batch/StartupScripts/sample.ps1
new file mode 100644
index 000000000000..1a3d1052f460
--- /dev/null
+++ b/src/ResourceManager/AzureBatch/Commands.Batch/StartupScripts/sample.ps1
@@ -0,0 +1 @@
+#Placeholder for future scripts: Please delete this file and uncomment Always within the block in the .csproj file.
\ No newline at end of file
diff --git a/src/ResourceManager/Billing/Commands.Billing/Commands.Billing.csproj b/src/ResourceManager/Billing/Commands.Billing/Commands.Billing.csproj
index fbb0cae945b6..db2e43ec57dd 100644
--- a/src/ResourceManager/Billing/Commands.Billing/Commands.Billing.csproj
+++ b/src/ResourceManager/Billing/Commands.Billing/Commands.Billing.csproj
@@ -81,6 +81,9 @@
+
+
+
diff --git a/src/ResourceManager/Billing/Commands.Billing/StartupScripts/sample.ps1 b/src/ResourceManager/Billing/Commands.Billing/StartupScripts/sample.ps1
new file mode 100644
index 000000000000..1a3d1052f460
--- /dev/null
+++ b/src/ResourceManager/Billing/Commands.Billing/StartupScripts/sample.ps1
@@ -0,0 +1 @@
+#Placeholder for future scripts: Please delete this file and uncomment Always within the block in the .csproj file.
\ No newline at end of file
diff --git a/src/ResourceManager/Cdn/AzureRM.Cdn.psd1 b/src/ResourceManager/Cdn/AzureRM.Cdn.psd1
index 3eae6f7c78a7..2ec5b8cedf58 100644
--- a/src/ResourceManager/Cdn/AzureRM.Cdn.psd1
+++ b/src/ResourceManager/Cdn/AzureRM.Cdn.psd1
@@ -91,7 +91,7 @@ CmdletsToExport = 'Get-AzureRmCdnProfile', 'Get-AzureRmCdnProfileSsoUrl',
# VariablesToExport = @()
# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
-AliasesToExport = @()
+AliasesToExport = 'Validate-AzureRmCdnCustomDomain'
# DSC resources to export from this module
# DscResourcesToExport = @()
diff --git a/src/ResourceManager/Cdn/Commands.Cdn/Commands.Cdn.csproj b/src/ResourceManager/Cdn/Commands.Cdn/Commands.Cdn.csproj
index 6377afc58e50..b64a1e28c105 100644
--- a/src/ResourceManager/Cdn/Commands.Cdn/Commands.Cdn.csproj
+++ b/src/ResourceManager/Cdn/Commands.Cdn/Commands.Cdn.csproj
@@ -138,8 +138,8 @@
Designer
-
- PreserveNewest
+
+ Always
diff --git a/src/ResourceManager/Cdn/Commands.Cdn/CustomDomain/NewAzureRmCdnCustomDomain.cs b/src/ResourceManager/Cdn/Commands.Cdn/CustomDomain/NewAzureRmCdnCustomDomain.cs
index 678465c44041..2328c316ee73 100644
--- a/src/ResourceManager/Cdn/Commands.Cdn/CustomDomain/NewAzureRmCdnCustomDomain.cs
+++ b/src/ResourceManager/Cdn/Commands.Cdn/CustomDomain/NewAzureRmCdnCustomDomain.cs
@@ -33,7 +33,7 @@
namespace Microsoft.Azure.Commands.Cdn.CustomDomain
{
[Cmdlet(VerbsCommon.New, "AzureRmCdnCustomDomain", DefaultParameterSetName = FieldsParameterSet, SupportsShouldProcess = true), OutputType(typeof(PSCustomDomain))]
- public class NewAzureRmCdnCustomDomain : AzureCdnCmdletBase, IModuleAssemblyInitializer
+ public class NewAzureRmCdnCustomDomain : AzureCdnCmdletBase
{
[Parameter(Mandatory = true, HelpMessage = "Host name (address) of the Azure CDN custom domain name.")]
[ValidateNotNullOrEmpty]
@@ -101,22 +101,5 @@ private void NewCustomDomain()
WriteVerbose(Resources.Success);
WriteObject(customDomain.ToPsCustomDomain());
}
-
- public void OnImport()
- {
- try
- {
- System.Management.Automation.PowerShell invoker = null;
- invoker = System.Management.Automation.PowerShell.Create(RunspaceMode.CurrentRunspace);
- invoker.AddScript(File.ReadAllText(FileUtilities.GetContentFilePath(
- Path.GetDirectoryName(AppDomain.CurrentDomain.BaseDirectory),
- "CdnStartup.ps1")));
- invoker.Invoke();
- }
- catch
- {
- // This may throw exception for tests, ignore.
- }
- }
}
}
diff --git a/src/ResourceManager/Cdn/Commands.Cdn/CdnStartup.ps1 b/src/ResourceManager/Cdn/Commands.Cdn/StartupScripts/CdnStartup.ps1
similarity index 93%
rename from src/ResourceManager/Cdn/Commands.Cdn/CdnStartup.ps1
rename to src/ResourceManager/Cdn/Commands.Cdn/StartupScripts/CdnStartup.ps1
index f42becd255ca..e5be28dbf106 100644
--- a/src/ResourceManager/Cdn/Commands.Cdn/CdnStartup.ps1
+++ b/src/ResourceManager/Cdn/Commands.Cdn/StartupScripts/CdnStartup.ps1
@@ -14,4 +14,4 @@
@{
"Validate-AzureRmCdnCustomDomain" = "Test-AzureRmCdnCustomDomain";
-}.GetEnumerator() | Select @{Name='Name'; Expression={$_.Key}}, @{Name='Value'; Expression={$_.Value}} | New-Alias -Description "AzureAlias"
+}.GetEnumerator() | Select @{Name='Name'; Expression={$_.Key}}, @{Name='Value'; Expression={$_.Value}} | Set-Alias -Description "AzureAlias"
diff --git a/src/ResourceManager/CognitiveServices/Commands.Management.CognitiveServices/Commands.Management.CognitiveServices.csproj b/src/ResourceManager/CognitiveServices/Commands.Management.CognitiveServices/Commands.Management.CognitiveServices.csproj
index 3d015b5cfc96..d018952544d3 100644
--- a/src/ResourceManager/CognitiveServices/Commands.Management.CognitiveServices/Commands.Management.CognitiveServices.csproj
+++ b/src/ResourceManager/CognitiveServices/Commands.Management.CognitiveServices/Commands.Management.CognitiveServices.csproj
@@ -86,6 +86,9 @@
Designer
+
+
+
diff --git a/src/ResourceManager/CognitiveServices/Commands.Management.CognitiveServices/StartupScripts/sample.ps1 b/src/ResourceManager/CognitiveServices/Commands.Management.CognitiveServices/StartupScripts/sample.ps1
new file mode 100644
index 000000000000..1a3d1052f460
--- /dev/null
+++ b/src/ResourceManager/CognitiveServices/Commands.Management.CognitiveServices/StartupScripts/sample.ps1
@@ -0,0 +1 @@
+#Placeholder for future scripts: Please delete this file and uncomment Always within the block in the .csproj file.
\ No newline at end of file
diff --git a/src/ResourceManager/Compute/Commands.Compute/Commands.Compute.csproj b/src/ResourceManager/Compute/Commands.Compute/Commands.Compute.csproj
index bffe3c5fef00..5c0df9db514d 100644
--- a/src/ResourceManager/Compute/Commands.Compute/Commands.Compute.csproj
+++ b/src/ResourceManager/Compute/Commands.Compute/Commands.Compute.csproj
@@ -368,6 +368,9 @@
Designer
+
+
+
diff --git a/src/ResourceManager/Compute/Commands.Compute/StartupScripts/sample.ps1 b/src/ResourceManager/Compute/Commands.Compute/StartupScripts/sample.ps1
new file mode 100644
index 000000000000..1a3d1052f460
--- /dev/null
+++ b/src/ResourceManager/Compute/Commands.Compute/StartupScripts/sample.ps1
@@ -0,0 +1 @@
+#Placeholder for future scripts: Please delete this file and uncomment Always within the block in the .csproj file.
\ No newline at end of file
diff --git a/src/ResourceManager/Compute/Stack/Commands.Compute/Commands.Compute.csproj b/src/ResourceManager/Compute/Stack/Commands.Compute/Commands.Compute.csproj
index f486a93e8638..d4a2fc2a70dd 100644
--- a/src/ResourceManager/Compute/Stack/Commands.Compute/Commands.Compute.csproj
+++ b/src/ResourceManager/Compute/Stack/Commands.Compute/Commands.Compute.csproj
@@ -471,6 +471,9 @@
Designer
+
+
+
diff --git a/src/ResourceManager/Compute/Stack/Commands.Compute/StartupScripts/sample.ps1 b/src/ResourceManager/Compute/Stack/Commands.Compute/StartupScripts/sample.ps1
new file mode 100644
index 000000000000..1a3d1052f460
--- /dev/null
+++ b/src/ResourceManager/Compute/Stack/Commands.Compute/StartupScripts/sample.ps1
@@ -0,0 +1 @@
+#Placeholder for future scripts: Please delete this file and uncomment Always within the block in the .csproj file.
\ No newline at end of file
diff --git a/src/ResourceManager/Consumption/Commands.Consumption/Commands.Consumption.csproj b/src/ResourceManager/Consumption/Commands.Consumption/Commands.Consumption.csproj
index 8786bbc85c03..cc8b043c8d4d 100644
--- a/src/ResourceManager/Consumption/Commands.Consumption/Commands.Consumption.csproj
+++ b/src/ResourceManager/Consumption/Commands.Consumption/Commands.Consumption.csproj
@@ -81,6 +81,9 @@
+
+
+
diff --git a/src/ResourceManager/Consumption/Commands.Consumption/StartupScripts/sample.ps1 b/src/ResourceManager/Consumption/Commands.Consumption/StartupScripts/sample.ps1
new file mode 100644
index 000000000000..1a3d1052f460
--- /dev/null
+++ b/src/ResourceManager/Consumption/Commands.Consumption/StartupScripts/sample.ps1
@@ -0,0 +1 @@
+#Placeholder for future scripts: Please delete this file and uncomment Always within the block in the .csproj file.
\ No newline at end of file
diff --git a/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/Commands.ContainerInstance.csproj b/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/Commands.ContainerInstance.csproj
index 3e0b40236df6..5a197ddc5b0b 100644
--- a/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/Commands.ContainerInstance.csproj
+++ b/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/Commands.ContainerInstance.csproj
@@ -86,6 +86,9 @@
Designer
+
+
+
AzureRM.ContainerInstance.psd1
PreserveNewest
diff --git a/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/StartupScripts/sample.ps1 b/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/StartupScripts/sample.ps1
new file mode 100644
index 000000000000..1a3d1052f460
--- /dev/null
+++ b/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/StartupScripts/sample.ps1
@@ -0,0 +1 @@
+#Placeholder for future scripts: Please delete this file and uncomment Always within the block in the .csproj file.
\ No newline at end of file
diff --git a/src/ResourceManager/ContainerRegistry/Commands.ContainerRegistry/Commands.ContainerRegistry.csproj b/src/ResourceManager/ContainerRegistry/Commands.ContainerRegistry/Commands.ContainerRegistry.csproj
index af78219f9a35..c9aa29dbf1bc 100644
--- a/src/ResourceManager/ContainerRegistry/Commands.ContainerRegistry/Commands.ContainerRegistry.csproj
+++ b/src/ResourceManager/ContainerRegistry/Commands.ContainerRegistry/Commands.ContainerRegistry.csproj
@@ -88,6 +88,9 @@
+
+
+
diff --git a/src/ResourceManager/ContainerRegistry/Commands.ContainerRegistry/StartupScripts/sample.ps1 b/src/ResourceManager/ContainerRegistry/Commands.ContainerRegistry/StartupScripts/sample.ps1
new file mode 100644
index 000000000000..1a3d1052f460
--- /dev/null
+++ b/src/ResourceManager/ContainerRegistry/Commands.ContainerRegistry/StartupScripts/sample.ps1
@@ -0,0 +1 @@
+#Placeholder for future scripts: Please delete this file and uncomment Always within the block in the .csproj file.
\ No newline at end of file
diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Commands.DataFactories.csproj b/src/ResourceManager/DataFactories/Commands.DataFactories/Commands.DataFactories.csproj
index a116853d3fa4..76c01f5f976c 100644
--- a/src/ResourceManager/DataFactories/Commands.DataFactories/Commands.DataFactories.csproj
+++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Commands.DataFactories.csproj
@@ -171,6 +171,9 @@
Designer
+
+
+
diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/StartupScripts/sample.ps1 b/src/ResourceManager/DataFactories/Commands.DataFactories/StartupScripts/sample.ps1
new file mode 100644
index 000000000000..1a3d1052f460
--- /dev/null
+++ b/src/ResourceManager/DataFactories/Commands.DataFactories/StartupScripts/sample.ps1
@@ -0,0 +1 @@
+#Placeholder for future scripts: Please delete this file and uncomment Always within the block in the .csproj file.
\ No newline at end of file
diff --git a/src/ResourceManager/DataFactories/Commands.DataFactoryV2/Commands.DataFactoryV2.csproj b/src/ResourceManager/DataFactories/Commands.DataFactoryV2/Commands.DataFactoryV2.csproj
index 76ce4311cc86..1e917d2e0fb3 100644
--- a/src/ResourceManager/DataFactories/Commands.DataFactoryV2/Commands.DataFactoryV2.csproj
+++ b/src/ResourceManager/DataFactories/Commands.DataFactoryV2/Commands.DataFactoryV2.csproj
@@ -169,6 +169,9 @@
Designer
+
+
+
diff --git a/src/ResourceManager/DataFactories/Commands.DataFactoryV2/StartupScripts/sample.ps1 b/src/ResourceManager/DataFactories/Commands.DataFactoryV2/StartupScripts/sample.ps1
new file mode 100644
index 000000000000..1a3d1052f460
--- /dev/null
+++ b/src/ResourceManager/DataFactories/Commands.DataFactoryV2/StartupScripts/sample.ps1
@@ -0,0 +1 @@
+#Placeholder for future scripts: Please delete this file and uncomment Always within the block in the .csproj file.
\ No newline at end of file
diff --git a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands.DataLakeAnalytics.csproj b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands.DataLakeAnalytics.csproj
index d6cfc15b2324..4f06fae97528 100644
--- a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands.DataLakeAnalytics.csproj
+++ b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands.DataLakeAnalytics.csproj
@@ -111,6 +111,9 @@
+
+
+
diff --git a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/StartupScripts/sample.ps1 b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/StartupScripts/sample.ps1
new file mode 100644
index 000000000000..1a3d1052f460
--- /dev/null
+++ b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/StartupScripts/sample.ps1
@@ -0,0 +1 @@
+#Placeholder for future scripts: Please delete this file and uncomment Always within the block in the .csproj file.
\ No newline at end of file
diff --git a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands.DataLakeStore.csproj b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands.DataLakeStore.csproj
index 640ae43a9b3d..181e1460cec5 100644
--- a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands.DataLakeStore.csproj
+++ b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands.DataLakeStore.csproj
@@ -117,6 +117,9 @@
+
+
+
diff --git a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/StartupScripts/sample.ps1 b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/StartupScripts/sample.ps1
new file mode 100644
index 000000000000..1a3d1052f460
--- /dev/null
+++ b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore/StartupScripts/sample.ps1
@@ -0,0 +1 @@
+#Placeholder for future scripts: Please delete this file and uncomment Always within the block in the .csproj file.
\ No newline at end of file
diff --git a/src/ResourceManager/DevTestLabs/Commands.DevTestLabs/Commands.DevTestLabs.csproj b/src/ResourceManager/DevTestLabs/Commands.DevTestLabs/Commands.DevTestLabs.csproj
index cf1c268c0dbe..7ee8854579a4 100644
--- a/src/ResourceManager/DevTestLabs/Commands.DevTestLabs/Commands.DevTestLabs.csproj
+++ b/src/ResourceManager/DevTestLabs/Commands.DevTestLabs/Commands.DevTestLabs.csproj
@@ -81,6 +81,9 @@
Designer
+
+
+
diff --git a/src/ResourceManager/DevTestLabs/Commands.DevTestLabs/StartupScripts/sample.ps1 b/src/ResourceManager/DevTestLabs/Commands.DevTestLabs/StartupScripts/sample.ps1
new file mode 100644
index 000000000000..1a3d1052f460
--- /dev/null
+++ b/src/ResourceManager/DevTestLabs/Commands.DevTestLabs/StartupScripts/sample.ps1
@@ -0,0 +1 @@
+#Placeholder for future scripts: Please delete this file and uncomment Always within the block in the .csproj file.
\ No newline at end of file
diff --git a/src/ResourceManager/Dns/Commands.Dns/Commands.Dns.csproj b/src/ResourceManager/Dns/Commands.Dns/Commands.Dns.csproj
index 3e778e7f6f6a..14b74e9f4e48 100644
--- a/src/ResourceManager/Dns/Commands.Dns/Commands.Dns.csproj
+++ b/src/ResourceManager/Dns/Commands.Dns/Commands.Dns.csproj
@@ -80,6 +80,9 @@
Designer
+
+
+
diff --git a/src/ResourceManager/Dns/Commands.Dns/StartupScripts/sample.ps1 b/src/ResourceManager/Dns/Commands.Dns/StartupScripts/sample.ps1
new file mode 100644
index 000000000000..1a3d1052f460
--- /dev/null
+++ b/src/ResourceManager/Dns/Commands.Dns/StartupScripts/sample.ps1
@@ -0,0 +1 @@
+#Placeholder for future scripts: Please delete this file and uncomment Always within the block in the .csproj file.
\ No newline at end of file
diff --git a/src/ResourceManager/EventGrid/Commands.EventGrid/Commands.EventGrid.csproj b/src/ResourceManager/EventGrid/Commands.EventGrid/Commands.EventGrid.csproj
index f53718800ea8..3a596e74c274 100644
--- a/src/ResourceManager/EventGrid/Commands.EventGrid/Commands.EventGrid.csproj
+++ b/src/ResourceManager/EventGrid/Commands.EventGrid/Commands.EventGrid.csproj
@@ -91,6 +91,9 @@
+
+
+
diff --git a/src/ResourceManager/EventGrid/Commands.EventGrid/StartupScripts/sample.ps1 b/src/ResourceManager/EventGrid/Commands.EventGrid/StartupScripts/sample.ps1
new file mode 100644
index 000000000000..1a3d1052f460
--- /dev/null
+++ b/src/ResourceManager/EventGrid/Commands.EventGrid/StartupScripts/sample.ps1
@@ -0,0 +1 @@
+#Placeholder for future scripts: Please delete this file and uncomment Always within the block in the .csproj file.
\ No newline at end of file
diff --git a/src/ResourceManager/EventHub/Commands.EventHub/Commands.EventHub.csproj b/src/ResourceManager/EventHub/Commands.EventHub/Commands.EventHub.csproj
index 218885ca209d..76ebc5b1a61f 100644
--- a/src/ResourceManager/EventHub/Commands.EventHub/Commands.EventHub.csproj
+++ b/src/ResourceManager/EventHub/Commands.EventHub/Commands.EventHub.csproj
@@ -93,6 +93,9 @@
Designer
+
+
+
diff --git a/src/ResourceManager/EventHub/Commands.EventHub/StartupScripts/sample.ps1 b/src/ResourceManager/EventHub/Commands.EventHub/StartupScripts/sample.ps1
new file mode 100644
index 000000000000..1a3d1052f460
--- /dev/null
+++ b/src/ResourceManager/EventHub/Commands.EventHub/StartupScripts/sample.ps1
@@ -0,0 +1 @@
+#Placeholder for future scripts: Please delete this file and uncomment Always within the block in the .csproj file.
\ No newline at end of file
diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight/Commands.HDInsight.csproj b/src/ResourceManager/HDInsight/Commands.HDInsight/Commands.HDInsight.csproj
index 184851092bb6..e14e0f28f676 100644
--- a/src/ResourceManager/HDInsight/Commands.HDInsight/Commands.HDInsight.csproj
+++ b/src/ResourceManager/HDInsight/Commands.HDInsight/Commands.HDInsight.csproj
@@ -111,9 +111,6 @@
AzureRM.HDInsight.psd1
PreserveNewest
-
- PreserveNewest
-
Never
@@ -121,6 +118,9 @@
Designer
+
+ Always
+
diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/EnableAzureHDInsightOMSCommand.cs b/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/EnableAzureHDInsightOMSCommand.cs
index 0f59fefc7a08..aef33769ade9 100644
--- a/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/EnableAzureHDInsightOMSCommand.cs
+++ b/src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/EnableAzureHDInsightOMSCommand.cs
@@ -29,7 +29,7 @@ namespace Microsoft.Azure.Commands.HDInsight
SupportsShouldProcess = true)]
[Alias("Enable-AzureRmHDInsightOMS")]
[OutputType(typeof(OperationResource))]
- public class EnableAzureHDInsightOMSCommand : HDInsightCmdletBase, IModuleAssemblyInitializer
+ public class EnableAzureHDInsightOMSCommand : HDInsightCmdletBase
{
#region Input Parameter Definitions
@@ -81,25 +81,5 @@ public override void ExecuteCmdlet()
WriteObject(operationResource);
}
}
-
- ///
- /// Load global aliases for HDInsight
- ///
- public void OnImport()
- {
- try
- {
- System.Management.Automation.PowerShell invoker = null;
- invoker = System.Management.Automation.PowerShell.Create(RunspaceMode.CurrentRunspace);
- invoker.AddScript(File.ReadAllText(FileUtilities.GetContentFilePath(
- Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location),
- "AzureRmHDInsightStartup.ps1")));
- invoker.Invoke();
- }
- catch
- {
- // This may throw exception for tests, ignore.
- }
- }
}
}
diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight/AzureRmHDInsightStartup.ps1 b/src/ResourceManager/HDInsight/Commands.HDInsight/StartupScripts/AzureRmHDInsightStartup.ps1
similarity index 94%
rename from src/ResourceManager/HDInsight/Commands.HDInsight/AzureRmHDInsightStartup.ps1
rename to src/ResourceManager/HDInsight/Commands.HDInsight/StartupScripts/AzureRmHDInsightStartup.ps1
index 63ff349c3b6a..bf3fcc06e765 100644
--- a/src/ResourceManager/HDInsight/Commands.HDInsight/AzureRmHDInsightStartup.ps1
+++ b/src/ResourceManager/HDInsight/Commands.HDInsight/StartupScripts/AzureRmHDInsightStartup.ps1
@@ -16,4 +16,4 @@
"Enable-AzureRmHDInsightOMS" = "Enable-AzureRmHDInsightOperationsManagementSuite";
"Disable-AzureRmHDInsightOMS" = "Disable-AzureRmHDInsightOperationsManagementSuite";
"Get-AzureRmHDInsightOMS" = "Get-AzureRmHDInsightOperationsManagementSuite";
-}.GetEnumerator() | Select @{Name='Name'; Expression={$_.Key}}, @{Name='Value'; Expression={$_.Value}} | New-Alias -Description "AzureAlias"
+}.GetEnumerator() | Select @{Name='Name'; Expression={$_.Key}}, @{Name='Value'; Expression={$_.Value}} | Set-Alias -Description "AzureAlias"
diff --git a/src/ResourceManager/Insights/Commands.Insights/Commands.Insights.csproj b/src/ResourceManager/Insights/Commands.Insights/Commands.Insights.csproj
index e77c41e97ad6..034ec695cdbc 100644
--- a/src/ResourceManager/Insights/Commands.Insights/Commands.Insights.csproj
+++ b/src/ResourceManager/Insights/Commands.Insights/Commands.Insights.csproj
@@ -172,6 +172,9 @@
Designer
+
+
+
diff --git a/src/ResourceManager/Insights/Commands.Insights/StartupScripts/sample.ps1 b/src/ResourceManager/Insights/Commands.Insights/StartupScripts/sample.ps1
new file mode 100644
index 000000000000..1a3d1052f460
--- /dev/null
+++ b/src/ResourceManager/Insights/Commands.Insights/StartupScripts/sample.ps1
@@ -0,0 +1 @@
+#Placeholder for future scripts: Please delete this file and uncomment Always within the block in the .csproj file.
\ No newline at end of file
diff --git a/src/ResourceManager/IotHub/Commands.IotHub/Commands.IotHub.csproj b/src/ResourceManager/IotHub/Commands.IotHub/Commands.IotHub.csproj
index 97896a205662..433157345b9c 100644
--- a/src/ResourceManager/IotHub/Commands.IotHub/Commands.IotHub.csproj
+++ b/src/ResourceManager/IotHub/Commands.IotHub/Commands.IotHub.csproj
@@ -150,6 +150,9 @@
PreserveNewest
+
+
+
diff --git a/src/ResourceManager/IotHub/Commands.IotHub/StartupScripts/sample.ps1 b/src/ResourceManager/IotHub/Commands.IotHub/StartupScripts/sample.ps1
new file mode 100644
index 000000000000..1a3d1052f460
--- /dev/null
+++ b/src/ResourceManager/IotHub/Commands.IotHub/StartupScripts/sample.ps1
@@ -0,0 +1 @@
+#Placeholder for future scripts: Please delete this file and uncomment Always within the block in the .csproj file.
\ No newline at end of file
diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault/Commands.KeyVault.csproj b/src/ResourceManager/KeyVault/Commands.KeyVault/Commands.KeyVault.csproj
index 26194e89958d..5ae0fc00400a 100644
--- a/src/ResourceManager/KeyVault/Commands.KeyVault/Commands.KeyVault.csproj
+++ b/src/ResourceManager/KeyVault/Commands.KeyVault/Commands.KeyVault.csproj
@@ -140,6 +140,9 @@
Designer
+
+
+
diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault/StartupScripts/sample.ps1 b/src/ResourceManager/KeyVault/Commands.KeyVault/StartupScripts/sample.ps1
new file mode 100644
index 000000000000..1a3d1052f460
--- /dev/null
+++ b/src/ResourceManager/KeyVault/Commands.KeyVault/StartupScripts/sample.ps1
@@ -0,0 +1 @@
+#Placeholder for future scripts: Please delete this file and uncomment Always within the block in the .csproj file.
\ No newline at end of file
diff --git a/src/ResourceManager/LogicApp/Commands.LogicApp/Commands.LogicApp.csproj b/src/ResourceManager/LogicApp/Commands.LogicApp/Commands.LogicApp.csproj
index 98a95737e963..758d36a12d37 100644
--- a/src/ResourceManager/LogicApp/Commands.LogicApp/Commands.LogicApp.csproj
+++ b/src/ResourceManager/LogicApp/Commands.LogicApp/Commands.LogicApp.csproj
@@ -144,6 +144,9 @@
Designer
+
+
+
diff --git a/src/ResourceManager/LogicApp/Commands.LogicApp/StartupScripts/sample.ps1 b/src/ResourceManager/LogicApp/Commands.LogicApp/StartupScripts/sample.ps1
new file mode 100644
index 000000000000..1a3d1052f460
--- /dev/null
+++ b/src/ResourceManager/LogicApp/Commands.LogicApp/StartupScripts/sample.ps1
@@ -0,0 +1 @@
+#Placeholder for future scripts: Please delete this file and uncomment Always within the block in the .csproj file.
\ No newline at end of file
diff --git a/src/ResourceManager/MachineLearning/Commands.MachineLearning/Commands.MachineLearning.csproj b/src/ResourceManager/MachineLearning/Commands.MachineLearning/Commands.MachineLearning.csproj
index 1009ec611e8c..74d8571d9c41 100644
--- a/src/ResourceManager/MachineLearning/Commands.MachineLearning/Commands.MachineLearning.csproj
+++ b/src/ResourceManager/MachineLearning/Commands.MachineLearning/Commands.MachineLearning.csproj
@@ -108,6 +108,9 @@
Designer
+
+
+
diff --git a/src/ResourceManager/MachineLearning/Commands.MachineLearning/StartupScripts/sample.ps1 b/src/ResourceManager/MachineLearning/Commands.MachineLearning/StartupScripts/sample.ps1
new file mode 100644
index 000000000000..1a3d1052f460
--- /dev/null
+++ b/src/ResourceManager/MachineLearning/Commands.MachineLearning/StartupScripts/sample.ps1
@@ -0,0 +1 @@
+#Placeholder for future scripts: Please delete this file and uncomment Always within the block in the .csproj file.
\ No newline at end of file
diff --git a/src/ResourceManager/MachineLearningCompute/Commands.MachineLearningCompute/Commands.MachineLearningCompute.csproj b/src/ResourceManager/MachineLearningCompute/Commands.MachineLearningCompute/Commands.MachineLearningCompute.csproj
index bf42da90f378..8b37c6664204 100644
--- a/src/ResourceManager/MachineLearningCompute/Commands.MachineLearningCompute/Commands.MachineLearningCompute.csproj
+++ b/src/ResourceManager/MachineLearningCompute/Commands.MachineLearningCompute/Commands.MachineLearningCompute.csproj
@@ -97,6 +97,9 @@
+
+
+
diff --git a/src/ResourceManager/MachineLearningCompute/Commands.MachineLearningCompute/StartupScripts/sample.ps1 b/src/ResourceManager/MachineLearningCompute/Commands.MachineLearningCompute/StartupScripts/sample.ps1
new file mode 100644
index 000000000000..1a3d1052f460
--- /dev/null
+++ b/src/ResourceManager/MachineLearningCompute/Commands.MachineLearningCompute/StartupScripts/sample.ps1
@@ -0,0 +1 @@
+#Placeholder for future scripts: Please delete this file and uncomment Always within the block in the .csproj file.
\ No newline at end of file
diff --git a/src/ResourceManager/MarketplaceOrdering/Commands.MarketplaceOrdering/Commands.MarketplaceOrdering.csproj b/src/ResourceManager/MarketplaceOrdering/Commands.MarketplaceOrdering/Commands.MarketplaceOrdering.csproj
index 38ca6467996e..b28ff7d71707 100644
--- a/src/ResourceManager/MarketplaceOrdering/Commands.MarketplaceOrdering/Commands.MarketplaceOrdering.csproj
+++ b/src/ResourceManager/MarketplaceOrdering/Commands.MarketplaceOrdering/Commands.MarketplaceOrdering.csproj
@@ -80,6 +80,9 @@
+
+
+
diff --git a/src/ResourceManager/MarketplaceOrdering/Commands.MarketplaceOrdering/StartupScripts/sample.ps1 b/src/ResourceManager/MarketplaceOrdering/Commands.MarketplaceOrdering/StartupScripts/sample.ps1
new file mode 100644
index 000000000000..1a3d1052f460
--- /dev/null
+++ b/src/ResourceManager/MarketplaceOrdering/Commands.MarketplaceOrdering/StartupScripts/sample.ps1
@@ -0,0 +1 @@
+#Placeholder for future scripts: Please delete this file and uncomment Always within the block in the .csproj file.
\ No newline at end of file
diff --git a/src/ResourceManager/Media/Commands.Media/Commands.Media.csproj b/src/ResourceManager/Media/Commands.Media/Commands.Media.csproj
index 9e673bb2fdf1..1bcbbd2a4c33 100644
--- a/src/ResourceManager/Media/Commands.Media/Commands.Media.csproj
+++ b/src/ResourceManager/Media/Commands.Media/Commands.Media.csproj
@@ -100,6 +100,9 @@
Designer
+
+
+
diff --git a/src/ResourceManager/Media/Commands.Media/StartupScripts/sample.ps1 b/src/ResourceManager/Media/Commands.Media/StartupScripts/sample.ps1
new file mode 100644
index 000000000000..1a3d1052f460
--- /dev/null
+++ b/src/ResourceManager/Media/Commands.Media/StartupScripts/sample.ps1
@@ -0,0 +1 @@
+#Placeholder for future scripts: Please delete this file and uncomment Always within the block in the .csproj file.
\ No newline at end of file
diff --git a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/GetAzureApplicationGatewayAvailableWafRuleSets.cs b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/GetAzureApplicationGatewayAvailableWafRuleSets.cs
index 67b07e73cbed..5c00646b2946 100644
--- a/src/ResourceManager/Network/Commands.Network/ApplicationGateway/GetAzureApplicationGatewayAvailableWafRuleSets.cs
+++ b/src/ResourceManager/Network/Commands.Network/ApplicationGateway/GetAzureApplicationGatewayAvailableWafRuleSets.cs
@@ -27,7 +27,7 @@ namespace Microsoft.Azure.Commands.Network
[Cmdlet(VerbsCommon.Get, "AzureRmApplicationGatewayAvailableWafRuleSets"),
OutputType(typeof(PSApplicationGatewayAvailableWafRuleSetsResult))]
[Alias("List-AzureRmApplicationGatewayAvailableWafRuleSets")]
- public class GetAzureApplicationGatewayAvailableWafRuleSets : ApplicationGatewayBaseCmdlet, IModuleAssemblyInitializer
+ public class GetAzureApplicationGatewayAvailableWafRuleSets : ApplicationGatewayBaseCmdlet
{
public override void ExecuteCmdlet()
{
@@ -37,26 +37,6 @@ public override void ExecuteCmdlet()
var psAvailableWafRuleSets = NetworkResourceManagerProfile.Mapper.Map(availableWafRuleSets);
WriteObject(psAvailableWafRuleSets);
}
-
- ///
- /// Setup necessary functionality when module gets imported.
- ///
- public void OnImport()
- {
- try
- {
- System.Management.Automation.PowerShell invoker = null;
- invoker = System.Management.Automation.PowerShell.Create(RunspaceMode.CurrentRunspace);
- invoker.AddScript(File.ReadAllText(FileUtilities.GetContentFilePath(
- Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location),
- "AzureRmNetworkStartup.ps1")));
- invoker.Invoke();
- }
- catch
- {
- // This will throw exception for tests, ignore.
- }
- }
}
}
diff --git a/src/ResourceManager/Network/Commands.Network/Commands.Network.csproj b/src/ResourceManager/Network/Commands.Network/Commands.Network.csproj
index a3d5512ddfd2..0e022f5d0402 100644
--- a/src/ResourceManager/Network/Commands.Network/Commands.Network.csproj
+++ b/src/ResourceManager/Network/Commands.Network/Commands.Network.csproj
@@ -567,9 +567,6 @@
AzureRM.Network.psd1
PreserveNewest
-
- PreserveNewest
-
Always
@@ -581,6 +578,9 @@
Designer
+
+ Always
+
diff --git a/src/ResourceManager/Network/Commands.Network/AzureRmNetworkStartup.ps1 b/src/ResourceManager/Network/Commands.Network/StartupScripts/AzureRmNetworkStartup.ps1
similarity index 94%
rename from src/ResourceManager/Network/Commands.Network/AzureRmNetworkStartup.ps1
rename to src/ResourceManager/Network/Commands.Network/StartupScripts/AzureRmNetworkStartup.ps1
index 61dcf07cdefb..b54b7293b48f 100644
--- a/src/ResourceManager/Network/Commands.Network/AzureRmNetworkStartup.ps1
+++ b/src/ResourceManager/Network/Commands.Network/StartupScripts/AzureRmNetworkStartup.ps1
@@ -16,4 +16,4 @@
"List-AzureRmApplicationGatewayAvailableWafRuleSets" = "Get-AzureRmApplicationGatewayAvailableWafRuleSets"
"List-AzureRmApplicationGatewayAvailableSslOptions" = "Get-AzureRmApplicationGatewayAvailableSslOptions"
"List-AzureRmApplicationGatewaySslPredefinedPolicy" = "Get-AzureRmApplicationGatewaySslPredefinedPolicy"
-}.GetEnumerator() | Select @{Name='Name'; Expression={$_.Key}}, @{Name='Value'; Expression={$_.Value}} | New-Alias -Description "AzureAlias"
\ No newline at end of file
+}.GetEnumerator() | Select @{Name='Name'; Expression={$_.Key}}, @{Name='Value'; Expression={$_.Value}} | Set-Alias -Description "AzureAlias"
\ No newline at end of file
diff --git a/src/ResourceManager/Network/Stack/Commands.Network/AzureRmNetworkStartup.ps1 b/src/ResourceManager/Network/Stack/Commands.Network/AzureRmNetworkStartup.ps1
deleted file mode 100644
index 61dcf07cdefb..000000000000
--- a/src/ResourceManager/Network/Stack/Commands.Network/AzureRmNetworkStartup.ps1
+++ /dev/null
@@ -1,19 +0,0 @@
-# ----------------------------------------------------------------------------------
-#
-# Copyright Microsoft Corporation
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-# http://www.apache.org/licenses/LICENSE-2.0
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# ----------------------------------------------------------------------------------
-
-@{
- "List-AzureRmApplicationGatewayAvailableWafRuleSets" = "Get-AzureRmApplicationGatewayAvailableWafRuleSets"
- "List-AzureRmApplicationGatewayAvailableSslOptions" = "Get-AzureRmApplicationGatewayAvailableSslOptions"
- "List-AzureRmApplicationGatewaySslPredefinedPolicy" = "Get-AzureRmApplicationGatewaySslPredefinedPolicy"
-}.GetEnumerator() | Select @{Name='Name'; Expression={$_.Key}}, @{Name='Value'; Expression={$_.Value}} | New-Alias -Description "AzureAlias"
\ No newline at end of file
diff --git a/src/ResourceManager/Network/Stack/Commands.Network/Commands.Network.csproj b/src/ResourceManager/Network/Stack/Commands.Network/Commands.Network.csproj
index 2ac20806d208..bc24fb7504b2 100644
--- a/src/ResourceManager/Network/Stack/Commands.Network/Commands.Network.csproj
+++ b/src/ResourceManager/Network/Stack/Commands.Network/Commands.Network.csproj
@@ -530,9 +530,6 @@
AzureRM.Network.psd1
PreserveNewest
-
- PreserveNewest
-
Always
@@ -544,6 +541,9 @@
Designer
+
+
+
diff --git a/src/ResourceManager/Network/Stack/Commands.Network/StartupScripts/sample.ps1 b/src/ResourceManager/Network/Stack/Commands.Network/StartupScripts/sample.ps1
new file mode 100644
index 000000000000..1a3d1052f460
--- /dev/null
+++ b/src/ResourceManager/Network/Stack/Commands.Network/StartupScripts/sample.ps1
@@ -0,0 +1 @@
+#Placeholder for future scripts: Please delete this file and uncomment Always within the block in the .csproj file.
\ No newline at end of file
diff --git a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands.NotificationHubs.csproj b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands.NotificationHubs.csproj
index 789d976da2d3..8827ff4d0ee3 100644
--- a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands.NotificationHubs.csproj
+++ b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/Commands.NotificationHubs.csproj
@@ -88,6 +88,9 @@
Designer
+
+
+
diff --git a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/StartupScripts/sample.ps1 b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/StartupScripts/sample.ps1
new file mode 100644
index 000000000000..1a3d1052f460
--- /dev/null
+++ b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs/StartupScripts/sample.ps1
@@ -0,0 +1 @@
+#Placeholder for future scripts: Please delete this file and uncomment Always within the block in the .csproj file.
\ No newline at end of file
diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Commands.OperationalInsights.csproj b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Commands.OperationalInsights.csproj
index 2dac8fa89870..75ee5f041864 100644
--- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Commands.OperationalInsights.csproj
+++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Commands.OperationalInsights.csproj
@@ -164,12 +164,12 @@
Designer
-
- PreserveNewest
-
Designer
+
+ Always
+
diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/DataSources/NewDataSourceCmdletsPerKind/NewAzureOperationalInsightsAzureActivityLogDataSourceCommand.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/DataSources/NewDataSourceCmdletsPerKind/NewAzureOperationalInsightsAzureActivityLogDataSourceCommand.cs
index d1bc2eb5c078..20b587c78fa7 100644
--- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/DataSources/NewDataSourceCmdletsPerKind/NewAzureOperationalInsightsAzureActivityLogDataSourceCommand.cs
+++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/DataSources/NewDataSourceCmdletsPerKind/NewAzureOperationalInsightsAzureActivityLogDataSourceCommand.cs
@@ -30,7 +30,7 @@ namespace Microsoft.Azure.Commands.OperationalInsights
[Cmdlet(VerbsCommon.New, "AzureRmOperationalInsightsAzureActivityLogDataSource", SupportsShouldProcess = true,
DefaultParameterSetName = ByWorkspaceName), OutputType(typeof(PSDataSource))]
[Alias("New-AzureRmOperationalInsightsAzureAuditDataSource")]
- public class NewAzureOperationalInsightsAzureActivityLogDataSourceCommand : NewAzureOperationalInsightsDataSourceBaseCmdlet, IModuleAssemblyInitializer
+ public class NewAzureOperationalInsightsAzureActivityLogDataSourceCommand : NewAzureOperationalInsightsDataSourceBaseCmdlet
{
[Parameter(Position = 0, ParameterSetName = ByWorkspaceObject, Mandatory = true, ValueFromPipeline = true,
HelpMessage = "The workspace that will contain the data source.")]
@@ -76,27 +76,5 @@ public override void ExecuteCmdlet()
CreatePSDataSourceWithProperties(auditLogProperties);
}
-
-
- ///
- /// Load global aliases for ARM
- ///
- public void OnImport()
- {
- try
- {
- System.Management.Automation.PowerShell invoker = null;
- invoker = System.Management.Automation.PowerShell.Create(RunspaceMode.CurrentRunspace);
- invoker.AddScript(File.ReadAllText(FileUtilities.GetContentFilePath(
- Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location),
- "OperationalInsightsStartup.ps1")));
- invoker.Invoke();
- }
- catch
- {
- // This will throw exception for tests, ignore.
- }
-
- }
}
}
\ No newline at end of file
diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/OperationalInsightsStartup.ps1 b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/StartupScripts/OperationalInsightsStartup.ps1
similarity index 93%
rename from src/ResourceManager/OperationalInsights/Commands.OperationalInsights/OperationalInsightsStartup.ps1
rename to src/ResourceManager/OperationalInsights/Commands.OperationalInsights/StartupScripts/OperationalInsightsStartup.ps1
index 8e6356475c51..04ee885de090 100644
--- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/OperationalInsightsStartup.ps1
+++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights/StartupScripts/OperationalInsightsStartup.ps1
@@ -14,4 +14,4 @@
@{
"New-AzureRmOperationalInsightsAzureAuditDataSource" = "New-AzureRmOperationalInsightsAzureActivityLogDataSource";
-}.GetEnumerator() | Select @{Name='Name'; Expression={$_.Key}}, @{Name='Value'; Expression={$_.Value}} | New-Alias -Description "AzureAlias"
\ No newline at end of file
+}.GetEnumerator() | Select @{Name='Name'; Expression={$_.Key}}, @{Name='Value'; Expression={$_.Value}} | Set-Alias -Description "AzureAlias"
\ No newline at end of file
diff --git a/src/ResourceManager/PowerBIEmbedded/Commands.Management.PowerBIEmbedded/Commands.Management.PowerBIEmbedded.csproj b/src/ResourceManager/PowerBIEmbedded/Commands.Management.PowerBIEmbedded/Commands.Management.PowerBIEmbedded.csproj
index e6d2530bf728..c60786585b9f 100644
--- a/src/ResourceManager/PowerBIEmbedded/Commands.Management.PowerBIEmbedded/Commands.Management.PowerBIEmbedded.csproj
+++ b/src/ResourceManager/PowerBIEmbedded/Commands.Management.PowerBIEmbedded/Commands.Management.PowerBIEmbedded.csproj
@@ -123,6 +123,9 @@
+
+
+
diff --git a/src/ResourceManager/PowerBIEmbedded/Commands.Management.PowerBIEmbedded/StartupScripts/sample.ps1 b/src/ResourceManager/PowerBIEmbedded/Commands.Management.PowerBIEmbedded/StartupScripts/sample.ps1
new file mode 100644
index 000000000000..1a3d1052f460
--- /dev/null
+++ b/src/ResourceManager/PowerBIEmbedded/Commands.Management.PowerBIEmbedded/StartupScripts/sample.ps1
@@ -0,0 +1 @@
+#Placeholder for future scripts: Please delete this file and uncomment Always within the block in the .csproj file.
\ No newline at end of file
diff --git a/src/ResourceManager/Profile/AzureRM.Profile.psd1 b/src/ResourceManager/Profile/AzureRM.Profile.psd1
index 9d7935ee5f82..04416fb67ddc 100644
--- a/src/ResourceManager/Profile/AzureRM.Profile.psd1
+++ b/src/ResourceManager/Profile/AzureRM.Profile.psd1
@@ -112,8 +112,8 @@ CmdletsToExport = 'Disable-AzureRmDataCollection', 'Disable-AzureRmContextAutosa
# VariablesToExport = @()
# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
-AliasesToExport = 'Login-AzureRmAccount', 'Select-AzureRmSubscription', 'Resolve-Error',
- 'Logout-AzAccount', 'Logout-AzureRmAccount', 'Login-AzAccount'
+AliasesToExport = 'Login-AzureRmAccount', 'Select-AzureRmSubscription', 'Save-AzureRmProfile', 'Resolve-Error',
+ 'Logout-AzAccount', 'Logout-AzureRmAccount', 'Login-AzAccount', 'Select-AzureRmProfile'
# DSC resources to export from this module
# DscResourcesToExport = @()
diff --git a/src/ResourceManager/Profile/Commands.Profile/Account/AddAzureRmAccount.cs b/src/ResourceManager/Profile/Commands.Profile/Account/AddAzureRmAccount.cs
index 72a552315e27..ac499b32994b 100644
--- a/src/ResourceManager/Profile/Commands.Profile/Account/AddAzureRmAccount.cs
+++ b/src/ResourceManager/Profile/Commands.Profile/Account/AddAzureRmAccount.cs
@@ -266,11 +266,6 @@ public void OnImport()
#if DEBUG
}
#endif
- var invoker = System.Management.Automation.PowerShell.Create(RunspaceMode.CurrentRunspace);
- invoker.AddScript(File.ReadAllText(FileUtilities.GetContentFilePath(
- Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location),
- "AzureRmProfileStartup.ps1")));
- var result = invoker.Invoke();
bool autoSaveEnabled = AzureSession.Instance.ARMContextSaveMode == ContextSaveMode.CurrentUser;
var autosaveVariable = System.Environment.GetEnvironmentVariable(AzureProfileConstants.AzureAutosaveVariable);
diff --git a/src/ResourceManager/Profile/Commands.Profile/Commands.Profile.csproj b/src/ResourceManager/Profile/Commands.Profile/Commands.Profile.csproj
index fa800a6e8412..7811ec1486ee 100644
--- a/src/ResourceManager/Profile/Commands.Profile/Commands.Profile.csproj
+++ b/src/ResourceManager/Profile/Commands.Profile/Commands.Profile.csproj
@@ -127,15 +127,15 @@
AzureRM.Profile.psd1
PreserveNewest
-
- PreserveNewest
-
Designer
Always
+
+ Always
+
diff --git a/src/ResourceManager/Profile/Commands.Profile/AzureRmProfileStartup.ps1 b/src/ResourceManager/Profile/Commands.Profile/StartupScripts/AzureRmProfileStartup.ps1
similarity index 95%
rename from src/ResourceManager/Profile/Commands.Profile/AzureRmProfileStartup.ps1
rename to src/ResourceManager/Profile/Commands.Profile/StartupScripts/AzureRmProfileStartup.ps1
index 0dbbcdd4272e..4313d2bae874 100644
--- a/src/ResourceManager/Profile/Commands.Profile/AzureRmProfileStartup.ps1
+++ b/src/ResourceManager/Profile/Commands.Profile/StartupScripts/AzureRmProfileStartup.ps1
@@ -21,5 +21,5 @@
"Logout-AzAccount" = "Remove-AzureRmAccount";
"Logout-AzureRmAccount" = "Remove-AzureRmAccount";
"Login-AzAccount" = "Add-AzureRmAccount";
-}.GetEnumerator() | Select @{Name='Name'; Expression={$_.Key}}, @{Name='Value'; Expression={$_.Value}} | New-Alias -Description "AzureAlias" | Out-Null
+}.GetEnumerator() | Select @{Name='Name'; Expression={$_.Key}}, @{Name='Value'; Expression={$_.Value}} | Set-Alias -Description "AzureAlias" | Out-Null
diff --git a/src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup/Commands.RecoveryServices.Backup.Cmdlets.csproj b/src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup/Commands.RecoveryServices.Backup.Cmdlets.csproj
index 39fd4991d7f4..64aeefc196a1 100644
--- a/src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup/Commands.RecoveryServices.Backup.Cmdlets.csproj
+++ b/src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup/Commands.RecoveryServices.Backup.Cmdlets.csproj
@@ -124,6 +124,9 @@
+
+
+
diff --git a/src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup/StartupScripts/sample.ps1 b/src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup/StartupScripts/sample.ps1
new file mode 100644
index 000000000000..1a3d1052f460
--- /dev/null
+++ b/src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup/StartupScripts/sample.ps1
@@ -0,0 +1 @@
+#Placeholder for future scripts: Please delete this file and uncomment Always within the block in the .csproj file.
\ No newline at end of file
diff --git a/src/ResourceManager/RecoveryServices.SiteRecovery/Commands.RecoveryServices.SiteRecovery/Commands.RecoveryServices.SiteRecovery.csproj b/src/ResourceManager/RecoveryServices.SiteRecovery/Commands.RecoveryServices.SiteRecovery/Commands.RecoveryServices.SiteRecovery.csproj
index 14d771e2d675..4f339c13ce58 100644
--- a/src/ResourceManager/RecoveryServices.SiteRecovery/Commands.RecoveryServices.SiteRecovery/Commands.RecoveryServices.SiteRecovery.csproj
+++ b/src/ResourceManager/RecoveryServices.SiteRecovery/Commands.RecoveryServices.SiteRecovery/Commands.RecoveryServices.SiteRecovery.csproj
@@ -165,8 +165,8 @@
-
- PreserveNewest
+
+ Always
diff --git a/src/ResourceManager/RecoveryServices.SiteRecovery/Commands.RecoveryServices.SiteRecovery/RecoveryServicesAsrStartup.ps1 b/src/ResourceManager/RecoveryServices.SiteRecovery/Commands.RecoveryServices.SiteRecovery/StartupScripts/RecoveryServicesAsrStartup.ps1
similarity index 99%
rename from src/ResourceManager/RecoveryServices.SiteRecovery/Commands.RecoveryServices.SiteRecovery/RecoveryServicesAsrStartup.ps1
rename to src/ResourceManager/RecoveryServices.SiteRecovery/Commands.RecoveryServices.SiteRecovery/StartupScripts/RecoveryServicesAsrStartup.ps1
index 41defc9ecf11..7a0ef44ecec1 100644
--- a/src/ResourceManager/RecoveryServices.SiteRecovery/Commands.RecoveryServices.SiteRecovery/RecoveryServicesAsrStartup.ps1
+++ b/src/ResourceManager/RecoveryServices.SiteRecovery/Commands.RecoveryServices.SiteRecovery/StartupScripts/RecoveryServicesAsrStartup.ps1
@@ -87,4 +87,4 @@
"Update-ASRRecoveryPlan" = "Update-AzureRmRecoveryServicesAsrRecoveryPlan";
"Update-ASRServicesProvider" = "Update-AzureRmRecoveryServicesAsrServicesProvider";
"Update-ASRvCenter" = "Update-AzureRmRecoveryServicesAsrvCenter";
-}.GetEnumerator() | Select @{Name='Name'; Expression={$_.Key}}, @{Name='Value'; Expression={$_.Value}} | New-Alias -Description "AzureAlias"
+}.GetEnumerator() | Select @{Name='Name'; Expression={$_.Key}}, @{Name='Value'; Expression={$_.Value}} | Set-Alias -Description "AzureAlias"
diff --git a/src/ResourceManager/RecoveryServices.SiteRecovery/Commands.RecoveryServices.SiteRecovery/Storage/Classification/RemoveAzureRmRecoveryServicesAsrStorageClassificationMapping.cs b/src/ResourceManager/RecoveryServices.SiteRecovery/Commands.RecoveryServices.SiteRecovery/Storage/Classification/RemoveAzureRmRecoveryServicesAsrStorageClassificationMapping.cs
index 2919abcb4000..1343b376d415 100644
--- a/src/ResourceManager/RecoveryServices.SiteRecovery/Commands.RecoveryServices.SiteRecovery/Storage/Classification/RemoveAzureRmRecoveryServicesAsrStorageClassificationMapping.cs
+++ b/src/ResourceManager/RecoveryServices.SiteRecovery/Commands.RecoveryServices.SiteRecovery/Storage/Classification/RemoveAzureRmRecoveryServicesAsrStorageClassificationMapping.cs
@@ -33,8 +33,7 @@ namespace Microsoft.Azure.Commands.RecoveryServices.SiteRecovery
[Alias("Remove-ASRStorageClassificationMapping")]
[OutputType(typeof(ASRJob))]
public class RemoveAzureRmRecoveryServicesAsrStorageClassificationMapping :
- SiteRecoveryCmdletBase,
- IModuleAssemblyInitializer
+ SiteRecoveryCmdletBase
{
///
/// Gets or sets primary storage classification.
@@ -47,34 +46,6 @@ public class RemoveAzureRmRecoveryServicesAsrStorageClassificationMapping :
[Alias("StorageClassificationMapping")]
public ASRStorageClassificationMapping InputObject { get; set; }
- ///
- /// Add Site Recovery aliases
- ///
- public void OnImport()
- {
- try
- {
- AzureSessionInitializer.InitializeAzureSession();
- ResourceManagerProfileProvider.InitializeResourceManagerProfile();
-
- System.Management.Automation.PowerShell invoker = null;
- invoker = System.Management.Automation.PowerShell.Create(
- RunspaceMode.CurrentRunspace);
- invoker.AddScript(
- File.ReadAllText(
- FileUtilities.GetContentFilePath(
- Path.GetDirectoryName(
- Assembly.GetExecutingAssembly()
- .Location),
- "RecoveryServicesAsrStartup.ps1")));
- invoker.Invoke();
- }
- catch
- {
- // This may throw exception for tests, ignore.
- }
- }
-
///
/// ProcessRecord of the command.
///
diff --git a/src/ResourceManager/RecoveryServices/Commands.RecoveryServices/Commands.RecoveryServices.csproj b/src/ResourceManager/RecoveryServices/Commands.RecoveryServices/Commands.RecoveryServices.csproj
index 89fb5e81214c..39ed2d8475b8 100644
--- a/src/ResourceManager/RecoveryServices/Commands.RecoveryServices/Commands.RecoveryServices.csproj
+++ b/src/ResourceManager/RecoveryServices/Commands.RecoveryServices/Commands.RecoveryServices.csproj
@@ -85,13 +85,13 @@
AzureRM.RecoveryServices.psd1
PreserveNewest
-
- PreserveNewest
-
Designer
+
+ Always
+
diff --git a/src/ResourceManager/RecoveryServices/Commands.RecoveryServices/AzureRmRecoveryServicesStartup.ps1 b/src/ResourceManager/RecoveryServices/Commands.RecoveryServices/StartupScripts/AzureRmRecoveryServicesStartup.ps1
similarity index 93%
rename from src/ResourceManager/RecoveryServices/Commands.RecoveryServices/AzureRmRecoveryServicesStartup.ps1
rename to src/ResourceManager/RecoveryServices/Commands.RecoveryServices/StartupScripts/AzureRmRecoveryServicesStartup.ps1
index 9d54c3222e39..7cdcb9b86d2a 100644
--- a/src/ResourceManager/RecoveryServices/Commands.RecoveryServices/AzureRmRecoveryServicesStartup.ps1
+++ b/src/ResourceManager/RecoveryServices/Commands.RecoveryServices/StartupScripts/AzureRmRecoveryServicesStartup.ps1
@@ -14,4 +14,4 @@
@{
"Get-AzureRmRecoveryServicesBackupProperty" = "Get-AzureRmRecoveryServicesBackupProperties";
-}.GetEnumerator() | Select @{Name='Name'; Expression={$_.Key}}, @{Name='Value'; Expression={$_.Value}} | New-Alias -Description "AzureAlias"
+}.GetEnumerator() | Select @{Name='Name'; Expression={$_.Key}}, @{Name='Value'; Expression={$_.Value}} | Set-Alias -Description "AzureAlias"
diff --git a/src/ResourceManager/RecoveryServices/Commands.RecoveryServices/Vault/GetAzureRmRecoveryServicesBackupProperty.cs b/src/ResourceManager/RecoveryServices/Commands.RecoveryServices/Vault/GetAzureRmRecoveryServicesBackupProperty.cs
index 19cc730df12f..600764e0486f 100644
--- a/src/ResourceManager/RecoveryServices/Commands.RecoveryServices/Vault/GetAzureRmRecoveryServicesBackupProperty.cs
+++ b/src/ResourceManager/RecoveryServices/Commands.RecoveryServices/Vault/GetAzureRmRecoveryServicesBackupProperty.cs
@@ -29,7 +29,7 @@ namespace Microsoft.Azure.Commands.RecoveryServices
[Cmdlet(VerbsCommon.Get, "AzureRmRecoveryServicesBackupProperty")]
[Alias("Get-AzureRmRecoveryServicesBackupProperties")]
[OutputType(typeof(ASRVaultBackupProperties))]
- public class GetAzureRmRecoveryServicesBackupProperty : RecoveryServicesCmdletBase, IModuleAssemblyInitializer
+ public class GetAzureRmRecoveryServicesBackupProperty : RecoveryServicesCmdletBase
{
#region Parameters
@@ -60,22 +60,5 @@ public override void ExecuteCmdlet()
this.HandleException(exception);
}
}
-
- public void OnImport()
- {
- try
- {
- System.Management.Automation.PowerShell invoker = null;
- invoker = System.Management.Automation.PowerShell.Create(RunspaceMode.CurrentRunspace);
- invoker.AddScript(File.ReadAllText(FileUtilities.GetContentFilePath(
- Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location),
- "AzureRmRecoveryServicesStartup.ps1")));
- invoker.Invoke();
- }
- catch
- {
- // This will throw exception for tests, ignore.
- }
- }
}
}
diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache/Commands.RedisCache.csproj b/src/ResourceManager/RedisCache/Commands.RedisCache/Commands.RedisCache.csproj
index 36ba73a2edc3..5cf35e1c8a73 100644
--- a/src/ResourceManager/RedisCache/Commands.RedisCache/Commands.RedisCache.csproj
+++ b/src/ResourceManager/RedisCache/Commands.RedisCache/Commands.RedisCache.csproj
@@ -129,6 +129,9 @@
+
+
+
diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache/StartupScripts/sample.ps1 b/src/ResourceManager/RedisCache/Commands.RedisCache/StartupScripts/sample.ps1
new file mode 100644
index 000000000000..1a3d1052f460
--- /dev/null
+++ b/src/ResourceManager/RedisCache/Commands.RedisCache/StartupScripts/sample.ps1
@@ -0,0 +1 @@
+#Placeholder for future scripts: Please delete this file and uncomment Always within the block in the .csproj file.
\ No newline at end of file
diff --git a/src/ResourceManager/Relay/Commands.Relay/Commands.Relay.csproj b/src/ResourceManager/Relay/Commands.Relay/Commands.Relay.csproj
index 7a15fe8bfc6f..476bc283ac80 100644
--- a/src/ResourceManager/Relay/Commands.Relay/Commands.Relay.csproj
+++ b/src/ResourceManager/Relay/Commands.Relay/Commands.Relay.csproj
@@ -113,6 +113,9 @@
+
+
+
diff --git a/src/ResourceManager/Relay/Commands.Relay/StartupScripts/sample.ps1 b/src/ResourceManager/Relay/Commands.Relay/StartupScripts/sample.ps1
new file mode 100644
index 000000000000..1a3d1052f460
--- /dev/null
+++ b/src/ResourceManager/Relay/Commands.Relay/StartupScripts/sample.ps1
@@ -0,0 +1 @@
+#Placeholder for future scripts: Please delete this file and uncomment Always within the block in the .csproj file.
\ No newline at end of file
diff --git a/src/ResourceManager/Resources/Commands.Resources/Commands.Resources.csproj b/src/ResourceManager/Resources/Commands.Resources/Commands.Resources.csproj
index 1f42ad8baf99..3acc98a4a725 100644
--- a/src/ResourceManager/Resources/Commands.Resources/Commands.Resources.csproj
+++ b/src/ResourceManager/Resources/Commands.Resources/Commands.Resources.csproj
@@ -176,6 +176,9 @@
+
+
+
diff --git a/src/ResourceManager/Resources/Commands.Resources/StartupScripts/sample.ps1 b/src/ResourceManager/Resources/Commands.Resources/StartupScripts/sample.ps1
new file mode 100644
index 000000000000..1a3d1052f460
--- /dev/null
+++ b/src/ResourceManager/Resources/Commands.Resources/StartupScripts/sample.ps1
@@ -0,0 +1 @@
+#Placeholder for future scripts: Please delete this file and uncomment Always within the block in the .csproj file.
\ No newline at end of file
diff --git a/src/ResourceManager/Scheduler/Commands.Scheduler/Commands.Scheduler.csproj b/src/ResourceManager/Scheduler/Commands.Scheduler/Commands.Scheduler.csproj
index 9bbe1d31bc61..b9e066048cea 100644
--- a/src/ResourceManager/Scheduler/Commands.Scheduler/Commands.Scheduler.csproj
+++ b/src/ResourceManager/Scheduler/Commands.Scheduler/Commands.Scheduler.csproj
@@ -115,6 +115,9 @@
Designer
+
+
+
diff --git a/src/ResourceManager/Scheduler/Commands.Scheduler/StartupScripts/sample.ps1 b/src/ResourceManager/Scheduler/Commands.Scheduler/StartupScripts/sample.ps1
new file mode 100644
index 000000000000..1a3d1052f460
--- /dev/null
+++ b/src/ResourceManager/Scheduler/Commands.Scheduler/StartupScripts/sample.ps1
@@ -0,0 +1 @@
+#Placeholder for future scripts: Please delete this file and uncomment Always within the block in the .csproj file.
\ No newline at end of file
diff --git a/src/ResourceManager/ServerManagement/Commands.ServerManagement/Commands.ServerManagement.csproj b/src/ResourceManager/ServerManagement/Commands.ServerManagement/Commands.ServerManagement.csproj
index 80396630809b..24c362baab64 100644
--- a/src/ResourceManager/ServerManagement/Commands.ServerManagement/Commands.ServerManagement.csproj
+++ b/src/ResourceManager/ServerManagement/Commands.ServerManagement/Commands.ServerManagement.csproj
@@ -86,6 +86,9 @@
Designer
+
+
+
diff --git a/src/ResourceManager/ServerManagement/Commands.ServerManagement/StartupScripts/sample.ps1 b/src/ResourceManager/ServerManagement/Commands.ServerManagement/StartupScripts/sample.ps1
new file mode 100644
index 000000000000..1a3d1052f460
--- /dev/null
+++ b/src/ResourceManager/ServerManagement/Commands.ServerManagement/StartupScripts/sample.ps1
@@ -0,0 +1 @@
+#Placeholder for future scripts: Please delete this file and uncomment Always within the block in the .csproj file.
\ No newline at end of file
diff --git a/src/ResourceManager/ServiceBus/Commands.ServiceBus/Commands.ServiceBus.csproj b/src/ResourceManager/ServiceBus/Commands.ServiceBus/Commands.ServiceBus.csproj
index 074cd056e0cf..fad1e93cbb01 100644
--- a/src/ResourceManager/ServiceBus/Commands.ServiceBus/Commands.ServiceBus.csproj
+++ b/src/ResourceManager/ServiceBus/Commands.ServiceBus/Commands.ServiceBus.csproj
@@ -118,6 +118,9 @@
Designer
+
+
+
diff --git a/src/ResourceManager/ServiceBus/Commands.ServiceBus/StartupScripts/sample.ps1 b/src/ResourceManager/ServiceBus/Commands.ServiceBus/StartupScripts/sample.ps1
new file mode 100644
index 000000000000..1a3d1052f460
--- /dev/null
+++ b/src/ResourceManager/ServiceBus/Commands.ServiceBus/StartupScripts/sample.ps1
@@ -0,0 +1 @@
+#Placeholder for future scripts: Please delete this file and uncomment Always within the block in the .csproj file.
\ No newline at end of file
diff --git a/src/ResourceManager/ServiceFabric/Commands.ServiceFabric/Commands.ServiceFabric.csproj b/src/ResourceManager/ServiceFabric/Commands.ServiceFabric/Commands.ServiceFabric.csproj
index 4a8f8672f468..4aec3b9ff933 100644
--- a/src/ResourceManager/ServiceFabric/Commands.ServiceFabric/Commands.ServiceFabric.csproj
+++ b/src/ResourceManager/ServiceFabric/Commands.ServiceFabric/Commands.ServiceFabric.csproj
@@ -79,6 +79,9 @@
Designer
Always
+
+
+
diff --git a/src/ResourceManager/ServiceFabric/Commands.ServiceFabric/StartupScripts/sample.ps1 b/src/ResourceManager/ServiceFabric/Commands.ServiceFabric/StartupScripts/sample.ps1
new file mode 100644
index 000000000000..1a3d1052f460
--- /dev/null
+++ b/src/ResourceManager/ServiceFabric/Commands.ServiceFabric/StartupScripts/sample.ps1
@@ -0,0 +1 @@
+#Placeholder for future scripts: Please delete this file and uncomment Always within the block in the .csproj file.
\ No newline at end of file
diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Commands.SiteRecovery.csproj b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Commands.SiteRecovery.csproj
index 74d0513109be..03bc75f60730 100644
--- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Commands.SiteRecovery.csproj
+++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Commands.SiteRecovery.csproj
@@ -156,6 +156,9 @@
+
+
+
diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/StartupScripts/sample.ps1 b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/StartupScripts/sample.ps1
new file mode 100644
index 000000000000..1a3d1052f460
--- /dev/null
+++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery/StartupScripts/sample.ps1
@@ -0,0 +1 @@
+#Placeholder for future scripts: Please delete this file and uncomment Always within the block in the .csproj file.
\ No newline at end of file
diff --git a/src/ResourceManager/Sql/Commands.Sql/Commands.Sql.csproj b/src/ResourceManager/Sql/Commands.Sql/Commands.Sql.csproj
index ea553099ebea..b13502dae8a6 100644
--- a/src/ResourceManager/Sql/Commands.Sql/Commands.Sql.csproj
+++ b/src/ResourceManager/Sql/Commands.Sql/Commands.Sql.csproj
@@ -226,6 +226,9 @@
Designer
+
+ Always
+
Always
@@ -426,9 +429,6 @@
-
- PreserveNewest
-
diff --git a/src/ResourceManager/Sql/Commands.Sql/Server/Cmdlet/GetAzureSqlServer.cs b/src/ResourceManager/Sql/Commands.Sql/Server/Cmdlet/GetAzureSqlServer.cs
index 3bcfbebc9f12..926e1e56636b 100644
--- a/src/ResourceManager/Sql/Commands.Sql/Server/Cmdlet/GetAzureSqlServer.cs
+++ b/src/ResourceManager/Sql/Commands.Sql/Server/Cmdlet/GetAzureSqlServer.cs
@@ -28,7 +28,7 @@ namespace Microsoft.Azure.Commands.Sql.Server.Cmdlet
/// Defines the Get-AzureRmSqlServer cmdlet
///
[Cmdlet(VerbsCommon.Get, "AzureRmSqlServer", ConfirmImpact = ConfirmImpact.None, SupportsShouldProcess = true)]
- public class GetAzureSqlServer : AzureSqlServerCmdletBase, IModuleAssemblyInitializer
+ public class GetAzureSqlServer : AzureSqlServerCmdletBase
{
///
/// Gets or sets the name of the resource group to use.
@@ -100,25 +100,5 @@ protected override IEnumerable ApplyUserInputToModel(IEnume
{
return model;
}
-
- ///
- /// Add Sql aliases
- ///
- public void OnImport()
- {
- try
- {
- System.Management.Automation.PowerShell invoker = null;
- invoker = System.Management.Automation.PowerShell.Create(RunspaceMode.CurrentRunspace);
- invoker.AddScript(File.ReadAllText(FileUtilities.GetContentFilePath(
- Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location),
- "SqlStartup.ps1")));
- invoker.Invoke();
- }
- catch
- {
- // This may throw exception for tests, ignore.
- }
- }
}
}
diff --git a/src/ResourceManager/Sql/Commands.Sql/SqlStartup.ps1 b/src/ResourceManager/Sql/Commands.Sql/StartupScripts/SqlStartup.ps1
similarity index 94%
rename from src/ResourceManager/Sql/Commands.Sql/SqlStartup.ps1
rename to src/ResourceManager/Sql/Commands.Sql/StartupScripts/SqlStartup.ps1
index d1624c618418..0968fac3dd11 100644
--- a/src/ResourceManager/Sql/Commands.Sql/SqlStartup.ps1
+++ b/src/ResourceManager/Sql/Commands.Sql/StartupScripts/SqlStartup.ps1
@@ -18,5 +18,5 @@
"Remove-AzureRmSqlDatabaseServerAuditing" = "Remove-AzureRmSqlServerAuditing";
"Set-AzureRmSqlDatabaseServerAuditingPolicy" = "Set-AzureRmSqlServerAuditingPolicy";
"Use-AzureRmSqlDatabaseServerAuditingPolicy" = "Use-AzureRmSqlServerAuditingPolicy";
-}.GetEnumerator() | Select @{Name='Name'; Expression={$_.Key}}, @{Name='Value'; Expression={$_.Value}} | New-Alias -Description "AzureAlias"
+}.GetEnumerator() | Select @{Name='Name'; Expression={$_.Key}}, @{Name='Value'; Expression={$_.Value}} | Set-Alias -Description "AzureAlias"
diff --git a/src/ResourceManager/Storage/Commands.Management.Storage/Commands.Management.Storage.csproj b/src/ResourceManager/Storage/Commands.Management.Storage/Commands.Management.Storage.csproj
index 06e4f99d1d29..84ca2b5b7a52 100644
--- a/src/ResourceManager/Storage/Commands.Management.Storage/Commands.Management.Storage.csproj
+++ b/src/ResourceManager/Storage/Commands.Management.Storage/Commands.Management.Storage.csproj
@@ -129,6 +129,9 @@
Designer
+
+
+
diff --git a/src/ResourceManager/Storage/Commands.Management.Storage/StartupScripts/sample.ps1 b/src/ResourceManager/Storage/Commands.Management.Storage/StartupScripts/sample.ps1
new file mode 100644
index 000000000000..1a3d1052f460
--- /dev/null
+++ b/src/ResourceManager/Storage/Commands.Management.Storage/StartupScripts/sample.ps1
@@ -0,0 +1 @@
+#Placeholder for future scripts: Please delete this file and uncomment Always within the block in the .csproj file.
\ No newline at end of file
diff --git a/src/ResourceManager/Storage/Stack/Commands.Management.Storage/Commands.Management.Storage.csproj b/src/ResourceManager/Storage/Stack/Commands.Management.Storage/Commands.Management.Storage.csproj
index 9d9c909dbbbc..07d1bfdbc17e 100644
--- a/src/ResourceManager/Storage/Stack/Commands.Management.Storage/Commands.Management.Storage.csproj
+++ b/src/ResourceManager/Storage/Stack/Commands.Management.Storage/Commands.Management.Storage.csproj
@@ -143,6 +143,9 @@
Designer
+
+
+
diff --git a/src/ResourceManager/Storage/Stack/Commands.Management.Storage/StartupScripts/sample.ps1 b/src/ResourceManager/Storage/Stack/Commands.Management.Storage/StartupScripts/sample.ps1
new file mode 100644
index 000000000000..1a3d1052f460
--- /dev/null
+++ b/src/ResourceManager/Storage/Stack/Commands.Management.Storage/StartupScripts/sample.ps1
@@ -0,0 +1 @@
+#Placeholder for future scripts: Please delete this file and uncomment Always within the block in the .csproj file.
\ No newline at end of file
diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Commands.StreamAnalytics.csproj b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Commands.StreamAnalytics.csproj
index 8ca83564aca0..e6a025461061 100644
--- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Commands.StreamAnalytics.csproj
+++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Commands.StreamAnalytics.csproj
@@ -153,6 +153,9 @@
Designer
+
+
+
diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/StartupScripts/sample.ps1 b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/StartupScripts/sample.ps1
new file mode 100644
index 000000000000..1a3d1052f460
--- /dev/null
+++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/StartupScripts/sample.ps1
@@ -0,0 +1 @@
+#Placeholder for future scripts: Please delete this file and uncomment Always within the block in the .csproj file.
\ No newline at end of file
diff --git a/src/ResourceManager/Tags/Commands.Tags/Commands.Tags.csproj b/src/ResourceManager/Tags/Commands.Tags/Commands.Tags.csproj
index f335543d623a..07fa5bb5a899 100644
--- a/src/ResourceManager/Tags/Commands.Tags/Commands.Tags.csproj
+++ b/src/ResourceManager/Tags/Commands.Tags/Commands.Tags.csproj
@@ -61,6 +61,9 @@
+
+
+
diff --git a/src/ResourceManager/Tags/Commands.Tags/StartupScripts/sample.ps1 b/src/ResourceManager/Tags/Commands.Tags/StartupScripts/sample.ps1
new file mode 100644
index 000000000000..1a3d1052f460
--- /dev/null
+++ b/src/ResourceManager/Tags/Commands.Tags/StartupScripts/sample.ps1
@@ -0,0 +1 @@
+#Placeholder for future scripts: Please delete this file and uncomment Always within the block in the .csproj file.
\ No newline at end of file
diff --git a/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Commands.TrafficManager.csproj b/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Commands.TrafficManager.csproj
index ee762ee5a378..8e707a3f38af 100644
--- a/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Commands.TrafficManager.csproj
+++ b/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Commands.TrafficManager.csproj
@@ -104,6 +104,9 @@
Designer
+
+
+
diff --git a/src/ResourceManager/TrafficManager/Commands.TrafficManager2/StartupScripts/sample.ps1 b/src/ResourceManager/TrafficManager/Commands.TrafficManager2/StartupScripts/sample.ps1
new file mode 100644
index 000000000000..1a3d1052f460
--- /dev/null
+++ b/src/ResourceManager/TrafficManager/Commands.TrafficManager2/StartupScripts/sample.ps1
@@ -0,0 +1 @@
+#Placeholder for future scripts: Please delete this file and uncomment Always within the block in the .csproj file.
\ No newline at end of file
diff --git a/src/ResourceManager/UsageAggregates/Commands.UsageAggregates/Commands.UsageAggregates.csproj b/src/ResourceManager/UsageAggregates/Commands.UsageAggregates/Commands.UsageAggregates.csproj
index 3676e0ccf426..b7306f37fbbc 100644
--- a/src/ResourceManager/UsageAggregates/Commands.UsageAggregates/Commands.UsageAggregates.csproj
+++ b/src/ResourceManager/UsageAggregates/Commands.UsageAggregates/Commands.UsageAggregates.csproj
@@ -60,6 +60,9 @@
+
+
+
diff --git a/src/ResourceManager/UsageAggregates/Commands.UsageAggregates/StartupScripts/sample.ps1 b/src/ResourceManager/UsageAggregates/Commands.UsageAggregates/StartupScripts/sample.ps1
new file mode 100644
index 000000000000..1a3d1052f460
--- /dev/null
+++ b/src/ResourceManager/UsageAggregates/Commands.UsageAggregates/StartupScripts/sample.ps1
@@ -0,0 +1 @@
+#Placeholder for future scripts: Please delete this file and uncomment Always within the block in the .csproj file.
\ No newline at end of file
diff --git a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/DeploymentSlots/SwitchAzureWebAppSlot.cs b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/DeploymentSlots/SwitchAzureWebAppSlot.cs
index 41337301d6a8..c5c2bb11201e 100644
--- a/src/ResourceManager/Websites/Commands.Websites/Cmdlets/DeploymentSlots/SwitchAzureWebAppSlot.cs
+++ b/src/ResourceManager/Websites/Commands.Websites/Cmdlets/DeploymentSlots/SwitchAzureWebAppSlot.cs
@@ -30,7 +30,7 @@ namespace Microsoft.Azure.Commands.WebApps.Cmdlets.DeploymentSlots
/// this commandlet will let you swap two web app slots using ARM APIs
///
[Cmdlet(VerbsCommon.Switch, "AzureRmWebAppSlot", SupportsShouldProcess = true)]
- public class SwitchAzureWebAppSlot : WebAppBaseCmdlet, IModuleAssemblyInitializer
+ public class SwitchAzureWebAppSlot : WebAppBaseCmdlet
{
[Parameter(Position = 0, Mandatory = true, HelpMessage = "Name of the source slot.")]
[ValidateNotNullOrEmpty]
@@ -125,25 +125,5 @@ private void GetConfirmActionMessages(out string actionMessage, out string proce
}
}
}
-
- ///
- /// Load global aliases for ARM
- ///
- public void OnImport()
- {
- try
- {
- System.Management.Automation.PowerShell invoker = null;
- invoker = System.Management.Automation.PowerShell.Create(RunspaceMode.CurrentRunspace);
- invoker.AddScript(File.ReadAllText(FileUtilities.GetContentFilePath(
- Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location),
- "WebsitesStartup.ps1")));
- invoker.Invoke();
- }
- catch(Exception) when (TestMockSupport.RunningMocked)
- {
- // This will throw exception for tests, ignore.
- }
- }
}
}
diff --git a/src/ResourceManager/Websites/Commands.Websites/Commands.Websites.csproj b/src/ResourceManager/Websites/Commands.Websites/Commands.Websites.csproj
index b97bcc731159..08556aa310ca 100644
--- a/src/ResourceManager/Websites/Commands.Websites/Commands.Websites.csproj
+++ b/src/ResourceManager/Websites/Commands.Websites/Commands.Websites.csproj
@@ -130,8 +130,8 @@
Designer
-
- PreserveNewest
+
+ Always
diff --git a/src/ResourceManager/Websites/Commands.Websites/WebsitesStartup.ps1 b/src/ResourceManager/Websites/Commands.Websites/StartupScripts/WebsitesStartup.ps1
similarity index 93%
rename from src/ResourceManager/Websites/Commands.Websites/WebsitesStartup.ps1
rename to src/ResourceManager/Websites/Commands.Websites/StartupScripts/WebsitesStartup.ps1
index 68bf0cee6cbf..56ed65c1a2f6 100644
--- a/src/ResourceManager/Websites/Commands.Websites/WebsitesStartup.ps1
+++ b/src/ResourceManager/Websites/Commands.Websites/StartupScripts/WebsitesStartup.ps1
@@ -14,4 +14,4 @@
@{
"Swap-AzureRmWebAppSlot" = "Switch-AzureRmWebAppSlot";
-}.GetEnumerator() | Select @{Name='Name'; Expression={$_.Key}}, @{Name='Value'; Expression={$_.Value}} | New-Alias -Description "AzureAlias"
+}.GetEnumerator() | Select @{Name='Name'; Expression={$_.Key}}, @{Name='Value'; Expression={$_.Value}} | Set-Alias -Description "AzureAlias"
diff --git a/tools/AzureRM.Example.psm1 b/tools/AzureRM.Example.psm1
index 1029c5c78488..7635b2399118 100644
--- a/tools/AzureRM.Example.psm1
+++ b/tools/AzureRM.Example.psm1
@@ -11,6 +11,13 @@ Set-StrictMode -Version Latest
%IMPORTED-DEPENDENCIES%
+if (Test-Path -Path "$PSScriptRoot\StartupScripts")
+{
+ Get-ChildItem "$PSScriptRoot\StartupScripts" | ForEach-Object {
+ . $_.FullName
+ }
+}
+
if ($PSVersionTable.PSVersion.Major -ge 5)
{
$completerCommands = %COMPLETERCOMMANDS%
diff --git a/tools/UpdateModules.ps1 b/tools/UpdateModules.ps1
index eea8af17bd3b..a8a5f8de39ae 100644
--- a/tools/UpdateModules.ps1
+++ b/tools/UpdateModules.ps1
@@ -92,7 +92,6 @@ function Add-PSM1Dependency
$file = Get-Item -Path $Path
$manifestFile = $file.Name
$psm1file = $manifestFile -replace ".psd1", ".psm1"
- Write-Host "here" + $Path
Update-ModuleManifest -Path $Path -RootModule $psm1file
}
}