Skip to content

Commit 769fd1a

Browse files
committed
Merge branch 'sprint54' of https://github.com/wastoresh/azure-powershell-pr into dev
2 parents 3c28707 + f3335ce commit 769fd1a

File tree

1,459 files changed

+112108
-71904
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,459 files changed

+112108
-71904
lines changed

AzurePowershell.Test.targets

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<PropertyGroup>
66
<TestSettings>.\src\Local.testsettings</TestSettings>
77
<TestSettings_x64>.\src\Local.x64.testsettings</TestSettings_x64>
8-
<ScenarioTestDebug>.\src\Common\Commands.ScenarioTest\bin\Debug\Microsoft.WindowsAzure.Commands.ScenarioTest.dll</ScenarioTestDebug>
9-
<CommonTestDebug>.\src\Common\Commands.Common.Test\bin\Debug\Microsoft.WindowsAzure.Commands.Common.Test.dll</CommonTestDebug>
8+
<ScenarioTestDebug>.\src\ServiceManagement\Common\Commands.ScenarioTest\bin\Debug\Microsoft.WindowsAzure.Commands.ScenarioTest.dll</ScenarioTestDebug>
9+
<CommonTestDebug>.\src\ServiceManagement\Common\Commands.Common.Test\bin\Debug\Microsoft.WindowsAzure.Commands.Common.Test.dll</CommonTestDebug>
1010
<BackupTestDebug>.\src\ResourceManager\AzureBackup\Commands.AzureBackup.Test\bin\Debug\Microsoft.Azure.Commands.AzureBackup.Test.dll</BackupTestDebug>
1111
<SiteRecoveryTestDebug>.\src\ResourceManager\SiteRecovery\Commands.SiteRecovery.Test\bin\Debug\Microsoft.Azure.Commands.SiteRecovery.Test.dll</SiteRecoveryTestDebug>
1212
<SqlTestDebug>.\src\ResourceManager\Sql\Commands.Sql.Test\bin\Debug\Microsoft.Azure.Commands.Sql.Test.dll</SqlTestDebug>
@@ -16,7 +16,7 @@
1616
<AzureRTTestSettings>.\src\AzureRT.testsettings</AzureRTTestSettings>
1717
<AzureRTSeqTestSettings>.\src\AzureRTSeq.testsettings</AzureRTSeqTestSettings>
1818
<AzureRTTestContainer>.\src\ServiceManagement\Compute\Commands.ServiceManagement.Test\bin\Debug\Microsoft.WindowsAzure.Commands.ServiceManagement.Test.dll</AzureRTTestContainer>
19-
<StorageScenarioTestDebug>src\ServiceManagement\Storage\Commands.Storage.ScenarioTest\bin\Debug\CLITest.dll</StorageScenarioTestDebug>
19+
<StorageScenarioTestDebug>src\Common\Storage\Commands.Storage.ScenarioTest\bin\Debug\CLITest.dll</StorageScenarioTestDebug>
2020
<ManagementTestDebug>.\src\ServiceManagement\Services\Commands.Test\bin\Debug\Microsoft.WindowsAzure.Commands.Test.dll</ManagementTestDebug>
2121
<ResourceManagerTestDebug>.\src\ResourceManager\Resources\Commands.Resources.Test\bin\Debug\Microsoft.Azure.Commands.Resources.Test.dll</ResourceManagerTestDebug>
2222
<DataFactoryManagerTestDebug>.\src\ResourceManager\DataFactories\Commands.DataFactories.Test\bin\Debug\Microsoft.Azure.Commands.DataFactories.Test.dll</DataFactoryManagerTestDebug>
@@ -28,9 +28,9 @@
2828
<ServiceManagementTestDebug>.\src\ServiceManagement\Compute\Commands.ServiceManagement.Test\bin\Debug\Microsoft.WindowsAzure.Commands.ServiceManagement.Test.dll</ServiceManagementTestDebug>
2929
<SqlDatabaseTestDebug>.\src\ServiceManagement\Sql\Commands.SqlDatabase.Test\bin\Debug\Microsoft.WindowsAzure.Commands.SqlDatabase.Test.dll</SqlDatabaseTestDebug>
3030
<HDInsightTestDebug>.\src\ServiceManagement\HDInsight\Commands.HDInsight.Test\bin\Debug\Microsoft.WindowsAzure.Commands.HDInsight.Test.dll</HDInsightTestDebug>
31-
<StorageTestDebug>.\src\ServiceManagement\Storage\Commands.Storage.Test\bin\Debug\Microsoft.WindowsAzure.Commands.Storage.Test.dll</StorageTestDebug>
31+
<StorageTestDebug>.\src\Common\Storage\Commands.Storage.Test\bin\Debug\Microsoft.WindowsAzure.Commands.Storage.Test.dll</StorageTestDebug>
3232
<KeyVaultTestDebug>.\src\ResourceManager\KeyVault\Commands.KeyVault.Test\bin\Debug\Microsoft.Azure.Commands.KeyVault.Test.dll</KeyVaultTestDebug>
33-
<UsageAggregationTestDebug>.\src\ResourceManager\Commerce\Commands.UsageAggregates.Test\bin\Debug\Microsoft.Azure.Commands.UsageAggregates.Test.dll</UsageAggregationTestDebug>
33+
<UsageAggregationTestDebug>.\src\ResourceManager\UsageAggregates\Commands.UsageAggregates.Test\bin\Debug\Microsoft.Azure.Commands.UsageAggregates.Test.dll</UsageAggregationTestDebug>
3434
<TestFilter>"!Functional&#x26;!Scenario&#x26;!AzureRTScenario&#x26;!Sequential&#x26;!PIRTest&#x26;!Preview&#x26;!ADDomain&#x26;!Network&#x26;!AzureRTUpload&#x26;!AzureRTCleanUp"</TestFilter>
3535
<ScenarioTestFilter>All</ScenarioTestFilter>
3636
<OneSDKCITFilter>"OneSDK&#x26;CIT"</OneSDKCITFilter>
@@ -45,7 +45,7 @@
4545
<ItemGroup>
4646
<XUnitTests Include=".\src\ResourceManager\AzureBackup\Commands.AzureBackup.Test\bin\Debug\Microsoft.Azure.Commands.AzureBackup.Test.dll"/>
4747
<XUnitTests Include=".\src\ResourceManager\SiteRecovery\Commands.SiteRecovery.Test\bin\Debug\Microsoft.Azure.Commands.SiteRecovery.Test.dll"/>
48-
<XUnitTests Include=".\src\Common\Commands.Common.Test\bin\Debug\Microsoft.WindowsAzure.Commands.Common.Test.dll"/>
48+
<XUnitTests Include=".\src\ServiceManagement\Common\Commands.Common.Test\bin\Debug\Microsoft.WindowsAzure.Commands.Common.Test.dll"/>
4949
<XUnitTests Include=".\src\ResourceManager\Sql\Commands.Sql.Test\bin\Debug\Microsoft.Azure.Commands.Sql.Test.dll"/>
5050
<XUnitTests Include=".\src\ServiceManagement\Services\Commands.Test\bin\Debug\Microsoft.WindowsAzure.Commands.Test.dll"/>
5151
<XUnitTests Include=".\src\ServiceManagement\StorSimple\Commands.StorSimple.Test\bin\Debug\Microsoft.WindowsAzure.Commands.StorSimple.Test.dll"/>
@@ -59,14 +59,15 @@
5959
<XUnitTests Include=".\src\ResourceManager\AzureBatch\Commands.Batch.Test\bin\Debug\Microsoft.Azure.Commands.Batch.Test.dll"/>
6060
<XUnitTests Include=".\src\ResourceManager\Websites\Commands.Websites.Test\bin\Debug\Microsoft.Azure.Commands.Websites.Test.dll"/>
6161
<XUnitTests Include=".\src\ResourceManager\KeyVault\Commands.KeyVault.Test\bin\Debug\Microsoft.Azure.Commands.KeyVault.Test.dll"/>
62-
<XUnitTests Include=".\src\ResourceManager\Commerce\Commands.UsageAggregates.Test\bin\Debug\Microsoft.Azure.Commands.UsageAggregates.Test.dll"/>
62+
<XUnitTests Include=".\src\ResourceManager\UsageAggregates\Commands.UsageAggregates.Test\bin\Debug\Microsoft.Azure.Commands.UsageAggregates.Test.dll"/>
6363
<XUnitTests Include=".\src\ServiceManagement\ManagedCache\Commands.ManagedCache.Test\bin\Debug\Microsoft.Azure.Commands.ManagedCache.Test.dll"/>
6464
<XUnitTests Include=".\src\ServiceManagement\RemoteApp\Commands.RemoteApp.Test\bin\Debug\Microsoft.Azure.Commands.RemoteApp.Tests.dll"/>
65-
<XUnitTests Include=".\src\Common\Commands.ScenarioTest\bin\Debug\Microsoft.WindowsAzure.Commands.ScenarioTest.dll"/>
65+
<XUnitTests Include=".\src\ServiceManagement\Common\Commands.ScenarioTest\bin\Debug\Microsoft.WindowsAzure.Commands.ScenarioTest.dll"/>
6666
<XUnitTests Include=".\src\ServiceManagement\RecoveryServices\Commands.RecoveryServices.Test\bin\Debug\Microsoft.Azure.Commands.RecoveryServices.Test.dll"/>
6767
<XUnitTests Include=".\src\ResourceManager\TrafficManager\Commands.TrafficManager2.Test\bin\Debug\Microsoft.Azure.Commands.TrafficManager.Test.ScenarioTests.dll"/>
6868
<XUnitTests Include=".\src\ServiceManagement\Network\Commands.Network.Test\bin\Debug\Microsoft.WindowsAzure.Commands.ServiceManagement.Network.Test.dll"/>
6969
<XUnitTests Include=".\src\ResourceManager\ApiManagement\Commands.ApiManagement.Test\bin\Debug\Microsoft.Azure.Commands.ApiManagement.Test.dll"/>
70+
<XUnitTests Include=".\src\ResourceManager\Profile\Commands.Profile.Test\bin\Debug\Microsoft.Azure.Commands.Profile.Test.dll"/>
7071
</ItemGroup>
7172

