Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Samples/FarmSample.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ $RDSServer1 = "rds1.company.dom" #(replace 'rds1.company.dom' with a valid FQDN
$RDSServer2 = "rds2.company.dom" #(replace 'rds2.company.dom' with a valid FQDN, computer name, or IP address).
$RDSServer3 = "rds3.company.dom" #(replace 'rds3.company.dom' with a valid FQDN, computer name, or IP address).
$RDS1Desc = "Updating RDS Host 1" #(replace with a more specific name).
$RDSGroupName = "My RDS Group" #(replace with a more specific name).
$RDSHostPoolName = "My RDS HP" #(replace with a more specific name).
$RDSDefSettMaxSessions = 100 #(replace default value with preferred max sessions).
$RDSDefSettAppMonitor = $true #(replace default value with preferred App Monitoring value (Enabeld/Disabled)).
$PubDeskName = "PubDesktop" #(replace with a more specific name).
Expand Down Expand Up @@ -73,15 +73,15 @@ Write-Host ($RDSList | Format-Table | Out-String)

#Create an RD Session Host Group and add both RD Session Host objects to it.
log "Add an RD Session host group (with list of RD Sessions)"
New-RASRDSHostPool -Name $RDSGroupName -RDSObject $RDSList
New-RASRDSHostPool -Name $RDSHostPoolName -RDSObject $RDSList

#Add the third RD Session Host server.
log "Adding the third RD Session Host server"
$RDS3 = New-RASRDSHost -Server $RDSServer3

#Move the RD Session host to an existing RDS Group.
log "Move the RD Session host to an existing RDS Group"
Move-RASRDSGroupMember -GroupName $RDSGroupName -RDSServer $RDS3.Server
Move-RASRDSHostPoolMember -HostPoolName $RDSHostPoolName -RDSServer $RDS3.Server

#Update default settings used to configure RD Session Host agents.
log "Updating RDS default settings"
Expand Down
17 changes: 6 additions & 11 deletions Samples/PublishingSample.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ $RDSList = Get-RASRDSHost
log "Print the list of RD Session servers retrieved"
Write-Host ($RDSList | Format-Table | Out-String)

#Create an RD Session Host Group and add both RD Session Host objects to it.
#Create an RD Session Host Pool and add both RD Session Host objects to it.
log "Add an RD Session host group (with list of RD Sessions)"
New-RASRDSHostPool -Name $RDSGroupName -Description "RDSTemplates Pool" -WorkLoadThreshold 50 -ServersToAddPerRequest 2 `
-WorkLoadToDrain 20 -HostsToCreate 1 -HostName $VMNameFormat -MinServersFromTemplate 2 -MaxServersFromTemplate 2 -Autoscale $true -RDSObject $RDSList
Expand Down Expand Up @@ -109,20 +109,15 @@ Set-RASPubRDSApp -InputObject $App_Sales -InheritShortcutDefaultSettings $false

###### PUB FILTERING CONFIGURATION ######

#Set AD account filters by ID.
log "Set Active Directory filters for Accounts published desktop"
Set-RASCriteria -ObjType PubItem -InputObject $Desk_Sales -Enable $true -Replicate $true
#Set Security Principal for Accounts published desktop by ID.
log "Set Security Principal for Accounts published desktop"
Set-RASCriteria -ObjType PubItem -Id $Desk_Sales.Id -SecurityPrincipalsEnabled $true -RuleId 1
Add-RASCriteriaSecurityPrincipal -Account "Accounts" -SID "10" -Id $Desk_Acc.Id -ObjType PubItem -RuleId 1

#Set AD account filters by object.
log "Set Active Directory filters for Sales published desktop"
Set-RASCriteria -InputObject $Desk_Sales -Enable $true -Replicate $true
Add-RASCriteriaSecurityPrincipal -InputObject $App_Acc -IP "10.0.0.1-10.0.0.12"

#Set an IP filter (with range) on application.
log "Set IP filters for Accounts published application"
Set-RASCriteria -ObjType PubItem -InputObject $App_Acc -Enable $true
Add-RASCriteriaSecurityPrincipal -InputObject $App_Acc -IP "10.0.0.1-10.0.0.12"
Set-RASCriteria -ObjType PubItem -Id $App_Acc.Id -IPsEnabled $true -RuleId 1
Add-RASCriteriaIP -InputObject $App_Acc -IP "10.0.0.1-10.0.0.12" -IPType Version4 -RuleId 1

#Apply all settings. This cmdlet performs the same action as the Apply button in the RAS console.
log "Appling settings"
Expand Down
2 changes: 1 addition & 1 deletion Samples/RDSTemplateSample.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ New-RASSession

#Add a Provider.
log "Adding a new Provider"
$Provider = New-RASProvider -Server $VDIServer VMwareESXi -VmwareESXiVersion v6_5 -ProviderUsername root -ProviderPassword $AdminPassword -VDIAgent $VDIAgent -Username $AdminUsername -Password $AdminPassword
$Provider = New-RASProvider -VMwareESXi -VmwareESXiVersion v6_5 -Server $VDIServer -ProviderUsername root -ProviderPassword $AdminPassword -VDIAgent $VDIAgent -Username $AdminUsername -Password $AdminPassword

#Apply all settings. This cmdlet performs the same action as the Apply button in the RAS console.
log "Appling settings"
Expand Down