Skip to content

Commit

Permalink
Merge pull request Azure#52 from huangpf/vmss
Browse files Browse the repository at this point in the history
Vmss
  • Loading branch information
AzureRT committed Oct 24, 2015
2 parents f76f085 + 9e77758 commit 7b697f5
Show file tree
Hide file tree
Showing 284 changed files with 12,177 additions and 6,861 deletions.
6 changes: 5 additions & 1 deletion ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
## 2015.10.09 version 1.0 preview
* Azure Redis Cache
* Set-AzureRedisCache - Premium and vNet support for redis cache
* New-AzureRedisCache - Premium and vNet support for redis cache

## 2015.10.09 version 1.0 preview
* Azure Resource Manager Management Cmdlets
* New-AzureRmResourceGroup - Removed the template deployment parameters from this cmdlet. Template deployment will now be
handled only through the New-AzureRmResourceGroupDeployment
Expand Down
1 change: 1 addition & 0 deletions setup/Setup/CustomAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ private static void RunSTAThread(object sessionObject)
powerShellShellLink.SetScreenBufferSize(120, 3000);
powerShellShellLink.SetWindowSize(120, 50);
}
powerShellShellLink.SetFont();
powerShellShellLink.Save();
session.Log("UpdatePSShortcut: success");
}
Expand Down
24 changes: 24 additions & 0 deletions setup/Setup/SetExecutionPolicy.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# ----------------------------------------------------------------------------------
#
# 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.
# ----------------------------------------------------------------------------------


try
{
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force -ErrorAction "SilentlyContinue"
}
catch
{
# do not fail if execution policy cannot be set for this scope
}

8 changes: 8 additions & 0 deletions setup/Setup/ShellLink.cs
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,14 @@ public void SetWindowSize(short x, short y)
this.consoleProperties.dwWindowSize = c;
}

public void SetFont()
{
this.consoleProperties.FaceName = "Lucida Console";
this.consoleProperties.uFontFamily = 54;
this.consoleProperties.uFontWeight = 400;
this.consoleProperties.uCursorSize = 25;
}

