Skip to content

Commit e2024b9

Browse files
committed
Merge pull request Azure#234 from yadavbdev/dev
Adding RemoteApp help files and some code fixes
2 parents 6644c02 + 8e65fb2 commit e2024b9

File tree

10 files changed

+6203
-178
lines changed

10 files changed

+6203
-178
lines changed

setup/azurecmdfiles.wxi

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,9 @@
228228
<Component Id="cmp209CCEE0DCF9E72717C6DEDE4C8984E1" Guid="*">
229229
<File Id="filB3488A11432720CCC778EEDE53A35520" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\Insights\Microsoft.WindowsAzure.Commands.Common.dll" />
230230
</Component>
231+
<Component Id="cmp7BECB13532E43A81AFC0959E29FF1F56" Guid="*">
232+
<File Id="fil4562ECD0CE4E517A3B3EE8FB5DD93915" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\Insights\Microsoft.WindowsAzure.Configuration.dll" />
233+
</Component>
231234
<Component Id="cmp5CEBB63124C5833CCFA24A6D28E11CC9" Guid="*">
232235
<File Id="filDB364E77519F6ACAA5B9CE685AB1AFB4" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\Insights\Microsoft.WindowsAzure.Storage.dll" />
233236
</Component>
@@ -426,6 +429,9 @@
426429
<Component Id="cmpE26272EE838769BD2FFEA9C0C34D98A1" Guid="*">
427430
<File Id="filCC6184C17424259A3F35CE11A1AFE043" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\Resources\Microsoft.Azure.Commands.RemoteApp.dll" />
428431
</Component>
432+
<Component Id="cmp516068C60B9103EEF550824AF08E3480" Guid="*">
433+
<File Id="filFBEC2AF221D002244AD02A9017846EB3" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\Resources\Microsoft.Azure.Commands.RemoteApp.dll-help.xml" />
434+
</Component>
429435
<Component Id="cmp73768AE8C93638B2530E9F74B6FA5470" Guid="*">
430436
<File Id="fil2112A41C953308499BCC1D706AA6FC6F" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\Resources\Microsoft.Azure.Commands.Resources.dll" />
431437
</Component>
@@ -1018,6 +1024,9 @@
10181024
<Component Id="cmp0C0FC77DAEF2A45138590D65DCDD21B8" Guid="*">
10191025
<File Id="filE55E8D836BD5E6F609EECF27B26CBB7E" KeyPath="yes" Source="$(var.sourceDir)\ServiceManagement\Azure\Compute\Microsoft.Azure.Commands.RedisCache.format.ps1xml" />
10201026
</Component>
1027+
<Component Id="cmp34F1D9B669A6CA987B6CC8630DCE6782" Guid="*">
1028+
<File Id="filE56D9DC9E5A05381E5FBA8CBD056B17A" KeyPath="yes" Source="$(var.sourceDir)\ServiceManagement\Azure\Compute\Microsoft.Azure.Commands.RemoteApp.dll-help.xml" />
1029+
</Component>
10211030
<Component Id="cmp5ACBDDEE7EBFF87A502B9FCF53520122" Guid="*">
10221031
<File Id="fil05622093B9BAD4063FDC52C4CADD209C" KeyPath="yes" Source="$(var.sourceDir)\ServiceManagement\Azure\Compute\Microsoft.Azure.Commands.Resources.dll-Help.xml" />
10231032
</Component>
@@ -1408,6 +1417,9 @@
14081417
<Component Id="cmp64030D5B6C82DAF62B9FE5045B77700C" Guid="*">
14091418
<File Id="filDB7EAD1005C8CC8E3947AC53E7B55E14" KeyPath="yes" Source="$(var.sourceDir)\ServiceManagement\Azure\ManagedCache\Microsoft.Azure.Commands.RedisCache.format.ps1xml" />
14101419
</Component>
1420+
<Component Id="cmp13A9C67EDAD48346FE098AFE3B982D12" Guid="*">
1421+
<File Id="filEDAE6CF5A3CED7FC56E635414E8CE861" KeyPath="yes" Source="$(var.sourceDir)\ServiceManagement\Azure\ManagedCache\Microsoft.Azure.Commands.RemoteApp.dll-help.xml" />
1422+
</Component>
14111423
<Component Id="cmp5525BBDC2AFA16BA65885B77260D8AC6" Guid="*">
14121424
<File Id="filE30599F8A678F8CE28AED9C66D974C65" KeyPath="yes" Source="$(var.sourceDir)\ServiceManagement\Azure\ManagedCache\Microsoft.Azure.Commands.Resources.dll-Help.xml" />
14131425
</Component>
@@ -1734,6 +1746,9 @@
17341746
<Component Id="cmp26DF79CFA25FFCFADB0FB5DC14B25DD5" Guid="*">
17351747
<File Id="filC03C4AD0124468FF36AAAF3A7F9EDA93" KeyPath="yes" Source="$(var.sourceDir)\ServiceManagement\Azure\RemoteApp\Microsoft.Azure.Commands.RemoteApp.dll" />
17361748
</Component>
1749+
<Component Id="cmpBDE4B2E3B54189CA86CBC58F3EB854E7" Guid="*">
1750+
<File Id="filF061D544C8D50855F9B5ADB30C123F96" KeyPath="yes" Source="$(var.sourceDir)\ServiceManagement\Azure\RemoteApp\Microsoft.Azure.Commands.RemoteApp.dll-help.xml" />
1751+
</Component>
17371752
<Component Id="cmp913600C952F3D3D27C7E14B7E72AA774" Guid="*">
17381753
<File Id="fil431D73D2EE9C4FFDA0CCEE983EC4D52A" KeyPath="yes" Source="$(var.sourceDir)\ServiceManagement\Azure\RemoteApp\Microsoft.Azure.Common.Authentication.dll" />
17391754
</Component>
@@ -1844,6 +1859,9 @@
18441859
<Component Id="cmpCC0508ADCA3E92A67914CBF93991F25B" Guid="*">
18451860
<File Id="fil295637A5742FD9F5D103EC30E27488BC" KeyPath="yes" Source="$(var.sourceDir)\ServiceManagement\Azure\Services\Microsoft.Azure.Commands.RedisCache.format.ps1xml" />
18461861
</Component>
1862+
<Component Id="cmp0174B507BB16888DF7297469234F6361" Guid="*">
1863+
<File Id="fil325BECFE2CA505C22BF276C5195E4C8A" KeyPath="yes" Source="$(var.sourceDir)\ServiceManagement\Azure\Services\Microsoft.Azure.Commands.RemoteApp.dll-help.xml" />
1864+
</Component>
18471865
<Component Id="cmp5348A71B0B8AB94A5F1E9886459B2BB5" Guid="*">
18481866
<File Id="filE32DA7A87086B64048CA049E873DBB86" KeyPath="yes" Source="$(var.sourceDir)\ServiceManagement\Azure\Services\Microsoft.Azure.Commands.Resources.dll-Help.xml" />
18491867
</Component>
@@ -2309,6 +2327,9 @@
23092327
<Component Id="cmp478C52C713BC83A1D6EF6623C1F02E9F" Guid="*">
23102328
<File Id="filAF314457EAB56F453E80476055046524" KeyPath="yes" Source="$(var.sourceDir)\ServiceManagement\Azure\Sql\Microsoft.Azure.Commands.RedisCache.format.ps1xml" />
23112329
</Component>
2330+
<Component Id="cmpFE085EE876C4312FEF09B5536C7CD833" Guid="*">
2331+
<File Id="filE950C043381582FCAB46C3164E6CE8C4" KeyPath="yes" Source="$(var.sourceDir)\ServiceManagement\Azure\Sql\Microsoft.Azure.Commands.RemoteApp.dll-help.xml" />
2332+
</Component>
23122333
<Component Id="cmp8073B9AB5328ACDB45711FB0F9099B9E" Guid="*">
23132334
<File Id="fil258A366784B8082541CB4E8B4AC7B8E0" KeyPath="yes" Source="$(var.sourceDir)\ServiceManagement\Azure\Sql\Microsoft.Azure.Commands.Resources.dll-Help.xml" />
23142335
</Component>
@@ -2797,6 +2818,7 @@
27972818
<ComponentRef Id="cmpE4D93F3591A5E0258D9F3BC7B60DAB6A" />
27982819
<ComponentRef Id="cmp969D3C7FCFB07B7318A8A57FCD133108" />
27992820
<ComponentRef Id="cmp209CCEE0DCF9E72717C6DEDE4C8984E1" />
2821+
<ComponentRef Id="cmp7BECB13532E43A81AFC0959E29FF1F56" />
28002822
<ComponentRef Id="cmp5CEBB63124C5833CCFA24A6D28E11CC9" />
28012823
<ComponentRef Id="cmpF5AF8CEC5E3C01F32D02BF852FD840AC" />
28022824
<ComponentRef Id="cmp5D4BF2AFED5DA226237313E9C2F8099B" />
@@ -2861,6 +2883,7 @@
28612883
<ComponentRef Id="cmp676F99A118173C700AFBDC73848BD83B" />
28622884
<ComponentRef Id="cmp13A9EC661F7AC7FA9D243ADFFC00A3A2" />
28632885
<ComponentRef Id="cmpE26272EE838769BD2FFEA9C0C34D98A1" />
2886+
<ComponentRef Id="cmp516068C60B9103EEF550824AF08E3480" />
28642887
<ComponentRef Id="cmp73768AE8C93638B2530E9F74B6FA5470" />
28652888
<ComponentRef Id="cmp43B198DD7ECA39F95FF5CD09BD732D67" />
28662889
<ComponentRef Id="cmpF723A612E44FEF81A6FD35D6F83156E4" />
@@ -3053,6 +3076,7 @@
30533076
<ComponentRef Id="cmp92D521CCBFF0A4064A70115D4DBE13C4" />
30543077
<ComponentRef Id="cmp9DBA37B38077942A2856B006B0D29A0A" />
30553078
<ComponentRef Id="cmp0C0FC77DAEF2A45138590D65DCDD21B8" />
3079+
<ComponentRef Id="cmp34F1D9B669A6CA987B6CC8630DCE6782" />
30563080
<ComponentRef Id="cmp5ACBDDEE7EBFF87A502B9FCF53520122" />
30573081
<ComponentRef Id="cmpB496235CB74DCC1B3E4B9B0A4A99DB7E" />
30583082
<ComponentRef Id="cmp958759CE2C3C0A31E905D81FB0A84070" />
@@ -3181,6 +3205,7 @@
31813205
<ComponentRef Id="cmpE6F2C1F15F5A672D8597DA20C7FBBEE4" />
31823206
<ComponentRef Id="cmp320445BFD6404D5395B37391FC5BD42A" />
31833207
<ComponentRef Id="cmp64030D5B6C82DAF62B9FE5045B77700C" />
3208+
<ComponentRef Id="cmp13A9C67EDAD48346FE098AFE3B982D12" />
31843209
<ComponentRef Id="cmp5525BBDC2AFA16BA65885B77260D8AC6" />
31853210
<ComponentRef Id="cmp3B73CDB3665598A0F364C5C9F64897C5" />
31863211
<ComponentRef Id="cmp01E6F666668B5C3F5A8C540ABB183964" />
@@ -3287,6 +3312,7 @@
32873312
<ComponentRef Id="cmpE3495C0DD75A31199E40EAA7E5128E6C" />
32883313
<ComponentRef Id="cmp876FCC4B6F7590AC9D51ABDD32229647" />
32893314
<ComponentRef Id="cmp26DF79CFA25FFCFADB0FB5DC14B25DD5" />
3315+
<ComponentRef Id="cmpBDE4B2E3B54189CA86CBC58F3EB854E7" />
32903316
<ComponentRef Id="cmp913600C952F3D3D27C7E14B7E72AA774" />
32913317
<ComponentRef Id="cmp545D8CBEAE57C9BE9C9B852D32CB58B3" />
32923318
<ComponentRef Id="cmp5543C526734BEBD6DBA8D3F4CCAC4906" />
@@ -3323,6 +3349,7 @@
33233349
<ComponentRef Id="cmp254F24FE3219AAF571A822A25B3F2F1D" />
33243350
<ComponentRef Id="cmpD403CA2620FB13B02947597F523205AB" />
33253351
<ComponentRef Id="cmpCC0508ADCA3E92A67914CBF93991F25B" />
3352+
<ComponentRef Id="cmp0174B507BB16888DF7297469234F6361" />
33263353
<ComponentRef Id="cmp5348A71B0B8AB94A5F1E9886459B2BB5" />
33273354
<ComponentRef Id="cmp893FEE56B28C885AB3353AAF55D63AC2" />
33283355
<ComponentRef Id="cmp7DE7895664CEA231D675C1AB05326146" />
@@ -3466,6 +3493,7 @@
34663493
<ComponentRef Id="cmp700F703B48DF7CB7CE37FFA4A4FE09EE" />
34673494
<ComponentRef Id="cmp0768A087ABCEC038FF46A989346CD0BD" />
34683495
<ComponentRef Id="cmp478C52C713BC83A1D6EF6623C1F02E9F" />
3496+
<ComponentRef Id="cmpFE085EE876C4312FEF09B5536C7CD833" />
34693497
<ComponentRef Id="cmp8073B9AB5328ACDB45711FB0F9099B9E" />
34703498
<ComponentRef Id="cmp55EA66AEDADDF121EA69ED386F2305D8" />
34713499
<ComponentRef Id="cmpAB5C120DE3A82B09A13FD1F816D360E6" />