7273
<Target Name="InvokeMSTest">

ChangeLog.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
## 2015.09.03 version 0.9.8
2+
* Azure Redis Cache cmdlets
3+
* New-AzureRMRedisCache - 'RedisVersion' parameter is deprecated.
24
* Azure Compute (ARM) Cmdlets
35
* Added -Launch parameter for Get-AzureRemoteDesktopFile cmdlet
46
* Added Id parameter for VM cmdlets to support piping scenario without ResourceGroupName parameter
@@ -7,7 +9,6 @@
79
* Changed the output format of Get image cmdlets as a table
810
* Fixed Set-AzureVMAccessExtension cmdlet
911
* Azure Compute (Service Management) cmdlets
10-
* Changed the warning message to a non-terminating error message for ResourceNotFound in VM cmdlets
1112
* Exposed ComputeImageConfig in Get-AzurePlatformVMImage cmdlet
1213
* Fixed Publish-AzurePlatformExtension and Set-AzurePlatformExtension cmdlets
1314
* Azure Backup - added the following cmdlets
@@ -44,6 +45,12 @@
4445
* Get-AzureSqlServerActiveDirectoryAdministrator
4546
* Set-AzureSqlServerActiveDirectoryAdministrator
4647
* Remove-AzureSqlServerActiveDirectoryAdministrator
48+
* SQL Server VM cmdlets (ARM)
49+
* New-AzureVMSqlServerAutoPatchingConfig
50+
* New-AzureVMSqlServerAutoBackupConfig
51+
* Set-AzureVMSqlServerExtension
52+
* Get-AzureVMSqlServerExtension
53+
* Remove-AzureVMSqlServerExtension
4754