// This does more than console colors
private void SetConsoleProperties()
{
Expand Down
37 changes: 33 additions & 4 deletions setup/azurecmd.wxs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">

<?define productName="Microsoft Azure PowerShell - September 2015" ?>
<?define productName="Microsoft Azure PowerShell - October 2015" ?>
<?define sourceDir="$(var.SolutionDir)..\src\Package\$(var.Configuration)" ?>
<?define caSourceDir="$(var.SolutionDir)setup\bin\$(var.Configuration)" ?>

<?define version="0.9.9" ?>
<?define versionedStartMenuFolder="Microsoft Azure" ?>
<?define staleStartMenuFolder="Windows Azure" ?>

<Product Id="*"
Name="$(var.productName)"
Language="1033"
Expand All @@ -27,11 +27,31 @@
<Property Id="ARPPRODUCTICON" Value="icon.ico" />
<Property Id="ALLUSERS" Value="1" />
<!-- per machine install-->

<Property Id="PSCOMPATIBLEVERSION">
<RegistrySearch Id="PSCOMPATIBLEVERSION" Root="HKLM" Key="SOFTWARE\Microsoft\PowerShell\3\PowerShellEngine" Name="PSCompatibleVersion" Type="raw" />
</Property>

<SetProperty Action="SetBase64" Id="BaseModulesFolder" Value="[ProgramFiles64Folder]WindowsPowerShell\Modules" Before="AppSearch">
VersionNT64
</SetProperty>

<SetProperty Action="SetBase32" Id="BaseModulesFolder" Value="[ProgramFilesFolder]WindowsPowerShell\Modules" Before="AppSearch">
NOT VersionNT64
</SetProperty>

<SetProperty Id="POWERSHELLEXE" Value="[WindowsFolder]System32\WindowsPowerShell\v1.0\powershell.exe" Before="AppSearch"/>

<Property Id="POWERSHELLGETMODULESINSTALLED" >
<DirectorySearch Id="PROGRAMFILESCONTAINER" Path="[BaseModulesFolder]">
<DirectorySearch Id= "PROFILEMODULE" Path="AzureRM.Profile"/>
</DirectorySearch>
</Property>

<Condition Message="Azure Modules from the PowerShell Gallery are installed on this machine. Please remove these modules before installing this MSI.">
<![CDATA[Installed or NOT(POWERSHELLGETMODULESINSTALLED >< "AzureRM.Profile")]]>
</Condition>


<Condition Message="This setup requires the Windows PowerShell 3.0 or compatible version to be installed.">
<!-- This condition will break if PowerShell has version x3.0 and it is not compatible with 3.0 -->
<![CDATA[Installed or (PSCOMPATIBLEVERSION >< "3.0")]]>
Expand Down Expand Up @@ -69,7 +89,13 @@
<Component Id="PSModulePath.System" Guid="273525B9-7AAB-421A-90C8-8E50A1840B8D">
<CreateFolder />
<!-- Work around bug that PowerShell does not always consider default module paths. -->
<Environment Id="PSModulePath.SystemAppRoot" Action="set" Name="PSMODULEPATH" Part="last" Value="[PowerShellFolder]ResourceManager;[PowerShellFolder]ServiceManagement" System="yes" />
<Environment Id="PSModulePath.SystemAppRoot" Action="set" Name="PSMODULEPATH" Part="last" Value="[BaseModulesFolder];[PowerShellFolder]ResourceManager\AzureResourceManager;[PowerShellFolder]ServiceManagement" System="yes" />
</Component>
</DirectoryRef>

<DirectoryRef Id="PowerShellFolder">
<Component Id="AzureSdkExecutionPolicyScript" Guid="3d0d589a-b34c-4c48-9a4c-df78f286c6a3">
<File Id="AzureSdkExecutionPolicyScriptFile" KeyPath="yes" Source="$(var.SolutionDir)\Setup\SetExecutionPolicy.ps1" />
</Component>
</DirectoryRef>

Expand All @@ -90,16 +116,19 @@
<ComponentGroupRef Id="azurecmdfiles" />
<ComponentRef Id="PSModulePath.System" />
<ComponentRef Id="AzureSdkShortcut" />
<ComponentRef Id="AzureSdkExecutionPolicyScript" />
</Feature>

<Binary Id="CustomActions" SourceFile="$(var.caSourceDir)\Microsoft.WindowsAzure.Setup.CA.dll"/>
<CustomAction Id="UpdatePSShortcut" BinaryKey="CustomActions" DllEntry="UpdatePSShortcut" Execute ="deferred" Impersonate="no"/>
<CustomAction Id="SetCustomActionDataValue" Return="check" Property="UpdatePSShortcut"
Value="ShortcutPath=[AzureSdkMenu]Microsoft Azure PowerShell.lnk;DefaultShortcutPath=[ProgramMenuFolder]System Tools\Windows PowerShell.lnk" />
<CustomAction Id="SetExecutionPolicy" Property="POWERSHELLEXE" ExeCommand="-NoLogo -NoProfile -ExecutionPolicy Bypass -Command &quot;. \&quot;[PowerShellFolder]SetExecutionPolicy.ps1\&quot;&quot;" Execute="deferred" Impersonate="no" Return="check"/>

<InstallExecuteSequence>
<Custom Action="SetCustomActionDataValue" After="CreateShortcuts">NOT Installed</Custom>
<Custom Action="UpdatePSShortcut" After="SetCustomActionDataValue">NOT Installed</Custom>
<Custom Action="SetExecutionPolicy" After="UpdatePSShortcut">NOT Installed</Custom>
</InstallExecuteSequence>

<WixVariable Id="WixUILicenseRtf" Value="$(var.ProjectDir)\media\License.rtf" />
Expand Down
24 changes: 20 additions & 4 deletions setup/azurecmdfiles.wxi
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
<DirectoryRef Id="PowerShellFolder">
<Directory Id="dirB60B5B1F56FA5598EFFC960CA393FDCE" Name="ResourceManager">
<Directory Id="dir9E409EB63EF03736275B51044C819FD8" Name="AzureResourceManager">
<Component Id="cmp96F13C307DA6E4AAC35F3D147F21553F" Guid="*">
<File Id="fil96C82365E5F5A2F2747805236B563DF0" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureResourceManager.psd1" />
</Component>
<Directory Id="dirF9A46FF3188BA8C006D8942FCEFE5108" Name="Azure.Storage">
<Component Id="cmp0761C025FCF8EF027A5BC23C72777C52" Guid="*">
<File Id="fil80798000B169AC6D62DD8331A55CF6FF" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\Azure.Storage\Azure.Storage.psd1" />
Expand Down Expand Up @@ -495,6 +492,9 @@
<Component Id="cmpC7297788AE102ED861765ADE84F7A59B" Guid="*">
<File Id="filEA714AAE425D2451466447C9AFFE825E" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Compute\AzureRmProfileStartup.ps1" />
</Component>
<Component Id="cmpE2DA894B67E7F107B24A69AD6B87F8B3" Guid="*">
<File Id="fil6EA712045B160BE36B4A3D2068D50F9F" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Compute\CheckVersions.ps1" />
</Component>
<Component Id="cmpCC409403AF670A9E0538AC743C61BD66" Guid="*">
<File Id="fil68CB35902CE5A11BE50C9DE228B61D12" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Compute\Hyak.Common.dll" />
</Component>
Expand Down Expand Up @@ -1128,6 +1128,9 @@
<Component Id="cmpD29EA01597258746011AE6EF9FC3D15A" Guid="*">
<File Id="filCE0262D8D43EF7AB4CDB25A0752B7121" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.KeyVault\System.Net.Http.Primitives.dll" />
</Component>
<Component Id="cmp8EE8340753317C13D69F692E7E42B175" Guid="*">
<File Id="filAE60D28516977FE205BBEB3D15EB53DE" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.KeyVault\System.Spatial.dll" />
</Component>
</Directory>
<Directory Id="dir76147B1D381C34B7638F2A844B5685DC" Name="AzureRM.Network">
<Component Id="cmp33F39A22183184A6B41F85DF085BAD29" Guid="*">
Expand All @@ -1154,6 +1157,9 @@
<Component Id="cmpFE91A142C4108B5EB50D6C5C5F4A4FA9" Guid="*">
<File Id="fil6D69005A7EDC2EEA35252F1E602D935C" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Network\AzureRmProfileStartup.ps1" />
</Component>
<Component Id="cmp065EDC002BB63B6AA573F18152B7240F" Guid="*">
<File Id="fil559CC58FC4CFCF2A101739440A55FBC7" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Network\CheckVersions.ps1" />
</Component>
<Component Id="cmp02E49F28BB0FA3174A478847B857A4D0" Guid="*">
<File Id="fil379E46A4E79152D00FBBBF3BF85A0BA2" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Network\Hyak.Common.dll" />
</Component>
Expand Down Expand Up @@ -1371,6 +1377,9 @@
<Component Id="cmp6F865A1998C9B6DAE0E8844D0EECF40A" Guid="*">
<File Id="filAF2791E9DF9A44B6D0F375786A415C61" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Profile\AzureRmProfileStartup.ps1" />
</Component>
<Component Id="cmp9002DD73D47754F2109499247914700F" Guid="*">
<File Id="filA918B8D44812C6306881A86655EAA785" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Profile\CheckVersions.ps1" />
</Component>
<Component Id="cmpD738842B230F04E64FD98E3E850E6338" Guid="*">
<File Id="fil73F9971478A8661859398F414D5BDE00" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Profile\Hyak.Common.dll" />
</Component>
Expand Down Expand Up @@ -1823,6 +1832,9 @@
<Component Id="cmpA3B81935598199F5BE6572F3D46DD2C5" Guid="*">
<File Id="fil8741CCFD373A03733A72E5956154D8FB" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Sql\ResourceManagerStartup.ps1" />
</Component>
<Component Id="cmpD50A1D50B7385232643B15A0E7CBAA57" Guid="*">
<File Id="fil433065D93BBE30A527CE610D0FCF2B08" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Sql\SqlStartup.ps1" />
</Component>
<Component Id="cmp56F9151EB19BE7D5CE2655D19ADF5C9A" Guid="*">
<File Id="filDC634F6E7D9EEFF24385BE6034AB2EE4" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Sql\System.Net.Http.Extensions.dll" />
</Component>
Expand Down Expand Up @@ -4355,7 +4367,6 @@
</Fragment>
<Fragment>
<ComponentGroup Id="azurecmdfiles">
<ComponentRef Id="cmp96F13C307DA6E4AAC35F3D147F21553F" />
<ComponentRef Id="cmp0761C025FCF8EF027A5BC23C72777C52" />
<ComponentRef Id="cmp658F4F28B5894F240AF3AE214E228C7A" />
<ComponentRef Id="cmpBE01F246267602912E7BB7FAC7C89B62" />
Expand Down Expand Up @@ -4515,6 +4526,7 @@
<ComponentRef Id="cmp9FDC7E987C84705E62A1E3E6958A7A34" />
<ComponentRef Id="cmp0BDDC10BCAFF9EC25710B20367203609" />
<ComponentRef Id="cmpC7297788AE102ED861765ADE84F7A59B" />
<ComponentRef Id="cmpE2DA894B67E7F107B24A69AD6B87F8B3" />
<ComponentRef Id="cmpCC409403AF670A9E0538AC743C61BD66" />
<ComponentRef Id="cmp8F649774D57C8E90EC765D8FCE36E32A" />
<ComponentRef Id="cmpFBB75A5451448B356C97E62D2C6C10A0" />
Expand Down Expand Up @@ -4722,6 +4734,7 @@
<ComponentRef Id="cmp8F99791178CB394FC285BF5F9DA21047" />
<ComponentRef Id="cmp55A0977CC2E4CD91F6738FFD78449307" />
<ComponentRef Id="cmpD29EA01597258746011AE6EF9FC3D15A" />
<ComponentRef Id="cmp8EE8340753317C13D69F692E7E42B175" />
<ComponentRef Id="cmp33F39A22183184A6B41F85DF085BAD29" />
<ComponentRef Id="cmp70B60DBD32D61BCA5715AB2D64131358" />
<ComponentRef Id="cmp92653399A1E9659661E74CA982C1D16A" />
Expand All @@ -4730,6 +4743,7 @@
<ComponentRef Id="cmp9F97686A6D38F8B72B2FB1D62529AF0F" />
<ComponentRef Id="cmpA398972142ABD0AC819F613EE832B65C" />
<ComponentRef Id="cmpFE91A142C4108B5EB50D6C5C5F4A4FA9" />
<ComponentRef Id="cmp065EDC002BB63B6AA573F18152B7240F" />
<ComponentRef Id="cmp02E49F28BB0FA3174A478847B857A4D0" />
<ComponentRef Id="cmp53B7AE5C484C188098FEE906B381461C" />
<ComponentRef Id="cmpFCCC1C3A49857F9109FEB6AE04888D08" />
Expand Down Expand Up @@ -4801,6 +4815,7 @@
<ComponentRef Id="cmpBBEEE168902DFD205E35F47468881929" />
<ComponentRef Id="cmpCDBCF0967EA30044FF3F4478A30C1D5B" />
<ComponentRef Id="cmp6F865A1998C9B6DAE0E8844D0EECF40A" />
<ComponentRef Id="cmp9002DD73D47754F2109499247914700F" />
<ComponentRef Id="cmpD738842B230F04E64FD98E3E850E6338" />
<ComponentRef Id="cmp2BE62623A92CD0986F0915CB16373E90" />
<ComponentRef Id="cmpCBBCCDE16C2F179A9160E366F5449CF4" />
Expand Down Expand Up @@ -4949,6 +4964,7 @@
<ComponentRef Id="cmp25F6948876AE28D1DB4430494E01EBB7" />
<ComponentRef Id="cmpE4F09171FB1B25EAC4AABD90F9EFA350" />
<ComponentRef Id="cmpA3B81935598199F5BE6572F3D46DD2C5" />
<ComponentRef Id="cmpD50A1D50B7385232643B15A0E7CBAA57" />
<ComponentRef Id="cmp56F9151EB19BE7D5CE2655D19ADF5C9A" />
<ComponentRef Id="cmp39A46C3BD11947E08479BBD49CB20104" />
<ComponentRef Id="cmpC1352E11D4D3526DFA43840F587B64D9" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
<HintPath>..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Common.Authentication, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.Azure.Common.Authentication.1.3.3-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll</HintPath>
<HintPath>..\..\packages\Microsoft.Azure.Common.Authentication.1.3.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Azure.Common.NetFramework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
Expand Down
2 changes: 1 addition & 1 deletion src/Common/Commands.Common.Storage/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<packages>
<package id="Hyak.Common" version="1.0.2" targetFramework="net45" />
<package id="Microsoft.Azure.Common" version="2.1.0" targetFramework="net45" />
<package id="Microsoft.Azure.Common.Authentication" version="1.3.3-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Common.Authentication" version="1.3.4-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Common.Dependencies" version="1.0.0" targetFramework="net45" />
<package id="Microsoft.Azure.KeyVault.Core" version="1.0.0" targetFramework="net45" />
<package id="Microsoft.Azure.Management.Resources" version="2.18.7-preview" targetFramework="net45" />
Expand Down
8 changes: 6 additions & 2 deletions src/Common/Commands.Common/AzurePSCmdlet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
using System.IO;
using System.Management.Automation.Host;
using System.Text;
using System.Linq;
using System.Threading;

namespace Microsoft.WindowsAzure.Commands.Utilities.Common
Expand Down Expand Up @@ -160,7 +161,10 @@ public static bool IsDataCollectionAllowed()
protected bool CheckIfInteractive()
{
bool interactive = true;
if (this.Host == null || this.Host.UI == null || this.Host.UI.RawUI == null)
if (this.Host == null ||
this.Host.UI == null ||
this.Host.UI.RawUI == null ||
Environment.GetCommandLineArgs().Any(s => s.Equals("-NonInteractive", StringComparison.OrdinalIgnoreCase)))
{
interactive = false;
}
Expand Down Expand Up @@ -235,7 +239,7 @@ protected override void EndProcessing()
DebugStreamTraceListener.RemoveAdalTracing(_adalListener);
FlushDebugMessages();

AzureSession.ClientFactory.UserAgents.RemoveAll(u => u.Product.Name == ModuleName);
AzureSession.ClientFactory.UserAgents.RemoveWhere(u => u.Product.Name == ModuleName);
AzureSession.ClientFactory.RemoveHandler(typeof(CmdletInfoHandler));
base.EndProcessing();
}
Expand Down
2 changes: 1 addition & 1 deletion src/Common/Commands.Common/Commands.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
</Reference>
<Reference Include="Microsoft.Azure.Common.Authentication, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.Azure.Common.Authentication.1.3.3-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll</HintPath>
<HintPath>..\..\packages\Microsoft.Azure.Common.Authentication.1.3.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Common.NetFramework">
<SpecificVersion>False</SpecificVersion>
Expand Down
2 changes: 1 addition & 1 deletion src/Common/Commands.Common/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<package id="Microsoft.ApplicationInsights" version="1.1.1-beta" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.2" targetFramework="net45" />
<package id="Microsoft.Azure.Common" version="2.1.0" targetFramework="net45" />
<package id="Microsoft.Azure.Common.Authentication" version="1.3.3-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Common.Authentication" version="1.3.4-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Common.Dependencies" version="1.0.0" targetFramework="net45" />
<package id="Microsoft.Azure.Management.Resources" version="2.18.7-preview" targetFramework="net45" />
<package id="Microsoft.Bcl" version="1.1.9" targetFramework="net45" />
Expand Down
Loading

0 comments on commit 7b697f5

Please sign in to comment.