src/ServiceManagement/RemoteApp/Commands.RemoteApp/Collection/NewAzureRemoteAppCollection.cs

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ public class NewAzureRemoteAppCollection : RdsCmdlet
3030
{
3131
private const string DomainJoined = "DomainJoined";
3232
private const string NoDomain = "NoDomain";
33+
private const string AzureVNet = "AzureVNet";
3334

3435
[Parameter (Mandatory = true,
3536
Position = 0,
@@ -59,52 +60,54 @@ public class NewAzureRemoteAppCollection : RdsCmdlet
5960
)]
6061
public string Location { get; set; }
6162

62-
[Parameter(Mandatory = true,
63-
Position = 3,
63+
[Parameter(
6464
ValueFromPipelineByPropertyName = true,
65-
ParameterSetName = DomainJoined,
6665
HelpMessage = "The name of the RemoteApp or Azure VNet to create the collection in."
6766
)]
67+
[Parameter(Mandatory = true, Position = 3, ParameterSetName = DomainJoined)]
68+
[Parameter(Mandatory = true, Position = 3, ParameterSetName = AzureVNet)]
6869
public string VNetName { get; set; }
6970

7071
[Parameter(Mandatory = false,
7172
ValueFromPipelineByPropertyName = true,
72-
ParameterSetName = DomainJoined,
73+
ParameterSetName = AzureVNet,
7374
HelpMessage = "For Azure VNets only, a comma-separated list of DNS servers for the VNet."
7475
)]
7576
[ValidateNotNullOrEmpty]
7677
public string DnsServers { get; set; }
7778

78-
[Parameter(Mandatory = false,
79+
[Parameter(Mandatory = true,
80+
Position = 6,
7981
ValueFromPipelineByPropertyName = true,
80-
ParameterSetName = DomainJoined,
82+
ParameterSetName = AzureVNet,
8183
HelpMessage = "For Azure VNets only, the name of the subnet."
8284
)]
8385
[ValidateNotNullOrEmpty]
8486
public string SubnetName { get; set; }
8587

86-
[Parameter(Mandatory = true,
87-
Position = 4,
88+
[Parameter(
8889
ValueFromPipelineByPropertyName = true,
89-
ParameterSetName = DomainJoined,
9090
HelpMessage = "The name of the on-premise domain to join the RD Session Host servers to."
9191
)]
92+
[Parameter(Mandatory = true, Position = 4, ParameterSetName = DomainJoined)]
93+
[Parameter(Mandatory = true, Position = 4, ParameterSetName = AzureVNet)]
9294
[ValidatePattern(DomainNameValidatorString)]
9395
public string Domain { get; set; }
9496

95-
[Parameter(Mandatory = true,
96-
Position = 5,
97+
[Parameter(
9798
ValueFromPipelineByPropertyName = true,
98-
ParameterSetName = DomainJoined,
9999
HelpMessage = "The users credentials that has permission to add computers to the domain."
100100
)]
101+
[Parameter(Mandatory = true, Position = 5, ParameterSetName = DomainJoined)]
102+
[Parameter(Mandatory = true, Position = 5, ParameterSetName = AzureVNet)]
101103
public PSCredential Credential { get; set; }
102104

103105
[Parameter(Mandatory = false,
104106
ValueFromPipelineByPropertyName = true,
105-
ParameterSetName = DomainJoined,
106107
HelpMessage = "The name of your organizational unit to join the RD Session Host servers, e.g. OU=MyOu,DC=MyDomain,DC=ParentDomain,DC=com. Attributes such as OU, DC, etc. must be in uppercase."
107108
)]
109+
[Parameter(ParameterSetName = DomainJoined)]
110+
[Parameter(ParameterSetName = AzureVNet)]
108111
[ValidatePattern(OrgIDValidatorString)]
109112
public string OrganizationalUnit { get; set; }
110113

@@ -144,11 +147,12 @@ public override void ExecuteCmdlet()
144147
switch (ParameterSetName)
145148
{
146149
case DomainJoined:
150+
case AzureVNet:
147151
{
148152
creds = Credential.GetNetworkCredential();
149153
details.VnetName = VNetName;
150154

151-
if (SubnetName != null && DnsServers != null)
155+
if (SubnetName != null)
152156
{
153157
if (!IsFeatureEnabled(EnabledFeatures.azureVNet))
154158
{
@@ -163,9 +167,12 @@ public override void ExecuteCmdlet()
163167
}
164168

165169
details.SubnetName = SubnetName;
166-
details.DnsServers = DnsServers.Split(new char[] { ',' });
170+
ValidateCustomerVNetParams(details.VnetName, details.SubnetName);
167171

168-
ValidateCustomerVNetParams(details.VnetName, details.SubnetName, details.DnsServers);
172+
if (DnsServers != null)
173+
{
174+
details.DnsServers = DnsServers.Split(new char[] { ',' });
175+
}
169176

170177
details.Region = Location;
171178
}
@@ -196,7 +203,7 @@ public override void ExecuteCmdlet()
196203
}
197204
}
198205

199-
private bool ValidateCustomerVNetParams(string name, string subnet, IEnumerable<string> dns)
206+
private bool ValidateCustomerVNetParams(string name, string subnet)
200207
{
201208
NetworkListResponse.VirtualNetworkSite azureVNet = GetAzureVNet(name);
202209
bool isValidSubnetName = false;
@@ -236,7 +243,7 @@ private bool ValidateCustomerVNetParams(string name, string subnet, IEnumerable<
236243
ThrowTerminatingError(er);
237244
}
238245

239-
return isValidSubnetName;
246+
return isValidSubnetName;
240247
}
241248

242249
private NetworkListResponse.VirtualNetworkSite GetAzureVNet(string name)

0 commit comments

Comments
 (0)