4855
## 2015.08.17 version 0.9.7
4956
* Azure Profile cmdlets

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ This repository contains a set of PowerShell cmdlets for developers and administ
6969
* PowerShell remoting
7070
* Manage extension
7171
* BG Info
72+
* Chef
7273
* Puppet
7374
* Custom Script
7475
* Access

build.proj

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
<AzureResourceManagerSln Include=".\src\ResourceManager.sln" />
2424
<AzureServiceManagementSln Include=".\src\ServiceManagement.sln" />
2525
<SetupSln Include=".\setup\azurepowershell.sln" />
26+
<SetupPowershellGetSln Include=".\setup-powershellget\powershellget.sln" />
2627
</ItemGroup>
2728

2829
<UsingTask
@@ -160,11 +161,16 @@
160161
Importance="high"
161162
Text="You are required to have installed the WiX Toolset at http://wix.codeplex.com/releases/view/115492 (Wix38.msi)"
162163
ContinueOnError="false" />
163-
<!--<MSBuild
164+
<MSBuild
165+
Projects="@(SetupPowershellGetSln)"
166+
Targets="Build"
167+
Properties="$(DebugBuildConfig)"
168+
ContinueOnError="false" />
169+
<MSBuild
164170
Projects="@(SetupSln)"
165171
Targets="Build"
166172
Properties="$(DebugBuildConfig)"
167-
ContinueOnError="false" />-->
173+
ContinueOnError="false" />
168174
</Target>
169175

170176
<!-- Build the Setup -->
@@ -177,11 +183,16 @@
177183
Importance="high"
178184
Text="You are required to have installed the WiX Toolset at http://wix.codeplex.com/releases/view/115492 (Wix38.msi)"
179185
ContinueOnError="false" />
180-
<!--<MSBuild
186+
<MSBuild
187+
Projects="@(SetupPowershellGetSln)"
188+
Targets="Build"
189+
Properties="$(ReleaseBuildConfig)"
190+
ContinueOnError="false" />
191+
<MSBuild
181192
Projects="@(SetupSln)"
182193
Targets="Build"
183194
Properties="$(ReleaseBuildConfig)"
184-
ContinueOnError="false" />-->
195+
ContinueOnError="false" />
185196
</Target>
186197

187198
<!-- Build the Cmdlets and Setup in all configurations -->
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<configuration>
3+
<startup useLegacyV2RuntimeActivationPolicy="true">
4+
5+
<!--
6+
Use supportedRuntime tags to explicitly specify the version(s) of the .NET Framework runtime that
7+
the custom action should run on. If no versions are specified, the chosen version of the runtime
8+
will be the "best" match to what Microsoft.Deployment.WindowsInstaller.dll was built against.
9+
10+
WARNING: leaving the version unspecified is dangerous as it introduces a risk of compatibility
11+
problems with future versions of the .NET Framework runtime. It is highly recommended that you specify
12+
only the version(s) of the .NET Framework runtime that you have tested against.
13+
14+
Note for .NET Framework v3.0 and v3.5, the runtime version is still v2.0.
15+
16+
In order to enable .NET Framework version 2.0 runtime activation policy, which is to load all assemblies
17+
by using the latest supported runtime, @useLegacyV2RuntimeActivationPolicy="true".
18+
19+
For more information, see http://msdn.microsoft.com/en-us/library/bbx34a2h.aspx
20+
-->
21+
22+
<supportedRuntime version="v4.0" />
23+
<supportedRuntime version="v2.0.50727"/>
24+
25+
</startup>
26+
27+
<!--
28+
Add additional configuration settings here. For more information on application config files,
29+
see http://msdn.microsoft.com/en-us/library/kza1yk3a.aspx
30+
-->
31+
32+
</configuration>
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
// ----------------------------------------------------------------------------------
2+
//
3+
// Copyright Microsoft Corporation
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
// Unless required by applicable law or agreed to in writing, software
9+
// distributed under the License is distributed on an "AS IS" BASIS,
10+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
// See the License for the specific language governing permissions and
12+
// limitations under the License.
13+
// ----------------------------------------------------------------------------------
14+
15+
namespace Microsoft.WindowsAzure.Setup
16+
{
17+
using System;
18+
using System.IO;
19+
using Deployment.WindowsInstaller;
20+
using System.Threading;
21+
22+
public class CustomAction
23+
{
24+
// The exception object which will store (if) exception which is occured in our sta thread
25+
private static Exception _STAThreadException;
26+
27+
private static uint[] powerShellDefaultColorTable = new uint[]
28+
{
29+
0x0, 0x800000, 0x8000, 0x808000, 0x80, 0x562401, 0xF0EDEE, 0xC0C0C0,
30+
0x808080, 0xFF0000, 0xFF00, 0xFFFF00, 0xFF, 0xFF00FF, 0xFFFF, 0xFFFFFF
31+
};
32+
33+
// Method which contains our custom action behaviour
34+
private static void RunSTAThread(object sessionObject)
35+
{
36+
try
37+
{
38+
Session session = sessionObject as Session;
39+
40+
string powerShellShortcutPath = session.CustomActionData["ShortcutPath"];
41+
string powerShellDefaultShortcutPath = session.CustomActionData["DefaultShortcutPath"];
42+
43+
if (!File.Exists(powerShellShortcutPath))
44+
{
45+
_STAThreadException = new Exception(string.Format("UpdatePSShortcut: file {0} does not exist", powerShellShortcutPath));
46+
return;
47+
}
48+
49+
ShellLink powerShellShellLink = new ShellLink(powerShellShortcutPath);
50+
if (File.Exists(powerShellDefaultShortcutPath))
51+
{
52+
session.Log("UpdatePSShortcut: found default Windows PowerShell shortcut at {0}", powerShellDefaultShortcutPath);
53+
ShellLink powerShellDefaultShellLink = new ShellLink(powerShellDefaultShortcutPath);
54+
powerShellShellLink.ConsoleProperties = powerShellDefaultShellLink.ConsoleProperties;
55+
}
56+
else
57+
{
58+
session.Log("UpdatePSShortcut: default Windows PowerShell shortcut does not exist at {0}", powerShellDefaultShortcutPath);
59+
60+
for (int i = 0; i < powerShellShellLink.ConsoleProperties.ColorTable.Length; i++)
61+
{
62+
powerShellShellLink.ConsoleProperties.ColorTable[i] = powerShellDefaultColorTable[i];
63+
}
64+
powerShellShellLink.AutoPosition = true;
65+
powerShellShellLink.CommandHistoryBufferSize = 50;
66+
powerShellShellLink.CommandHistoryBufferCount = 4;
67+
68+
powerShellShellLink.InsertMode = true;
69+
70+
powerShellShellLink.PopUpBackgroundColor = 15;
71+
powerShellShellLink.PopUpTextColor = 3;
72+
73+
powerShellShellLink.QuickEditMode = true;
74+
75+
powerShellShellLink.ScreenBackgroundColor = 5;
76+
powerShellShellLink.ScreenTextColor = 6;
77+
78+
powerShellShellLink.SetScreenBufferSize(120, 3000);
79+
powerShellShellLink.SetWindowSize(120, 50);
80+
}
81+
powerShellShellLink.Save();
82+
session.Log("UpdatePSShortcut: success");
83+
}
84+
catch (Exception ex)
85+
{
86+
_STAThreadException = new Exception(string.Format("UpdatePSShortcut: failed with exception {0}", ex.Message));
87+
}
88+
}
89+
90+
[CustomAction]
91+
public static ActionResult UpdatePSShortcut(Session session)
92+
{
93+
Thread staThread = new Thread(RunSTAThread);
94+
staThread.SetApartmentState(ApartmentState.STA);
95+
staThread.Start(session);
96+
// Wait for the new thread to finish its operations
97+
staThread.Join();
98+
99+
// If there is any exception in the new thread pass it to the installer
100+
if (_STAThreadException != null)
101+
{
102+
session.Log(_STAThreadException.Message);
103+
return ActionResult.Failure;
104+
}
105+
106+
return ActionResult.Success;
107+
}
108+
}
109+
}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
// ----------------------------------------------------------------------------------
2+
//
3+
// Copyright Microsoft Corporation
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
// Unless required by applicable law or agreed to in writing, software
9+
// distributed under the License is distributed on an "AS IS" BASIS,
10+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
// See the License for the specific language governing permissions and
12+
// limitations under the License.
13+
// ----------------------------------------------------------------------------------
14+
15+
using System.Reflection;
16+
using System.Runtime.InteropServices;
17+
18+
// General Information about an assembly is controlled through the following
19+
// set of attributes. Change these attribute values to modify the information
20+
// associated with an assembly.
21+
[assembly: AssemblyTitle("Setup")]
22+
[assembly: AssemblyDescription("")]
23+
[assembly: AssemblyCompany("Microsoft")]
24+
[assembly: AssemblyProduct("Setup")]
25+
[assembly: AssemblyCopyright("Copyright © Microsoft")]
26+
[assembly: AssemblyTrademark("")]
27+
[assembly: AssemblyCulture("")]
28+
29+
// Setting ComVisible to false makes the types in this assembly not visible
30+
// to COM components. If you need to access a type in this assembly from
31+
// COM, set the ComVisible attribute to true on that type.
32+
[assembly: ComVisible(false)]
33+
34+
// The following GUID is for the ID of the typelib if this project is exposed to COM
35+
[assembly: Guid("f4aa30f2-d2ce-4aef-88ed-a048b771c272")]
36+
37+
// Version information for an assembly consists of the following four values:
38+
//
39+
// Major Version
40+
// Minor Version
41+
// Build Number
42+
// Revision
43+
//
44+
// You can specify all the values or you can default the Build and Revision Numbers
45+
// by using the '*' as shown below:
46+
// [assembly: AssemblyVersion("1.0.*")]
47+
[assembly: AssemblyVersion("1.0.0.0")]
48+
[assembly: AssemblyFileVersion("1.0.0.0")]

0 commit comments

Comments
 (0)