Merge pull request #2 from BaoyinQiao/master

pull from master
This commit is contained in:
Baoyin Qiao
2020-04-02 18:35:22 +08:00
committed by GitHub
81 changed files with 15281 additions and 57 deletions

View File

@@ -199,7 +199,7 @@ Function Get-ContentLibraryItemFiles {
foreach($file in $files) {
if($contentLibraryItemStorageService.get($itemId, $($file.name)).storage_backing.type -eq "DATASTORE"){
$filepath = $contentLibraryItemStorageService.get($itemId, $($file.name)).storage_uris.AbsolutePath.split("/")[5..7] -join "/"
$filepath = $contentLibraryItemStorageService.get($itemId, $($file.name)).storage_uris.segments -notmatch '(^/$|^vmfs$*|^volumes$*|vsan:.*)' -join ''
$fullfilepath = "[$($datastore.name)] $filepath"
}
else{

68
Modules/VCSA/VCSA.psm1 Normal file
View File

@@ -0,0 +1,68 @@
Function Get-VCSAPasswordPolicy {
<#
.DESCRIPTION Retrieves vCenter Server Appliance SSO and Local OS Password Policy Configuration
.NOTES Author: William Lam
.PARAMETER VCSAName
Inventory name of the VCSA VM
.PARAMETER VCSARootPassword
Root password for VCSA VM
.PARAMETER SSODomain
SSO Domain of the VCSA VM
.PARAMETER SSOPassword
Administrator password for the SSO Domain of the VCSA VM
.EXAMPLE
Get-VCSAPasswordPolicy -VCSAName "MGMT-VCSA-01" -VCSARootPassword "VMware1!" -SSODomain "vsphere.local" -SSOPassword "VMware1!"
#>
Param (
[Parameter(Mandatory=$true)][String]$VCSAName,
[Parameter(Mandatory=$true)][String]$VCSARootPassword,
[Parameter(Mandatory=$true)][String]$SSODomain,
[Parameter(Mandatory=$true)][String]$SSOPassword
)
$vm = Get-Vm -Name $VCSAName
if($vm) {
$a,$b = $SSODomain.split(".")
$ssoPasswordPolicy = Invoke-VMScript -ScriptText "/opt/likewise/bin/ldapsearch -h localhost -w $SSOPassword -x -D `"cn=Administrator,cn=Users,dc=$a,dc=$b`" -b `"cn=password and lockout policy,dc=$a,dc=$b`" | grep vmwPassword" -vm $vm -GuestUser "root" -GuestPassword $VCSARootPassword
$localOSPasswordPolicy = Invoke-VMScript -ScriptText "cat /etc/login.defs | grep -v '#' | grep PASS" -vm $vm -GuestUser "root" -GuestPassword $VCSARootPassword
Write-Host -ForegroundColor green "`nSSO Password Policy: "
$ssoPasswordPolicy
Write-Host -ForegroundColor green "`nLocalOS Password Policy: "
$localOSPasswordPolicy
} else {
Write-Host "`nUnable to find VCSA named $VCSAName"
}
}
Function Get-VCSAIdentitySource {
<#
.DESCRIPTION Retrieves vCenter Server Appliance Identity Source Configuration
.NOTES Author: William Lam
.PARAMETER VCSAName
Inventory name of the VCSA VM
.PARAMETER VCSARootPassword
Root password for VCSA VM
.EXAMPLE
Get-VCSAIdentitySource -VCSAName "MGMT-VCSA-01" -VCSARootPassword "VMware1!"
#>
Param (
[Parameter(Mandatory=$true)][String]$VCSAName,
[Parameter(Mandatory=$true)][String]$VCSARootPassword
)
$vm = Get-Vm -Name $VCSAName
if($vm) {
$identitySources = Invoke-VMScript -ScriptText "/opt/vmware/bin/sso-config.sh -get_identity_sources 2> /dev/null | sed -ne '/^*/,$ p'" -vm $vm -GuestUser "root" -GuestPassword $VCSARootPassword
Write-Host -ForegroundColor green "`nIdentity Sources: "
$identitySources
} else {
Write-Host "`nUnable to find VCSA named $VCSAName"
}
}

View File

@@ -21,8 +21,7 @@
[Parameter(Mandatory=$true)][String]$RefreshToken
)
$body = "refresh_token=$RefreshToken"
$results = Invoke-WebRequest -Uri "https://console.cloud.vmware.com/csp/gateway/am/api/auth/api-tokens/authorize" -Method POST -ContentType "application/x-www-form-urlencoded" -UseBasicParsing -Body $body
$results = Invoke-WebRequest -Uri "https://console.cloud.vmware.com/csp/gateway/am/api/auth/api-tokens/authorize" -Method POST -Headers @{accept='application/json'} -Body "refresh_token=$RefreshToken"
if($results.StatusCode -ne 200) {
Write-Host -ForegroundColor Red "Failed to retrieve Access Token, please ensure your VMC Refresh Token is valid and try again"
break

View File

@@ -32,7 +32,7 @@ Function Connect-DRaas {
}
$results = Invoke-WebRequest -Uri "https://console.cloud.vmware.com/csp/gateway/am/api/auth/api-tokens/authorize?refresh_token=$RefreshToken" -Method POST -ContentType "application/json" -UseBasicParsing -Headers @{"csp-auth-token"="$RefreshToken"}
$results = Invoke-WebRequest -Uri "https://console.cloud.vmware.com/csp/gateway/am/api/auth/api-tokens/authorize" -Method POST -Headers @{accept='application/json'} -Body "refresh_token=$RefreshToken"
if($results.StatusCode -ne 200) {
Write-Host -ForegroundColor Red "Failed to retrieve Access Token, please ensure your VMC Refresh Token is valid and try again"
break

View File

@@ -1382,7 +1382,7 @@ Function Connect-HcxCloudServer {
[Switch]$Troubleshoot
)
$results = Invoke-WebRequest -Uri "https://console.cloud.vmware.com/csp/gateway/am/api/auth/api-tokens/authorize?refresh_token=$RefreshToken" -Method POST -ContentType "application/json" -UseBasicParsing -Headers @{"csp-auth-token"="$RefreshToken"}
$results = Invoke-WebRequest -Uri "https://console.cloud.vmware.com/csp/gateway/am/api/auth/api-tokens/authorize" -Method POST -Headers @{accept='application/json'} -Body "refresh_token=$RefreshToken"
if($results.StatusCode -ne 200) {
Write-Host -ForegroundColor Red "Failed to retrieve Access Token, please ensure your VMC Refresh Token is valid and try again"
break

View File

@@ -1,4 +1,4 @@
Prerequisites/Steps to use this module:
# Prerequisites/Steps to use this module
1. This module only works for Horizon product E.g. Horizon 7.0.2 and later.
2. Install the latest version of Powershell, PowerCLI(6.5) or (later version via psgallery).
@@ -6,15 +6,24 @@ Prerequisites/Steps to use this module:
4. Import "VMware.Hv.Helper" module by running: Import-Module -Name "location of this module" or Get-Module -ListAvailable 'VMware.Hv.Helper' | Import-Module.
5. Get-Command -Module "This module Name" to list all available functions or Get-Command -Module 'VMware.Hv.Helper'.
# Example script to connect view API service of Connection Server:
# Example script to connect ViewAPI service
```
Import-Module VMware.VimAutomation.HorizonView
# Connection to view API service
$hvServer = Connect-HVServer -server <connection server IP/FQDN>
$hvServices = $hvserver.ExtensionData
# List Connection Servers
$csList = $hvServices.ConnectionServer.ConnectionServer_List()
```
# Load this module
```
Get-Module -ListAvailable 'VMware.Hv.Helper' | Import-Module
Get-Command -Module 'VMware.Hv.Helper'
```
# Use advanced functions of this module
```
New-HVPool -spec 'path to InstantClone.json file'
```

View File

@@ -12,7 +12,7 @@
# RootModule = ''
# Version number of this module.
ModuleVersion = '1.3'
ModuleVersion = '1.3.1'
# ID used to uniquely identify this module
GUID = '6d3f7fb5-4e52-43d8-91e1-f65f72532a1d'

View File

@@ -1,5 +1,5 @@
#Script Module : VMware.Hv.Helper
#Version : 1.3
#Version : 1.3.1
#Copyright © 2016 VMware, Inc. All Rights Reserved.
@@ -647,8 +647,8 @@ function Connect-HVEvent {
Connecting to the database with customised user name and password.
.EXAMPLE
C:\PS>$password = Read-Host 'Database Password' -AsSecureString
C:\PS>$hvDbServer = Connect-HVEvent -HvServer $hvServer -DbUserName 'system' -DbPassword $password
$password = Read-Host 'Database Password' -AsSecureString
$hvDbServer = Connect-HVEvent -HvServer $hvServer -DbUserName 'system' -DbPassword $password
Connecting to the database with customised user name and password, with password being a SecureString.
.OUTPUTS
@@ -854,13 +854,13 @@ function Get-HVEvent {
String that can applied in filtering on 'Message' column.
.EXAMPLE
C:\PS>$e = Get-HVEvent -hvDbServer $hvDbServer
C:\PS>$e.Events
$e = Get-HVEvent -hvDbServer $hvDbServer
$e.Events
Querying all the database events on database $hvDbServer.
.EXAMPLE
C:\PS>$e = Get-HVEvent -HvDbServer $hvDbServer -TimePeriod 'all' -FilterType 'startsWith' -UserFilter 'aduser' -SeverityFilter 'err' -TimeFilter 'HH:MM:SS.fff' -ModuleFilter 'broker' -MessageFilter 'aduser'
C:\PS>$e.Events | Export-Csv -Path 'myEvents.csv' -NoTypeInformation
$e = Get-HVEvent -HvDbServer $hvDbServer -TimePeriod 'all' -FilterType 'startsWith' -UserFilter 'aduser' -SeverityFilter 'err' -TimeFilter 'HH:MM:SS.fff' -ModuleFilter 'broker' -MessageFilter 'aduser'
$e.Events | Export-Csv -Path 'myEvents.csv' -NoTypeInformation
Querying all the database events where user name startswith 'aduser', severity is of 'err' type, having module name as 'broker', message starting with 'aduser' and time starting with 'HH:MM:SS.fff'.
The resulting events will be exported to a csv file 'myEvents.csv'.
@@ -1729,20 +1729,21 @@ function Get-HVQueryFilter {
Creates queryFilterStartsWith with given parameters memberName and memberValue
.EXAMPLE
C:\PS>$filter = Get-HVQueryFilter data.name -Startswith vmware
C:\PS>Get-HVQueryFilter -Not $filter
$filter = Get-HVQueryFilter data.name -Startswith vmware
Get-HVQueryFilter -Not $filter
Creates queryFilterNot with given parameter filter
.EXAMPLE
C:\PS>$filter1 = Get-HVQueryFilter data.name -Startswith vmware
C:\PS>$filter2 = Get-HVQueryFilter data.name -Contains pool
C:\PS>Get-HVQueryFilter -And @($filter1, $filter2)
$filter1 = Get-HVQueryFilter data.name -Startswith vmware
$filter2 = Get-HVQueryFilter data.name -Contains pool
Get-HVQueryFilter -And @($filter1, $filter2)
Creates queryFilterAnd with given parameter filters array
.EXAMPLE
C:\PS>$filter1 = Get-HVQueryFilter data.name -Startswith vmware
C:\PS>$filter2 = Get-HVQueryFilter data.name -Contains pool
C:\PS>Get-HVQueryFilter -Or @($filter1, $filter2)
$filter1 = Get-HVQueryFilter data.name -Startswith vmware
$filter2 = Get-HVQueryFilter data.name -Contains pool
Get-HVQueryFilter -Or @($filter1, $filter2)
Creates queryFilterOr with given parameter filters array
.OUTPUTS
@@ -1881,8 +1882,8 @@ function Get-HVQueryResult {
Returns query results of entityType DesktopSummaryView with given filter
.EXAMPLE
C:\PS>$myFilter = Get-HVQueryFilter data.name -Contains vmware
C:\PS>Get-HVQueryResult -EntityType DesktopSummaryView -Filter $myFilter -SortBy desktopSummaryData.displayName -SortDescending $false
$myFilter = Get-HVQueryFilter data.name -Contains vmware
Get-HVQueryResult -EntityType DesktopSummaryView -Filter $myFilter -SortBy desktopSummaryData.displayName -SortDescending $false
Returns query results of entityType DesktopSummaryView with given filter and also sorted based on dispalyName
.EXAMPLE
@@ -3587,17 +3588,17 @@ function New-HVPool {
first element from global:DefaultHVServers would be considered in-place of hvServer.
.EXAMPLE
C:\PS>New-HVPool -LinkedClone -PoolName 'vmwarepool' -UserAssignment FLOATING -ParentVM 'Agent_vmware' -SnapshotVM 'kb-hotfix' -VmFolder 'vmware' -HostOrCluster 'CS-1' -ResourcePool 'CS-1' -Datastores 'datastore1' -NamingMethod PATTERN -PoolDisplayName 'vmware linkedclone pool' -Description 'created linkedclone pool from ps' -EnableProvisioning $true -StopProvisioningOnError $false -NamingPattern "vmware2" -MinReady 0 -MaximumCount 1 -SpareCount 1 -ProvisioningTime UP_FRONT -SysPrepName vmwarecust -CustType SYS_PREP -NetBiosName adviewdev -DomainAdmin root
Create new automated linked clone pool with naming method pattern
New-HVPool -LinkedClone -PoolName 'vmwarepool' -UserAssignment FLOATING -ParentVM 'Agent_vmware' -SnapshotVM 'kb-hotfix' -VmFolder 'vmware' -HostOrCluster 'CS-1' -ResourcePool 'CS-1' -Datastores 'datastore1' -NamingMethod PATTERN -PoolDisplayName 'vmware linkedclone pool' -Description 'created linkedclone pool from ps' -EnableProvisioning $true -StopProvisioningOnError $false -NamingPattern "vmware2" -MinReady 0 -MaximumCount 1 -SpareCount 1 -ProvisioningTime UP_FRONT -SysPrepName vmwarecust -CustType SYS_PREP -NetBiosName adviewdev -DomainAdmin root
Create new automated linked clone pool with naming method pattern
.EXAMPLE
New-HVPool -Spec C:\VMWare\Specs\LinkedClone.json -Confirm:$false
Create new automated linked clone pool by using JSON spec file
New-HVPool -Spec C:\VMWare\Specs\LinkedClone.json -Confirm:$false
Create new automated linked clone pool by using JSON spec file
.EXAMPLE
C:\PS>Get-HVPool -PoolName 'vmwarepool' | New-HVPool -PoolName 'clonedPool' -NamingPattern 'clonelnk1';
Get-HVPool -PoolName 'vmwarepool' | New-HVPool -PoolName 'clonedPool' -NamingPattern 'clonelnk1';
(OR)
C:\PS>$vmwarepool = Get-HVPool -PoolName 'vmwarepool'; New-HVPool -ClonePool $vmwarepool -PoolName 'clonedPool' -NamingPattern 'clonelnk1';
$vmwarepool = Get-HVPool -PoolName 'vmwarepool'; New-HVPool -ClonePool $vmwarepool -PoolName 'clonedPool' -NamingPattern 'clonelnk1';
Clones new pool by using existing pool configuration
.EXAMPLE
@@ -3746,6 +3747,7 @@ function New-HVPool {
#desktopSpec.desktopSettings.logoffSettings.allowUsersToResetMachines
[Parameter(Mandatory = $false,ParameterSetName = 'INSTANT_CLONE')]
[Parameter(Mandatory = $false,ParameterSetName = "LINKED_CLONE")]
[Parameter(Mandatory = $false,ParameterSetName = 'MANUAL')]
[boolean]$allowUsersToResetMachines = $false,
#desktopSpec.desktopSettings.logoffSettings.allowMultipleSessionsPerUser
@@ -3777,23 +3779,27 @@ function New-HVPool {
#desktopSpec.desktopSettings.logoffSettings.supportedDisplayProtocols
[Parameter(Mandatory = $false,ParameterSetName = 'INSTANT_CLONE')]
[Parameter(Mandatory = $false,ParameterSetName = "LINKED_CLONE")]
[Parameter(Mandatory = $false,ParameterSetName = 'MANUAL')]
[ValidateSet('RDP', 'PCOIP', 'BLAST')]
[string[]]$supportedDisplayProtocols = @('RDP', 'PCOIP', 'BLAST'),
#desktopSpec.desktopSettings.logoffSettings.defaultDisplayProtocol
[Parameter(Mandatory = $false,ParameterSetName = 'INSTANT_CLONE')]
[Parameter(Mandatory = $false,ParameterSetName = "LINKED_CLONE")]
[Parameter(Mandatory = $false,ParameterSetName = 'LINKED_CLONE')]
[Parameter(Mandatory = $false,ParameterSetName = 'MANUAL')]
[ValidateSet('RDP', 'PCOIP', 'BLAST')]
[string]$defaultDisplayProtocol = 'PCOIP',
#desktopSpec.desktopSettings.logoffSettings.allowUsersToChooseProtocol
[Parameter(Mandatory = $false,ParameterSetName = 'INSTANT_CLONE')]
[Parameter(Mandatory = $false,ParameterSetName = "LINKED_CLONE")]
[Parameter(Mandatory = $false,ParameterSetName = 'MANUAL')]
[int]$allowUsersToChooseProtocol = $true,
#desktopSpec.desktopSettings.logoffSettings.enableHTMLAccess
[Parameter(Mandatory = $false,ParameterSetName = 'INSTANT_CLONE')]
[Parameter(Mandatory = $false,ParameterSetName = "LINKED_CLONE")]
[Parameter(Mandatory = $false,ParameterSetName = 'MANUAL')]
[boolean]$enableHTMLAccess = $false,
# DesktopPCoIPDisplaySettings
@@ -5655,8 +5661,8 @@ function Remove-HVFarm {
Deletes a given Farm object(s). For an automated farm, all the RDS Server VMs are deleted from disk whereas for a manual farm only the RDS Server associations are removed.
.EXAMPLE
C:\PS>$farm1 = Get-HVFarm -FarmName 'Farm-01'
C:\PS>Remove-HVFarm -Farm $farm1
$farm1 = Get-HVFarm -FarmName 'Farm-01'
Remove-HVFarm -Farm $farm1
Deletes a given Farm object. For an automated farm, all the RDS Server VMs are deleted from disk whereas for a manual farm only the RDS Server associations are removed.
.OUTPUTS
@@ -6207,6 +6213,9 @@ function Set-HVPool {
[string]
$ResourcePool,
[Parameter(Mandatory = $false)]
[switch]$clearGlobalEntitlement,
[Parameter(Mandatory = $false)]
[boolean]$allowUsersToChooseProtocol,
@@ -6319,6 +6328,12 @@ function Set-HVPool {
}
}
if ($clearGlobalEntitlement) {
$update = New-Object VMware.Hv.MapEntry
$update.key = 'globalEntitlementData.globalEntitlement'
$updates += $update
}
$info = $services.PodFederation.PodFederation_get()
if ($globalEntitlement -and ("ENABLED" -eq $info.localPodStatus.status)) {
$QueryFilterEquals = New-Object VMware.Hv.QueryFilterEquals
@@ -6430,8 +6445,8 @@ function Start-HVFarm {
Requests a recompose of RDS Servers in the specified automated farm
.EXAMPLE
C:\PS>$myTime = Get-Date '10/03/2016 12:30:00'
C:\PS>Start-HVFarm -Farm 'Farm-01' -Recompose -LogoffSetting 'FORCE_LOGOFF' -ParentVM 'ParentVM' -SnapshotVM 'SnapshotVM' -StartTime $myTime
$myTime = Get-Date '10/03/2016 12:30:00'
Start-HVFarm -Farm 'Farm-01' -Recompose -LogoffSetting 'FORCE_LOGOFF' -ParentVM 'ParentVM' -SnapshotVM 'SnapshotVM' -StartTime $myTime
Requests a recompose task for automated farm in specified time
.EXAMPLE
@@ -6814,8 +6829,8 @@ function Start-HVPool {
Requests a refresh of machines in the specified pool
.EXAMPLE
C:\PS>$myTime = Get-Date '10/03/2016 12:30:00'
C:\PS>Start-HVPool -Rebalance -Pool 'LCPool3' -LogoffSetting FORCE_LOGOFF -StartTime $myTime
$myTime = Get-Date '10/03/2016 12:30:00'
Start-HVPool -Rebalance -Pool 'LCPool3' -LogoffSetting FORCE_LOGOFF -StartTime $myTime
Requests a rebalance of machines in a pool with specified time
.EXAMPLE
@@ -6996,7 +7011,8 @@ function Start-HVPool {
$updates = @()
$updates += Get-MapEntry -key 'automatedDesktopData.virtualCenterProvisioningSettings.virtualCenterProvisioningData.parentVm' -value $spec.ParentVM
$updates += Get-MapEntry -key 'automatedDesktopData.virtualCenterProvisioningSettings.virtualCenterProvisioningData.snapshot' -value $spec.Snapshot
if (!$confirmFlag -OR $pscmdlet.ShouldProcess($poolList.$item)) {
if ($startTime) { $spec.Settings.startTime = $startTime }
if (!$confirmFlag -OR $pscmdlet.ShouldProcess($poolList.$item)) {
$desktop_helper.Desktop_Update($services,$item,$updates)
}
Write-Host "Performed recompose task on Pool: " $PoolList.$item
@@ -7767,7 +7783,7 @@ function Get-HVPoolSpec {
if (! $DesktopInfoPsObj.GlobalEntitlementData.GlobalEntitlement) {
$DesktopPsObj.GlobalEntitlementData = $null
} else {
$entityId.Id = $DesktopInfoPsObj.GlobalEntitlementData.GlobalEntitlement.Id
$entityId = $DesktopInfoPsObj.GlobalEntitlementData.GlobalEntitlement
$DesktopPsObj.GlobalEntitlementData = Get-HVInternalName -EntityId $entityId
}
@@ -8025,7 +8041,13 @@ function Get-HVInternalName {
}
'GlobalApplicationEntitlement' {
$info = $services.GlobalApplicationEntitlement.GlobalApplicationEntitlement_Get($EntityId)
return $info.Base.displayName
return $info.base.displayName
}
'GlobalEntitlement' {
$GlobalEntitlementID = New-Object VMware.Hv.GlobalEntitlementId
$GlobalEntitlementID.Id = $EntityID.Id
$info = $services.GlobalEntitlement.GlobalEntitlement_Get($GlobalEntitlementID)
return $info.base.displayname
}
default {
$base64String = $tokens[$tokens.Length-1]
@@ -10679,7 +10701,7 @@ function Get-HVHealth {
[System.gc]::collect()
}
function new-hvpodfederation {
function New-HVPodFederation {
<#
.Synopsis
Initiates a Horizon View Pod Federation (Cloud Pod Architecture)
@@ -10730,7 +10752,7 @@ function new-hvpodfederation {
[System.gc]::collect()
}
function remove-hvpodfederation {
function Remove-HVPodFederation {
<#
.Synopsis
Uninitiates a Horizon View Pod Federation (Cloud Pod Architecture)
@@ -10831,7 +10853,7 @@ function Get-HVPodFederation {
[System.gc]::collect()
}
function register-hvpod {
function Register-HVPod {
<#
.Synopsis
Registers a pod in a Horizon View Pod Federation (Cloud Pod Architecture)
@@ -10854,8 +10876,8 @@ function register-hvpod {
first element from global:DefaultHVServers would be considered in-place of hvServer
.EXAMPLE
C:\PS>$adpassword = Read-Host 'Domain Password' -AsSecureString
C:\PS>register-hvpod -remoteconnectionserver "servername" -username "user\domain" -password $adpassword
$adpassword = Read-Host 'Domain Password' -AsSecureString
register-hvpod -remoteconnectionserver "servername" -username "user\domain" -password $adpassword
.EXAMPLE
register-hvpod -remoteconnectionserver "servername" -username "user\domain"
@@ -10918,7 +10940,7 @@ function register-hvpod {
[System.gc]::collect()
}
function unregister-hvpod {
function Unregister-HVPod {
<#
.Synopsis
Removes a pod from a podfederation
@@ -11008,7 +11030,7 @@ function unregister-hvpod {
[System.gc]::collect()
}
function set-hvpodfederation {
function Set-HVPodFederation {
<#
.Synopsis
Used to change the name of a Horizon View Pod Federation (Cloud Pod Architecture)
@@ -11067,7 +11089,7 @@ function set-hvpodfederation {
[System.gc]::collect()
}
function get-hvsite {
function Get-HVSite {
<#
.Synopsis
Returns information about the sites within a Horizon View Pod Federation (Cloud Pod Architecture)
@@ -11117,7 +11139,7 @@ function get-hvsite {
[System.gc]::collect()
}
function new-hvsite {
function New-HVSite {
<#
.Synopsis
Creates a new site within a Horizon View Pod Federation (Cloud Pod Architecture)
@@ -11182,7 +11204,7 @@ function new-hvsite {
[System.gc]::collect()
}
function set-hvsite {
function Set-HVSite {
<#
.Synopsis
renames a new site within a Horizon View Pod Federation (Cloud Pod Architecture)
@@ -11256,7 +11278,7 @@ function set-hvsite {
[System.gc]::collect()
}
function remove-hvsite {
function Remove-HVSite {
<#
.Synopsis
renames a new site within a Horizon View Pod Federation (Cloud Pod Architecture)
@@ -11782,7 +11804,7 @@ function Set-HVlicense {
first element from global:DefaultHVServers would be considered in-place of hvServer
.EXAMPLE
set-hvlicense -license "LICENSE-KEY"
Set-HVlicense -license "LICENSE-KEY"
Returns information about the sites within a Horizon View Pod Federation.
.NOTES
@@ -12660,7 +12682,10 @@ param (
[Boolean]$AutoUpdateOtherFileTypes = $True,
[Parameter(Mandatory = $False)]
[String]$GlobalApplicationEntitlement = $null
[String]$GlobalApplicationEntitlement = $null,
[Parameter(Mandatory = $false)]
[switch]$clearGlobalEntitlement
)
begin {
$services = Get-ViewAPIService -HvServer $HvServer
@@ -12740,6 +12765,12 @@ param (
if ($PSBoundParameters.ContainsKey("AutoUpdateOtherFileTypes")) {
$updates += Get-MapEntry -key 'executionData.autoUpdateOtherFileTypes' -value $AutoUpdateOtherFileTypes
}
if ($clearGlobalEntitlement) {
$update = New-Object VMware.Hv.MapEntry
$update.key = 'data.globalApplicationEntitlement'
$updates += $update
}
$AppService = New-Object VMware.Hv.ApplicationService
$AppService.Application_Update($services,$App.Id,$updates)

View File

@@ -0,0 +1,188 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Add-HVDesktop
## SYNOPSIS
Adds virtual machine to existing pool
## SYNTAX
```
Add-HVDesktop [-PoolName] <String> [-Machines] <String[]> [[-Users] <String[]>] [[-Vcenter] <String>]
[[-HvServer] <Object>] [-WhatIf] [-Confirm] [<CommonParameters>]
```
## DESCRIPTION
The Add-HVDesktop adds virtual machines to already exiting pools by using view API service object(hvServer) of Connect-HVServer cmdlet.
VMs can be added to any of unmanaged manual, managed manual or Specified name.
This advanced function do basic checks for pool and view API service connection existance, hvServer object is bound to specific connection server.
## EXAMPLES
### EXAMPLE 1
```
Add-HVDesktop -PoolName 'ManualPool' -Machines 'manualPool1', 'manualPool2' -Confirm:$false
```
Add managed manual VMs to existing manual pool
### EXAMPLE 2
```
Add-HVDesktop -PoolName 'SpecificNamed' -Machines 'vm-01', 'vm-02' -Users 'user1', 'user2'
```
Add virtual machines to automated specific named dedicated pool
### EXAMPLE 3
```
Add-HVDesktop -PoolName 'SpecificNamed' -Machines 'vm-03', 'vm-04'
```
Add machines to automated specific named Floating pool
### EXAMPLE 4
```
Add-HVDesktop -PoolName 'Unmanaged' -Machines 'desktop-1.eng.vmware.com'
```
Add machines to unmanged manual pool
## PARAMETERS
### -PoolName
Pool name to which new VMs are to be added.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Machines
List of virtual machine names which need to be added to the given pool.
```yaml
Type: String[]
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Users
List of virtual machine users for given machines.
```yaml
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Vcenter
Virtual Center server-address (IP or FQDN) of the given pool.
This should be same as provided to the Connection Server while adding the vCenter server.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -HvServer
View API service object of Connect-HVServer cmdlet.
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
## NOTES
| | |
|-|-|
| Author | Praveen Mathamsetty |
| Author email | pmathamsetty@vmware.com |
| Version | 1.1 |
| Dependencies | Make sure pool already exists before adding VMs to it. |
### Tested Against Environment
| | |
|-|-|
| Horizon View Server Version | 7.0.2, 7.1.0 |
| PowerCLI Version | PowerCLI 6.5, PowerCLI 6.5.1 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -0,0 +1,138 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Add-HVRDSServer
## SYNOPSIS
Add RDS Servers to an existing farm.
## SYNTAX
```
Add-HVRDSServer [-FarmName] <Object> [-RdsServers] <String[]> [[-HvServer] <Object>] [-WhatIf] [-Confirm]
[<CommonParameters>]
```
## DESCRIPTION
The Add-HVRDSServer adds RDS Servers to already exiting farms by using view API service object(hvServer) of Connect-HVServer cmdlet.
We can add RDSServers to manual farm type only.
This advanced function do basic checks for farm and view API service connection existance.
This hvServer is bound to specific connection server.
## EXAMPLES
### EXAMPLE 1
```
Add-HVRDSServer -Farm "manualFarmTest" -RdsServers "vm-for-rds","vm-for-rds-2" -Confirm:$false
```
Add RDSServers to manual farm
## PARAMETERS
### -FarmName
farm name to which new RDSServers are to be added.
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -RdsServers
RDS servers names which need to be added to the given farm.
Provide a comma separated list for multiple names.
```yaml
Type: String[]
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -HvServer
View API service object of Connect-HVServer cmdlet.
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
### None
## NOTES
| | |
|-|-|
| Author | praveen mathamsetty. |
| Author email | pmathamsetty@vmware.com |
| Version | 1.1 |
| Dependencies | Make sure farm already exists before adding RDSServers to it. |
### Tested Against Environment
| | |
|-|-|
| Horizon View Server Version | 7.0.2, 7.1.0 |
| PowerCLI Version | PowerCLI 6.5, PowerCLI 6.5.1 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -0,0 +1,100 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Clear-HVEventDatabase
## SYNOPSIS
Clears configurationof the configured Event Database
## SYNTAX
```
Clear-HVEventDatabase [[-HvServer] <Object>] [-WhatIf] [-Confirm] [<CommonParameters>]
```
## DESCRIPTION
Clears configurationof the configured Event Database
## EXAMPLES
### EXAMPLE 1
```
Clear-HVEventDatabase
```
## PARAMETERS
### -HvServer
Reference to Horizon View Server to query the virtual machines from.
If the value is not passed or null then
first element from global:DefaultHVServers would be considered in-place of hvServer
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
## NOTES
| | |
|-|-|
| Author | Wouter Kursten |
| Author email | wouter@retouw.nl |
| Version | 1.0 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.4 |
| PowerCLI Version | PowerCLI 10 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -0,0 +1,127 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Connect-HVEvent
## SYNOPSIS
This function is used to connect to the event database configured on Connection Server.
## SYNTAX
```
Connect-HVEvent [[-DbPassword] <SecureString>] [[-HvServer] <Object>] [[-DbUserName] <String>]
[<CommonParameters>]
```
## DESCRIPTION
This function queries the specified Connection Server for event database configuration and returns the connection object to it.
If event database is not configured on specified connection server, it will return null.
Currently, Horizon 7 is supporting SQL server and Oracle 12c as event database servers.
To configure event database, goto 'Event Database Configuration' tab in Horizon admin UI.
## EXAMPLES
### EXAMPLE 1
```
Connect-HVEvent -HvServer $hvServer
```
Connecting to the database with default username configured on Connection Server $hvServer.
### EXAMPLE 2
```
$hvDbServer = Connect-HVEvent -HvServer $hvServer -DbUserName 'system'
```
Connecting to the database configured on Connection Server $hvServer with customised user name 'system'.
### EXAMPLE 3
```
$hvDbServer = Connect-HVEvent -HvServer $hvServer -DbUserName 'system' -DbPassword 'censored'
```
Connecting to the database with customised user name and password.
### EXAMPLE 4
```
$password = Read-Host 'Database Password' -AsSecureString
```
$hvDbServer = Connect-HVEvent -HvServer $hvServer -DbUserName 'system' -DbPassword $password
Connecting to the database with customised user name and password, with password being a SecureString.
## PARAMETERS
### -DbPassword
Password corresponds to 'dbUserName' user.
```yaml
Type: SecureString
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -HvServer
View API service object of Connect-HVServer cmdlet.
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -DbUserName
User name to be used in database connection.
If not passed, default database user name on the Connection Server will be used.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
### Returns a custom object that has database connection as 'dbConnection' property.
## NOTES
| | |
|-|-|
| Author | Paramesh Oddepally. |
| Author email | poddepally@vmware.com |
| Version | 1.1 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.0.2, 7.1.0 |
| PowerCLI Version | PowerCLI 6.5, PowerCLI 6.5.1 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -0,0 +1,71 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Disconnect-HVEvent
## SYNOPSIS
This function is used to disconnect the database connection.
## SYNTAX
```
Disconnect-HVEvent [-HvDbServer] <PSObject> [<CommonParameters>]
```
## DESCRIPTION
This function will disconnect the database connection made earlier during Connect-HVEvent function.
## EXAMPLES
### EXAMPLE 1
```
Disconnect-HVEvent -HvDbServer $hvDbServer
```
Disconnecting the database connection on $hvDbServer.
## PARAMETERS
### -HvDbServer
Connection object returned by Connect-HVEvent advanced function.
This is a mandatory input.
```yaml
Type: PSObject
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
### None
## NOTES
| | |
|-|-|
| Author | Paramesh Oddepally. |
| Author email | poddepally@vmware.com |
| Version | 1.1 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.0.2, 7.1.0 |
| PowerCLI Version | PowerCLI 6.5, PowerCLI 6.5.1 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -0,0 +1,110 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Get-HVApplication
## SYNOPSIS
Gets the application information.
## SYNTAX
```
Get-HVApplication [[-ApplicationName] <String>] [[-HvServer] <Object>] [[-FormatList] <String>]
[<CommonParameters>]
```
## DESCRIPTION
Gets the application information.
This will be useful to find out whether the specified application exists or not.
If the application name is not specified, this will lists all the applications in the Pod.
## EXAMPLES
### EXAMPLE 1
```
Get-HVApplication -ApplicationName 'App1' -HvServer $HvServer
```
Queries and returns 'App1' information.
### EXAMPLE 2
```
Get-HVApplication -HvServer $HvServer -FormatList:$True
```
Lists all the applications in the Pod.
## PARAMETERS
### -ApplicationName
Name of the application.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -HvServer
View API service object of Connect-HVServer cmdlet.
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -FormatList
Displays the list of the available applications in Table Format if this parameter is set to True.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
### Returns the information of the specified application if it specified, else displays all the available applications.
## NOTES
| | |
|-|-|
| Author | Samiullasha S |
| Author email | ssami@vmware.com |
| Version | 1.2 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.8.0 |
| PowerCLI Version | PowerCLI 11.1 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -0,0 +1,143 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Get-HVBaseImageVM
## SYNOPSIS
Gets a list of compatible base image virtual machines.
## SYNTAX
### Type (Default)
```
Get-HVBaseImageVM [-HvServer <Object>] [-VirtualCenter <Object>] [-Type <Object>] [<CommonParameters>]
```
### Name
```
Get-HVBaseImageVM [-HvServer <Object>] [-VirtualCenter <Object>] [-Name <String>] [<CommonParameters>]
```
## DESCRIPTION
Queries and returns BaseImageVmInfo for the specified vCenter Server.
## EXAMPLES
### EXAMPLE 1
```
Get-HVBaseImageVM -VirtualCenter 'vCenter1' -Type VDI
```
### EXAMPLE 2
```
Get-HVBaseImageVM -VirtualCenter $vCenter1 -Type ALL
```
### EXAMPLE 3
```
Get-HVBaseImageVM -Name '*WIN10*'
```
## PARAMETERS
### -HvServer
Reference to Horizon View Server to query the virtual machines from.
If the value is not passed or null then
first element from global:DefaultHVServers would be considered in place of hvServer.
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -VirtualCenter
A parameter to specify which vCenter Server to check base image VMs for.
It can be specified as a String,
containing the name of the vCenter, or as a vCenter object as returned by Get-HVvCenterServer.
If the value is
not passed or null then first element returned from Get-HVvCenterServer would be considered in place of VirtualCenter.
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Type
A parameter to define the type of compatability to check the base image VM list against.
Valid options are 'VDI', 'RDS', or 'ALL'
'VDI' will return all desktop compatible Base Image VMs.
'RDS' will return all RDSH compatible Base Image VMs.
'ALL' will return all Base Image VMs, regardless of compatibility.
The default value is 'ALL'.
```yaml
Type: Object
Parameter Sets: Type
Aliases:
Required: False
Position: Named
Default value: VDI
Accept pipeline input: False
Accept wildcard characters: False
```
### -Name
The name of a virtual machine (if known), to filter Base Image VMs on.
Wildcards are accepted.
If Name is specified, then Type
is not considered for filtering.
```yaml
Type: String
Parameter Sets: Name
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
### Returns array of object type VMware.Hv.BaseImageVmInfo
## NOTES
| | |
|-|-|
| Author | Matt Frey. |
| Author email | mfrey@vmware.com |
| Version | 1.0 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.7 |
| PowerCLI Version | PowerCLI 11.2.0 |
| PowerShell Version | 5.1 |
## RELATED LINKS

View File

@@ -0,0 +1,154 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Get-HVEntitlement
## SYNOPSIS
Gets association data between a user/group and a resource
## SYNTAX
```
Get-HVEntitlement [[-User] <String>] [[-Type] <String>] [[-ResourceName] <String>] [[-ResourceType] <String>]
[[-HvServer] <Object>] [<CommonParameters>]
```
## DESCRIPTION
Provides entitlement Info between a single user/group and a resource that they can be assigned.
## EXAMPLES
### EXAMPLE 1
```
Get-HVEntitlement -ResourceType Application
```
Gets all the entitlements related to application pool
### EXAMPLE 2
```
Get-HVEntitlement -User 'adviewdev.eng.vmware.com\administrator' -ResourceName 'calculator' -ResourceType Application
```
Gets entitlements specific to user or group name and application resource
### EXAMPLE 3
```
Get-HVEntitlement -User 'adviewdev.eng.vmware.com\administrator' -ResourceName 'UrlSetting1' -ResourceType URLRedirection
```
Gets entitlements specific to user or group and URLRedirection resource
### EXAMPLE 4
```
Get-HVEntitlement -User 'administrator@adviewdev.eng.vmware.com' -ResourceName 'GE1' -ResourceType GlobalEntitlement
```
Gets entitlements specific to user or group and GlobalEntitlement resource
## PARAMETERS
### -User
User principal name of user or group
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Type
Whether or not this is a group or a user.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: User
Accept pipeline input: False
Accept wildcard characters: False
```
### -ResourceName
The resource(Application, Desktop etc.) name.
Supports only wildcard character '*' when resource type is desktop.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -ResourceType
Type of Resource(Application, Desktop etc.)
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: Desktop
Accept pipeline input: False
Accept wildcard characters: False
```
### -HvServer
Reference to Horizon View Server.
If the value is not passed or null then
first element from global:DefaultHVServers would be considered in-place of hvServer
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
## NOTES
| | |
|-|-|
| Author | Praveen Mathamsetty. |
| Author email | pmathamsetty@vmware.com |
| Version | 1.1 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.0.2, 7.1.0 |
| PowerCLI Version | PowerCLI 6.5, PowerCLI 6.5.1 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -0,0 +1,201 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Get-HVEvent
## SYNOPSIS
Queries the events from event database configured on Connection Server.
## SYNTAX
```
Get-HVEvent [-HvDbServer] <PSObject> [[-TimePeriod] <String>] [[-FilterType] <String>] [[-UserFilter] <String>]
[[-SeverityFilter] <String>] [[-TimeFilter] <String>] [[-ModuleFilter] <String>] [[-MessageFilter] <String>]
[<CommonParameters>]
```
## DESCRIPTION
This function is used to query the events information from event database.
It returns the object that has events in five columns as UserName, Severity, EventTime, Module and Message.
EventTime will show the exact time when the event got registered in the database and it follows timezone on database server.
User can apply different filters on the event columns using the filter parameters userFilter, severityFilter, timeFilter, moduleFilter, messageFilter.
Mention that when multiple filters are provided then rows which satisify all the filters will be returned.
## EXAMPLES
### EXAMPLE 1
```
$e = Get-HVEvent -hvDbServer $hvDbServer
```
$e.Events
Querying all the database events on database $hvDbServer.
### EXAMPLE 2
```
$e = Get-HVEvent -HvDbServer $hvDbServer -TimePeriod 'all' -FilterType 'startsWith' -UserFilter 'aduser' -SeverityFilter 'err' -TimeFilter 'HH:MM:SS.fff' -ModuleFilter 'broker' -MessageFilter 'aduser'
```
$e.Events | Export-Csv -Path 'myEvents.csv' -NoTypeInformation
Querying all the database events where user name startswith 'aduser', severity is of 'err' type, having module name as 'broker', message starting with 'aduser' and time starting with 'HH:MM:SS.fff'.
The resulting events will be exported to a csv file 'myEvents.csv'.
## PARAMETERS
### -HvDbServer
Connection object returned by Connect-HVEvent advanced function.
```yaml
Type: PSObject
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -TimePeriod
Timeperiod of the events that user is interested in.
It can take following four values:
'day' - Lists last one day events from database
'week' - Lists last 7 days events from database
'month' - Lists last 30 days events from database
'all' - Lists all the events stored in database
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: All
Accept pipeline input: False
Accept wildcard characters: False
```
### -FilterType
Type of filter action to be applied.
The parameters userfilter, severityfilter, timefilter, modulefilter, messagefilter can be used along with this.
It can take following values:
'contains' - Retrieves the events that contains the string specified in filter parameters
'startsWith' - Retrieves the events that starts with the string specified in filter parameters
'isExactly' - Retrieves the events that exactly match with the string specified in filter parameters
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: Contains
Accept pipeline input: False
Accept wildcard characters: False
```
### -UserFilter
String that can applied in filtering on 'UserName' column.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -SeverityFilter
String that can applied in filtering on 'Severity' column.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -TimeFilter
String that can applied in filtering on 'EventTime' column.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -ModuleFilter
String that can applied in filtering on 'Module' column.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 7
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -MessageFilter
String that can applied in filtering on 'Message' column.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 8
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
### Returns a custom object that has events information in 'Events' property. Events property will have events information with five columns: UserName, Severity, EventTime, Module and Message.
## NOTES
| | |
|-|-|
| Author | Paramesh Oddepally. |
| Author email | poddepally@vmware.com |
| Version | 1.1 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.0.2, 7.1.0 |
| PowerCLI Version | PowerCLI 6.5, PowerCLI 6.5.1 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -0,0 +1,69 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Get-HVEventDatabase
## SYNOPSIS
Retreives information about the configured Event Database
## SYNTAX
```
Get-HVEventDatabase [[-HvServer] <Object>] [<CommonParameters>]
```
## DESCRIPTION
Collects information about the configured event database for aHorizon View pod
## EXAMPLES
### EXAMPLE 1
```
Get-HVEventDatabase
```
## PARAMETERS
### -HvServer
Reference to Horizon View Server to query the virtual machines from.
If the value is not passed or null then
first element from global:DefaultHVServers would be considered in-place of hvServer
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
## NOTES
| | |
|-|-|
| Author | Wouter Kursten |
| Author email | wouter@retouw.nl |
| Version | 1.0 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.4 |
| PowerCLI Version | PowerCLI 10 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -0,0 +1,179 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Get-HVFarm
## SYNOPSIS
This function is used to find farms based on the search criteria provided by the user.
## SYNTAX
```
Get-HVFarm [[-FarmName] <String>] [[-FarmDisplayName] <String>] [[-FarmType] <String>] [[-Enabled] <Boolean>]
[[-SuppressInfo] <Boolean>] [[-HvServer] <Object>] [<CommonParameters>]
```
## DESCRIPTION
This function queries the specified Connection Server for farms which are configured on the server.
If no farm is configured on the specified connection server or no farm matches the given search criteria, it will return null.
## EXAMPLES
### EXAMPLE 1
```
Get-HVFarm -FarmName 'Farm-01'
```
Queries and returns farmInfo based on given parameter farmName
### EXAMPLE 2
```
Get-HVFarm -FarmName 'Farm-01' -FarmDisplayName 'Sales RDS Farm'
```
Queries and returns farmInfo based on given parameters farmName, farmDisplayName
### EXAMPLE 3
```
Get-HVFarm -FarmName 'Farm-01' -FarmType 'MANUAL'
```
Queries and returns farmInfo based on given parameters farmName, farmType
### EXAMPLE 4
```
Get-HVFarm -FarmName 'Farm-01' -FarmType 'MANUAL' -Enabled $true
```
Queries and returns farmInfo based on given parameters farmName, FarmType etc
### EXAMPLE 5
```
Get-HVFarm -FarmName 'Farm-0*'
```
Queries and returns farmInfo based on parameter farmName with wild character *
## PARAMETERS
### -FarmName
farmName to be searched
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -FarmDisplayName
farmDisplayName to be searched
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -FarmType
farmType to be searched.
It can take following values:
"AUTOMATED" - search for automated farms only
'MANUAL' - search for manual farms only
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Enabled
search for farms which are enabled
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -SuppressInfo
Suppress text info, when no farm found with given search parameters
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 5
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -HvServer
Reference to Horizon View Server to query the data from.
If the value is not passed or null then first element from global:DefaultHVServers would be considered in-place of hvServer.
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
### Returns the list of FarmInfo object matching the query criteria.
## NOTES
| | |
|-|-|
| Author | praveen mathamsetty. |
| Author email | pmathamsetty@vmware.com |
| Version | 1.1 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.0.2, 7.1.0 |
| PowerCLI Version | PowerCLI 6.5, PowerCLI 6.5.1 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -0,0 +1,179 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Get-HVFarmSummary
## SYNOPSIS
This function is used to find farms based on the search criteria provided by the user.
## SYNTAX
```
Get-HVFarmSummary [[-FarmName] <String>] [[-FarmDisplayName] <String>] [[-FarmType] <String>]
[[-Enabled] <Boolean>] [[-SuppressInfo] <Boolean>] [[-HvServer] <Object>] [<CommonParameters>]
```
## DESCRIPTION
This function queries the specified Connection Server for farms which are configured on the server.
If no farm is configured on the specified connection server or no farm matches the given search criteria, it will return null.
## EXAMPLES
### EXAMPLE 1
```
Get-HVFarmSummary -FarmName 'Farm-01'
```
Queries and returns farmSummary objects based on given parameter farmName
### EXAMPLE 2
```
Get-HVFarmSummary -FarmName 'Farm-01' -FarmDisplayName 'Sales RDS Farm'
```
Queries and returns farmSummary objects based on given parameters farmName, farmDisplayName
### EXAMPLE 3
```
Get-HVFarmSummary -FarmName 'Farm-01' -FarmType 'MANUAL'
```
Queries and returns farmSummary objects based on given parameters farmName, farmType
### EXAMPLE 4
```
Get-HVFarmSummary -FarmName 'Farm-01' -FarmType 'MANUAL' -Enabled $true
```
Queries and returns farmSummary objects based on given parameters farmName, FarmType etc
### EXAMPLE 5
```
Get-HVFarmSummary -FarmName 'Farm-0*'
```
Queries and returns farmSummary objects based on given parameter farmName with wild character *
## PARAMETERS
### -FarmName
FarmName to be searched
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -FarmDisplayName
FarmDisplayName to be searched
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -FarmType
FarmType to be searched.
It can take following values:
"AUTOMATED" - search for automated farms only
'MANUAL' - search for manual farms only
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Enabled
Search for farms which are enabled
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -SuppressInfo
Suppress text info, when no farm found with given search parameters
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 5
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -HvServer
Reference to Horizon View Server to query the data from.
If the value is not passed or null then first element from global:DefaultHVServers would be considered in-place of hvServer.
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
### Returns the list of FarmSummary object matching the query criteria.
## NOTES
| | |
|-|-|
| Author | Praveen Mathamsetty. |
| Author email | pmathamsetty@vmware.com |
| Version | 1.1 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.0.2, 7.1.0 |
| PowerCLI Version | PowerCLI 6.5, PowerCLI 6.5.1 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -0,0 +1,118 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Get-HVGlobalEntitlement
## SYNOPSIS
Gets Global Entitlement(s) with given search parameters.
## SYNTAX
```
Get-HVGlobalEntitlement [[-DisplayName] <String>] [[-Description] <String>] [[-SuppressInfo] <Boolean>]
[[-HvServer] <Object>] [<CommonParameters>]
```
## DESCRIPTION
Queries and returns global entitlement(s) and global application entitlement(s).
Global entitlements are used to route users to their resources across multiple pods.
## EXAMPLES
### EXAMPLE 1
```
Get-HVGlobalEntitlement -DisplayName 'GEAPP'
```
Retrieves global application/desktop entitlement(s) with displayName 'GEAPP'
## PARAMETERS
### -DisplayName
Display Name of Global Entitlement.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Description
Description of Global Entitlement.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -SuppressInfo
Suppress text info, when no global entitlement(s) found with given search parameters
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -HvServer
Reference to Horizon View Server.
If the value is not passed or null then
first element from global:DefaultHVServers would be considered in-place of hvServer
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
## NOTES
| | |
|-|-|
| Author | Praveen Mathamsetty. |
| Author email | pmathamsetty@vmware.com |
| Version | 1.1 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.0.2, 7.1.0 |
| PowerCLI Version | PowerCLI 6.5, PowerCLI 6.5.1 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -0,0 +1,69 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Get-HVGlobalSession
## SYNOPSIS
Provides a list with all Global sessions in a Cloud Pod Architecture
## SYNTAX
```
Get-HVGlobalSession [[-HvServer] <Object>] [<CommonParameters>]
```
## DESCRIPTION
The get-hvglobalsession gets all local session by using view API service object(hvServer) of Connect-HVServer cmdlet.
## EXAMPLES
### EXAMPLE 1
```
Get-hvglobalsession
```
Gets all global sessions
## PARAMETERS
### -HvServer
View API service object of Connect-HVServer cmdlet.
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
## NOTES
| | |
|-|-|
| Author | Wouter Kursten. |
| Author email | wouter@retouw.nl |
| Version | 1.0 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.0.2, 7.1.0, 7.3.2 |
| PowerCLI Version | PowerCLI 6.5, PowerCLI 6.5.1 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -0,0 +1,70 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Get-HVGlobalSettings
## SYNOPSIS
Gets a list of Global Settings
## SYNTAX
```
Get-HVGlobalSettings [[-HvServer] <Object>] [<CommonParameters>]
```
## DESCRIPTION
Queries and returns the Global Settings for the pod of the specified HVServer.
## EXAMPLES
### EXAMPLE 1
```
Get-HVGlobalSettings
```
## PARAMETERS
### -HvServer
Reference to Horizon View Server to query the virtual machines from.
If the value is not passed or null then
first element from global:DefaultHVServers would be considered inplace of hvServer
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
### Returns list of object type VMware.Hv.GlobalSettingsInfo
## NOTES
| | |
|-|-|
| Author | Matt Frey. |
| Author email | mfrey@vmware.com |
| Version | 1.0 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.1 |
| PowerCLI Version | PowerCLI 6.5.1 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -0,0 +1,95 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Get-HVHealth
## SYNOPSIS
Pulls health information from Horizon View
## SYNTAX
```
Get-HVHealth [[-Servicename] <String>] [[-HvServer] <Object>] [<CommonParameters>]
```
## DESCRIPTION
Queries and returns health information from the local Horizon Pod
## EXAMPLES
### EXAMPLE 1
```
Get-HVHealth -service connectionserver
```
Returns health for the connectionserver(s)
### EXAMPLE 2
```
Get-HVHealth -service ViewComposer
```
Returns health for the View composer server(s)
## PARAMETERS
### -Servicename
The name of the service to query the health for.
This will default to Connection server health.
Available services are ADDomain,CertificateSSOConnector,ConnectionServer,EventDatabase,SAMLAuthenticator,SecurityServer,ViewComposer,VirtualCenter,Pod
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: ConnectionServer
Accept pipeline input: False
Accept wildcard characters: False
```
### -HvServer
Reference to Horizon View Server to query the virtual machines from.
If the value is not passed or null then
first element from global:DefaultHVServers would be considered in-place of hvServer
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
## NOTES
| | |
|-|-|
| Author | Wouter Kursten |
| Author email | wouter@retouw.nl |
| Version | 1.0 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.3.2,7.4 |
| PowerCLI Version | PowerCLI 6.5, PowerCLI 6.5.1 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -0,0 +1,89 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Get-HVHomeSite
## SYNOPSIS
Gets the configured Horizon View Homesites
## SYNTAX
```
Get-HVHomeSite [[-Group] <String>] [[-HvServer] <Object>] [<CommonParameters>]
```
## DESCRIPTION
Gets the configured Horizon View Homesites
## EXAMPLES
### EXAMPLE 1
```
Get-HVHomeSite
```
### EXAMPLE 2
```
Get-HVHomeSite -group group@domain
```
## PARAMETERS
### -Group
User principal name of a group
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -HvServer
Reference to Horizon View Server to query the virtual machines from.
If the value is not passed or null then
first element from global:DefaultHVServers would be considered in-place of hvServer
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
## NOTES
| | |
|-|-|
| Author | Wouter Kursten |
| Author email | wouter@retouw.nl |
| Version | 1.0 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.4 |
| PowerCLI Version | PowerCLI 10 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -0,0 +1,120 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Get-HVInternalName
## SYNOPSIS
Gets human readable name
## SYNTAX
```
Get-HVInternalName [-EntityId] <EntityId> [[-VcId] <VirtualCenterId>] [[-BaseImageVmId] <BaseImageVmId>]
[[-HvServer] <Object>] [<CommonParameters>]
```
## DESCRIPTION
Converts Horizon API Ids to human readable names.
Horizon API Ids are base64 encoded, this function
will decode and returns internal/human readable names.
## EXAMPLES
### EXAMPLE 1
```
Get-HVInternalName -EntityId $entityId
```
Decodes Horizon API Id and returns human readable name
## PARAMETERS
### -EntityId
Representation of a manageable entity id.
```yaml
Type: EntityId
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -VcId
{{ Fill VcId Description }}
```yaml
Type: VirtualCenterId
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -BaseImageVmId
{{ Fill BaseImageVmId Description }}
```yaml
Type: BaseImageVmId
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -HvServer
Reference to Horizon View Server to query the virtual machines from.
If the value is not passed or null then
first element from global:DefaultHVServers would be considered in-place of hvServer
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
### Returns human readable name
## NOTES
| | |
|-|-|
| Author | Praveen Mathamsetty. |
| Author email | pmathamsetty@vmware.com |
| Version | 1.1 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.0.2, 7.1.0 |
| PowerCLI Version | PowerCLI 6.5, PowerCLI 6.5.1 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -0,0 +1,69 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Get-HVLocalSession
## SYNOPSIS
Provides a list with all sessions on the local pod (works in CPA and non-CPA)
## SYNTAX
```
Get-HVLocalSession [[-HvServer] <Object>] [<CommonParameters>]
```
## DESCRIPTION
The Get-HVLocalSession gets all local session by using view API service object(hvServer) of Connect-HVServer cmdlet.
## EXAMPLES
### EXAMPLE 1
```
Get-HVLocalSession
```
Get all local sessions
## PARAMETERS
### -HvServer
View API service object of Connect-HVServer cmdlet.
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
## NOTES
| | |
|-|-|
Author : Wouter Kursten.
Author email : wouter@retouw.nl
Version : 1.0
===Tested Against Environment====
| | |
|-|-|
Horizon View Server Version : 7.0.2, 7.1.0, 7.3.2
PowerCLI Version : PowerCLI 6.5, PowerCLI 6.5.1
PowerShell Version : 5.0
## RELATED LINKS

View File

@@ -0,0 +1,180 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Get-HVMachine
## SYNOPSIS
Gets virtual Machine(s) information with given search parameters.
## SYNTAX
```
Get-HVMachine [[-PoolName] <String>] [[-MachineName] <String>] [[-DnsName] <String>] [[-State] <String>]
[[-JsonFilePath] <String>] [[-HvServer] <Object>] [<CommonParameters>]
```
## DESCRIPTION
Queries and returns virtual machines information, the machines list would be determined
based on queryable fields poolName, dnsName, machineName, state.
When more than one
fields are used for query the virtual machines which satisfy all fields criteria would be returned.
## EXAMPLES
### EXAMPLE 1
```
Get-HVMachine -PoolName 'ManualPool'
```
Queries VM(s) with given parameter poolName
### EXAMPLE 2
```
Get-HVMachine -MachineName 'PowerCLIVM'
```
Queries VM(s) with given parameter machineName
### EXAMPLE 3
```
Get-HVMachine -State CUSTOMIZING
```
Queries VM(s) with given parameter vm state
### EXAMPLE 4
```
Get-HVMachine -DnsName 'powercli-*'
```
Queries VM(s) with given parameter dnsName with wildcard character *
## PARAMETERS
### -PoolName
Pool name to query for.
If the value is null or not provided then filter will not be applied,
otherwise the virtual machines which has name same as value will be returned.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -MachineName
The name of the Machine to query for.
If the value is null or not provided then filter will not be applied,
otherwise the virtual machines which has display name same as value will be returned.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -DnsName
DNS name for the Machine to filter with.
If the value is null or not provided then filter will not be applied,
otherwise the virtual machines which has display name same as value will be returned.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -State
The basic state of the Machine to filter with.
If the value is null or not provided then filter will not be applied,
otherwise the virtual machines which has display name same as value will be returned.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -JsonFilePath
{{ Fill JsonFilePath Description }}
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -HvServer
Reference to Horizon View Server to query the virtual machines from.
If the value is not passed or null then
first element from global:DefaultHVServers would be considered in-place of hvServer
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
### Returns list of objects of type MachineInfo
## NOTES
| | |
|-|-|
| Author | Praveen Mathamsetty. |
| Author email | pmathamsetty@vmware.com |
| Version | 1.1 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.0.2, 7.1.0 |
| PowerCLI Version | PowerCLI 6.5, PowerCLI 6.5.1 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -0,0 +1,195 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Get-HVMachineSummary
## SYNOPSIS
Gets virtual Machine(s) summary with given search parameters.
## SYNTAX
```
Get-HVMachineSummary [[-PoolName] <String>] [[-MachineName] <String>] [[-DnsName] <String>] [[-State] <String>]
[[-JsonFilePath] <String>] [[-SuppressInfo] <Boolean>] [[-HvServer] <Object>] [<CommonParameters>]
```
## DESCRIPTION
Queries and returns virtual machines information, the machines list would be determined
based on queryable fields poolName, dnsName, machineName, state.
When more than one
fields are used for query the virtual machines which satisfy all fields criteria would be returned.
## EXAMPLES
### EXAMPLE 1
```
Get-HVMachineSummary -PoolName 'ManualPool'
```
Queries VM(s) with given parameter poolName
### EXAMPLE 2
```
Get-HVMachineSummary -MachineName 'PowerCLIVM'
```
Queries VM(s) with given parameter machineName
### EXAMPLE 3
```
Get-HVMachineSummary -State CUSTOMIZING
```
Queries VM(s) with given parameter vm state
### EXAMPLE 4
```
Get-HVMachineSummary -DnsName 'powercli-*'
```
Queries VM(s) with given parameter dnsName with wildcard character *
## PARAMETERS
### -PoolName
Pool name to query for.
If the value is null or not provided then filter will not be applied,
otherwise the virtual machines which has name same as value will be returned.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -MachineName
The name of the Machine to query for.
If the value is null or not provided then filter will not be applied,
otherwise the virtual machines which has display name same as value will be returned.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -DnsName
DNS name for the Machine to filter with.
If the value is null or not provided then filter will not be applied,
otherwise the virtual machines which has display name same as value will be returned.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -State
The basic state of the Machine to filter with.
If the value is null or not provided then filter will not be applied,
otherwise the virtual machines which has display name same as value will be returned.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -JsonFilePath
{{ Fill JsonFilePath Description }}
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -SuppressInfo
Suppress text info, when no machine found with given search parameters
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 6
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -HvServer
Reference to Horizon View Server to query the virtual machines from.
If the value is not passed or null then
first element from global:DefaultHVServers would be considered in-place of hvServer
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 7
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
### Returns list of objects of type MachineNamesView
## NOTES
| | |
|-|-|
| Author | Praveen Mathamsetty. |
| Author email | pmathamsetty@vmware.com |
| Version | 1.1 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.0.2, 7.1.0 |
| PowerCLI Version | PowerCLI 6.5, PowerCLI 6.5.1 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -0,0 +1,71 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Get-HVPodFederation
## SYNOPSIS
Returns information about a Horizon View Pod Federation (Cloud Pod Architecture)
## SYNTAX
```
Get-HVPodFederation [[-HvServer] <Object>] [<CommonParameters>]
```
## DESCRIPTION
Returns information about a Horizon View Pod Federation (Cloud Pod Architecture)
## EXAMPLES
### EXAMPLE 1
```
Get-HVPodFederation
```
Returns information about a Horizon View Pod Federation
## PARAMETERS
### -HvServer
Reference to Horizon View Server to query the virtual machines from.
If the value is not passed or null then
first element from global:DefaultHVServers would be considered in-place of hvServer
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
## NOTES
| | |
|-|-|
| Author | Wouter Kursten |
| Author email | wouter@retouw.nl |
| Version | 1.0 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.3.2,7.4 |
| PowerCLI Version | PowerCLI 6.5, PowerCLI 6.5.1 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -0,0 +1,218 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Get-HVPool
## SYNOPSIS
Gets pool(s) information with given search parameters.
## SYNTAX
```
Get-HVPool [[-PoolName] <String>] [[-PoolDisplayName] <String>] [[-PoolType] <String>]
[[-UserAssignment] <String>] [[-Enabled] <Boolean>] [[-ProvisioningEnabled] <Boolean>]
[[-SuppressInfo] <Boolean>] [[-HvServer] <Object>] [<CommonParameters>]
```
## DESCRIPTION
Queries and returns pools information, the pools list would be determined based on
queryable fields poolName, poolDisplayName, poolType, userAssignment, enabled,
provisioningEnabled.
When more than one fields are used for query the pools which
satisfy all fields criteria would be returned.
## EXAMPLES
### EXAMPLE 1
```
Get-HVPool -PoolName 'mypool' -PoolType MANUAL -UserAssignment FLOATING -Enabled $true -ProvisioningEnabled $true
```
Queries and returns pool object(s) based on given parameters poolName, poolType etc.
### EXAMPLE 2
```
Get-HVPool -PoolType AUTOMATED -UserAssignment FLOATING
```
Queries and returns pool object(s) based on given parameters poolType and userAssignment
### EXAMPLE 3
```
Get-HVPool -PoolName 'myrds' -PoolType RDS -UserAssignment DEDICATED -Enabled $false
```
Queries and returns pool object(s) based on given parameters poolName, PoolType etc.
### EXAMPLE 4
```
Get-HVPool -PoolName 'myrds' -PoolType RDS -UserAssignment DEDICATED -Enabled $false -HvServer $mycs
```
Queries and returns pool object(s) based on given parameters poolName and HvServer etc.
## PARAMETERS
### -PoolName
Pool name to query for.
If the value is null or not provided then filter will not be applied,
otherwise the pools which has name same as value will be returned.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -PoolDisplayName
Pool display name to query for.
If the value is null or not provided then filter will not be applied,
otherwise the pools which has display name same as value will be returned.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -PoolType
Pool type to filter with.
If the value is null or not provided then filter will not be applied.
If the value is MANUAL then only manual pools would be returned.
If the value is AUTOMATED then only automated pools would be returned
If the value is RDS then only Remote Desktop Service Pool pools would be returned
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -UserAssignment
User Assignment of pool to filter with.
If the value is null or not provided then filter will not be applied.
If the value is DEDICATED then only dedicated pools would be returned.
If the value is FLOATING then only floating pools would be returned
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Enabled
Pool enablement to filter with.
If the value is not provided then then filter will not be applied.
If the value is true then only pools which are enabled would be returned.
If the value is false then only pools which are disabled would be returned.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 5
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -ProvisioningEnabled
{{ Fill ProvisioningEnabled Description }}
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 6
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -SuppressInfo
Suppress text info, when no pool found with given search parameters
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 7
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -HvServer
Reference to Horizon View Server to query the pools from.
If the value is not passed or null then
first element from global:DefaultHVServers would be considered in-place of hvServer
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 8
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
### Returns list of objects of type DesktopInfo
## NOTES
| | |
|-|-|
| Author | Praveen Mathamsetty. |
| Author email | pmathamsetty@vmware.com |
| Version | 1.1 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.0.2, 7.1.0 |
| PowerCLI Version | PowerCLI 6.5, PowerCLI 6.5.1 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -0,0 +1,142 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Get-HVPoolSpec
## SYNOPSIS
Gets desktop specification
## SYNTAX
```
Get-HVPoolSpec [-DesktopInfo] <DesktopInfo> [[-FilePath] <String>] [[-HvServer] <Object>] [-WhatIf] [-Confirm]
[<CommonParameters>]
```
## DESCRIPTION
Converts DesktopInfo Object to DesktopSpec.
Also Converts view API Ids to human readable names
## EXAMPLES
### EXAMPLE 1
```
Get-HVPoolSpec -DesktopInfo $DesktopInfoObj
```
Converts DesktopInfo to DesktopSpec
### EXAMPLE 2
```
Get-HVPool -PoolName 'LnkClnJson' | Get-HVPoolSpec -FilePath "C:\temp\LnkClnJson.json"
```
Converts DesktopInfo to DesktopSpec and also dumps json object
## PARAMETERS
### -DesktopInfo
An object with detailed description of a desktop instance.
```yaml
Type: DesktopInfo
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -FilePath
{{ Fill FilePath Description }}
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -HvServer
Reference to Horizon View Server to query the virtual machines from.
If the value is not passed or null then
first element from global:DefaultHVServers would be considered in-place of hvServer
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
### Returns desktop specification
## NOTES
| | |
|-|-|
| Author | Praveen Mathamsetty. |
| Author email | pmathamsetty@vmware.com |
| Version | 1.1 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.0.2, 7.1.0 |
| PowerCLI Version | PowerCLI 6.5, PowerCLI 6.5.1 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -0,0 +1,218 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Get-HVPoolSummary
## SYNOPSIS
Gets pool summary with given search parameters.
## SYNTAX
```
Get-HVPoolSummary [[-PoolName] <String>] [[-PoolDisplayName] <String>] [[-PoolType] <String>]
[[-UserAssignment] <String>] [[-Enabled] <Boolean>] [[-ProvisioningEnabled] <Boolean>]
[[-SuppressInfo] <Boolean>] [[-HvServer] <Object>] [<CommonParameters>]
```
## DESCRIPTION
Queries and returns pools information, the pools list would be determined based on
queryable fields poolName, poolDisplayName, poolType, userAssignment, enabled,
provisioningEnabled.
When more than one fields are used for query the pools which
satisfy all fields criteria would be returned.
## EXAMPLES
### EXAMPLE 1
```
Get-HVPoolSummary -PoolName 'mypool' -PoolType MANUAL -UserAssignment FLOATING -Enabled $true -ProvisioningEnabled $true
```
Queries and returns desktopSummaryView based on given parameters poolName, poolType etc.
### EXAMPLE 2
```
Get-HVPoolSummary -PoolType AUTOMATED -UserAssignment FLOATING
```
Queries and returns desktopSummaryView based on given parameters poolType, userAssignment.
### EXAMPLE 3
```
Get-HVPoolSummary -PoolName 'myrds' -PoolType RDS -UserAssignment DEDICATED -Enabled $false
```
Queries and returns desktopSummaryView based on given parameters poolName, poolType, userAssignment etc.
### EXAMPLE 4
```
Get-HVPoolSummary -PoolName 'myrds' -PoolType RDS -UserAssignment DEDICATED -Enabled $false -HvServer $mycs
```
Queries and returns desktopSummaryView based on given parameters poolName, HvServer etc.
## PARAMETERS
### -PoolName
Pool name to query for.
If the value is null or not provided then filter will not be applied,
otherwise the pools which has name same as value will be returned.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -PoolDisplayName
Pool display name to query for.
If the value is null or not provided then filter will not be applied,
otherwise the pools which has display name same as value will be returned.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -PoolType
Pool type to filter with.
If the value is null or not provided then filter will not be applied.
If the value is MANUAL then only manual pools would be returned.
If the value is AUTOMATED then only automated pools would be returned
If the value is RDS then only Remote Desktop Service Pool pools would be returned
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -UserAssignment
User Assignment of pool to filter with.
If the value is null or not provided then filter will not be applied.
If the value is DEDICATED then only dedicated pools would be returned.
If the value is FLOATING then only floating pools would be returned
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Enabled
Pool enablement to filter with.
If the value is not provided then then filter will not be applied.
If the value is true then only pools which are enabled would be returned.
If the value is false then only pools which are disabled would be returned.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 5
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -ProvisioningEnabled
{{ Fill ProvisioningEnabled Description }}
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 6
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -SuppressInfo
Suppress text info, when no pool found with given search parameters
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 7
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -HvServer
Reference to Horizon View Server to query the pools from.
If the value is not passed or null then
first element from global:DefaultHVServers would be considered in-place of hvServer
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 8
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
### Returns list of DesktopSummaryView
## NOTES
| | |
|-|-|
| Author | Praveen Mathamsetty. |
| Author email | pmathamsetty@vmware.com |
| Version | 1.1 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.0.2, 7.1.0 |
| PowerCLI Version | PowerCLI 6.5, PowerCLI 6.5.1 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -0,0 +1,85 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Get-HVPreInstalledApplication
## SYNOPSIS
Gets the list of Pre-installed Applications from the RDS Server(s).
## SYNTAX
```
Get-HVPreInstalledApplication [-FarmName] <String> [[-HvServer] <Object>] [<CommonParameters>]
```
## DESCRIPTION
Gets the list of Pre-installed Applications from the RDS Server(s).
## EXAMPLES
### EXAMPLE 1
```
Get-HVPreInstalledApplication -FarmName 'Farm1' -HvServer $HvServer
```
Gets the list of Applications present in 'Farm1', if exists.
## PARAMETERS
### -FarmName
Name of the Farm on which to discover installed applications.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -HvServer
View API service object of Connect-HVServer cmdlet.
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
### Gets the list of Applications from the specified Farm if exists.
## NOTES
| | |
|-|-|
| Author | Samiullasha S |
| Author email | ssami@vmware.com |
| Version | 1.0 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.8.0 |
| PowerCLI Version | PowerCLI 11.1 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -0,0 +1,308 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Get-HVQueryFilter
## SYNOPSIS
Creates a VMware.Hv.QueryFilter based on input provided.
## SYNTAX
### ne
```
Get-HVQueryFilter [-MemberName] <String> [-Ne] [-MemberValue] <Object> [<CommonParameters>]
```
### startswith
```
Get-HVQueryFilter [-MemberName] <String> [-Startswith] [-MemberValue] <Object> [<CommonParameters>]
```
### contains
```
Get-HVQueryFilter [-MemberName] <String> [-Contains] [-MemberValue] <Object> [<CommonParameters>]
```
### eq
```
Get-HVQueryFilter [-MemberName] <String> [-Eq] [-MemberValue] <Object> [<CommonParameters>]
```
### not
```
Get-HVQueryFilter [-Not] [-Filter] <QueryFilter> [<CommonParameters>]
```
### and
```
Get-HVQueryFilter [-And] [-Filters] <QueryFilter[]> [<CommonParameters>]
```
### or
```
Get-HVQueryFilter [-Or] [-Filters] <QueryFilter[]> [<CommonParameters>]
```
## DESCRIPTION
This is a factory method to create a VMware.Hv.QueryFilter.
The type of the QueryFilter would be determined based on switch used.
## EXAMPLES
### EXAMPLE 1
```
Get-HVQueryFilter data.name -Eq vmware
```
Creates queryFilterEquals with given parameters memberName(position 0) and memberValue(position 2)
### EXAMPLE 2
```
Get-HVQueryFilter -MemberName data.name -Eq -MemberValue vmware
```
Creates queryFilterEquals with given parameters memberName and memberValue
### EXAMPLE 3
```
Get-HVQueryFilter data.name -Ne vmware
```
Creates queryFilterNotEquals filter with given parameters memberName and memberValue
### EXAMPLE 4
```
Get-HVQueryFilter data.name -Contains vmware
```
Creates queryFilterContains with given parameters memberName and memberValue
### EXAMPLE 5
```
Get-HVQueryFilter data.name -Startswith vmware
```
Creates queryFilterStartsWith with given parameters memberName and memberValue
### EXAMPLE 6
```
$filter = Get-HVQueryFilter data.name -Startswith vmware
```
Get-HVQueryFilter -Not $filter
Creates queryFilterNot with given parameter filter
### EXAMPLE 7
```
$filter1 = Get-HVQueryFilter data.name -Startswith vmware
```
$filter2 = Get-HVQueryFilter data.name -Contains pool
Get-HVQueryFilter -And @($filter1, $filter2)
Creates queryFilterAnd with given parameter filters array
### EXAMPLE 8
```
$filter1 = Get-HVQueryFilter data.name -Startswith vmware
```
$filter2 = Get-HVQueryFilter data.name -Contains pool
Get-HVQueryFilter -Or @($filter1, $filter2)
Creates queryFilterOr with given parameter filters array
## PARAMETERS
### -MemberName
Property path separated by .
(dot) from the root of queryable data object which is being queried for
```yaml
Type: String
Parameter Sets: ne, startswith, contains, eq
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Eq
Switch to create QueryFilterEquals filter
```yaml
Type: SwitchParameter
Parameter Sets: eq
Aliases:
Required: True
Position: 2
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -Contains
Switch to create QueryFilterContains filter
```yaml
Type: SwitchParameter
Parameter Sets: contains
Aliases:
Required: True
Position: 2
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -Startswith
Switch to create QueryFilterStartsWith filter
```yaml
Type: SwitchParameter
Parameter Sets: startswith
Aliases:
Required: True
Position: 2
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -Ne
Switch to create QueryFilterNotEquals filter
```yaml
Type: SwitchParameter
Parameter Sets: ne
Aliases:
Required: True
Position: 2
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -MemberValue
Value of property (memberName) which is used for filtering
```yaml
Type: Object
Parameter Sets: ne, startswith, contains, eq
Aliases:
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Not
Switch to create QueryFilterNot filter, used for negating existing filter
```yaml
Type: SwitchParameter
Parameter Sets: not
Aliases:
Required: True
Position: 1
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -Filter
Filter to used in QueryFilterNot to negate the result
```yaml
Type: QueryFilter
Parameter Sets: not
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -And
Switch to create QueryFilterAnd filter, used for joing two or more filters
```yaml
Type: SwitchParameter
Parameter Sets: and
Aliases:
Required: True
Position: 1
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -Or
Switch to create QueryFilterOr filter, used for joing two or more filters
```yaml
Type: SwitchParameter
Parameter Sets: or
Aliases:
Required: True
Position: 1
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -Filters
List of filters to join using QueryFilterAnd or QueryFilterOr
```yaml
Type: QueryFilter[]
Parameter Sets: and, or
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
### Returns the QueryFilter object
## NOTES
| | |
|-|-|
| Author | Kummara Ramamohan. |
| Author email | kramamohan@vmware.com |
| Version | 1.1 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.0.2, 7.1.0 |
| PowerCLI Version | PowerCLI 6.5, PowerCLI 6.5.1 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -0,0 +1,181 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Get-HVQueryResult
## SYNOPSIS
Returns the query results from ViewApi Query Service
## SYNTAX
```
Get-HVQueryResult [-EntityType] <String> [[-Filter] <QueryFilter>] [[-SortBy] <String>]
[[-SortDescending] <Boolean>] [[-Limit] <Int16>] [[-HvServer] <Object>] [<CommonParameters>]
```
## DESCRIPTION
Get-HVQueryResult is a API to query the results using ViewApi.
The filtering of the returned
list would be done based on input parameters filter, sortDescending, sortyBy, limit
## EXAMPLES
### EXAMPLE 1
```
Get-HVQueryResult DesktopSummaryView
```
Returns query results of entityType DesktopSummaryView(position 0)
### EXAMPLE 2
```
Get-HVQueryResult DesktopSummaryView (Get-HVQueryFilter data.name -Eq vmware)
```
Returns query results of entityType DesktopSummaryView(position 0) with given filter(position 1)
### EXAMPLE 3
```
Get-HVQueryResult -EntityType DesktopSummaryView -Filter (Get-HVQueryFilter desktopSummaryData.name -Eq vmware)
```
Returns query results of entityType DesktopSummaryView with given filter
### EXAMPLE 4
```
$myFilter = Get-HVQueryFilter data.name -Contains vmware
```
Get-HVQueryResult -EntityType DesktopSummaryView -Filter $myFilter -SortBy desktopSummaryData.displayName -SortDescending $false
Returns query results of entityType DesktopSummaryView with given filter and also sorted based on dispalyName
### EXAMPLE 5
```
Get-HVQueryResult DesktopSummaryView -Limit 10
```
Returns query results of entityType DesktopSummaryView, maximum count equal to limit
## PARAMETERS
### -EntityType
ViewApi Queryable entity type which is being queried for.The return list would be containing objects of entityType
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Filter
Filter to used for filtering the results, See Get-HVQueryFilter for more information
```yaml
Type: QueryFilter
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -SortBy
Data field path used for sorting the results
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -SortDescending
If the value is set to true (default) then the results will be sorted in descending order
If the value is set to false then the results will be sorted in ascending order
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: True
Accept pipeline input: False
Accept wildcard characters: False
```
### -Limit
Max number of objects to retrieve.
Default would be 0 which means retieve all the results
```yaml
Type: Int16
Parameter Sets: (All)
Aliases:
Required: False
Position: 5
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
```
### -HvServer
Reference to Horizon View Server to query the data from.
If the value is not passed or null then
first element from global:DefaultHVServers would be considered in-place of hvServer
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
### Returns the list of objects of entityType
## NOTES
| | |
|-|-|
| Author | Kummara Ramamohan. |
| Author email | kramamohan@vmware.com |
| Version | 1.1 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.0.2, 7.1.0,7.4 |
| PowerCLI Version | PowerCLI 6.5, PowerCLI 6.5.1, PowerCLI 10.1.1 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -0,0 +1,70 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Get-HVResourceStructure
## SYNOPSIS
Output the structure of the resource pools available to a HV.
Primarily this is for debugging
PS\> Get-HVResourceStructure
vCenter vc.domain.local
Container DC path /DC/host
HostOrCluster Servers path /DC/host/Servers
HostOrCluster VDI path /DC/host/VDI
ResourcePool Servers path /DC/host/Servers/Resources
ResourcePool VDI path /DC/host/VDI/Resources
ResourcePool RP1 path /DC/host/VDI/Resources/RP1
ResourcePool RP2 path /DC/host/VDI/Resources/RP1/RP2
| Author | Mark Elvers \<mark.elvers@tunbury.org\> |
## SYNTAX
```
Get-HVResourceStructure [[-HvServer] <Object>] [<CommonParameters>]
```
## DESCRIPTION
{{ Fill in the Description }}
## EXAMPLES
### Example 1
```powershell
PS C:\> {{ Add example code here }}
```
{{ Add example description here }}
## PARAMETERS
### -HvServer
{{ Fill HvServer Description }}
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
## NOTES
## RELATED LINKS

View File

@@ -0,0 +1,71 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Get-HVSite
## SYNOPSIS
Returns information about the sites within a Horizon View Pod Federation (Cloud Pod Architecture)
## SYNTAX
```
Get-HVSite [[-HvServer] <Object>] [<CommonParameters>]
```
## DESCRIPTION
Returns information about the sites within a Horizon View Pod Federation (Cloud Pod Architecture)
## EXAMPLES
### EXAMPLE 1
```
get-hvsite
```
Returns information about the sites within a Horizon View Pod Federation.
## PARAMETERS
### -HvServer
Reference to Horizon View Server to query the virtual machines from.
If the value is not passed or null then
first element from global:DefaultHVServers would be considered in-place of hvServer
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
## NOTES
| | |
|-|-|
| Author | Wouter Kursten |
| Author email | wouter@retouw.nl |
| Version | 1.0 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.3.2,7.4 |
| PowerCLI Version | PowerCLI 6.5, PowerCLI 6.5.1 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -0,0 +1,69 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Get-HVlicense
## SYNOPSIS
Gets the license for Horizon View
## SYNTAX
```
Get-HVlicense [[-HvServer] <Object>] [<CommonParameters>]
```
## DESCRIPTION
Gets the license for Horizon View
## EXAMPLES
### EXAMPLE 1
```
get-hvlicense
```
## PARAMETERS
### -HvServer
Reference to Horizon View Server to query the virtual machines from.
If the value is not passed or null then
first element from global:DefaultHVServers would be considered in-place of hvServer
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
## NOTES
| | |
|-|-|
| Author | Wouter Kursten |
| Author email | wouter@retouw.nl |
| Version | 1.0 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.4,7.5 |
| PowerCLI Version | PowerCLI 10 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -0,0 +1,90 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Get-HVvCenterServer
## SYNOPSIS
Gets a list of all configured vCenter Servers
## SYNTAX
```
Get-HVvCenterServer [[-HvServer] <Object>] [[-Name] <String>] [<CommonParameters>]
```
## DESCRIPTION
Queries and returns the vCenter Servers configured for the pod of the specified HVServer.
## EXAMPLES
### EXAMPLE 1
```
Get-HVvCenterServer
```
### EXAMPLE 2
```
Get-HVvCenterServer -Name 'vCenter1'
```
## PARAMETERS
### -HvServer
Reference to Horizon View Server to query the virtual machines from.
If the value is not passed or null then
first element from global:DefaultHVServers would be considered inplace of hvServer
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Name
A string value to query a vCenter Server by Name, if it is known.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
### Returns array of object type VMware.Hv.VirtualCenterInfo
## NOTES
| | |
|-|-|
| Author | Matt Frey. |
| Author email | mfrey@vmware.com |
| Version | 1.0 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.7 |
| PowerCLI Version | PowerCLI 11.2.0 |
| PowerShell Version | 5.1 |
## RELATED LINKS

View File

@@ -0,0 +1,97 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Get-HVvCenterServerHealth
## SYNOPSIS
Gets a the health info for a given vCenter Server.
## SYNTAX
```
Get-HVvCenterServerHealth [[-HvServer] <Object>] [[-VirtualCenter] <Object>] [<CommonParameters>]
```
## DESCRIPTION
Queries and returns the VirtualCenterHealthInfo specified HVServer.
## EXAMPLES
### EXAMPLE 1
```
Get-HVvCenterServerHealth -VirtualCenter 'vCenter1'
```
### EXAMPLE 2
```
Get-HVvCenterServerHealth -VirtualCenter $vCenter1
```
### EXAMPLE 3
```
Get-HVvCenterServerHealth
```
## PARAMETERS
### -HvServer
Reference to Horizon View Server to query the virtual machines from.
If the value is not passed or null then
first element from global:DefaultHVServers would be considered inplace of hvServer
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -VirtualCenter
A parameter to specify which vCenter Server to check health for.
If not specified, this function will return the
health info for all vCenter Servers.
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
### Returns array of object type VMware.Hv.VirtualCenterInfo
## NOTES
| | |
|-|-|
| Author | Matt Frey. |
| Author email | mfrey@vmware.com |
| Version | 1.0 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.7 |
| PowerCLI Version | PowerCLI 11.2.0 |
| PowerShell Version | 5.1 |
## RELATED LINKS

View File

@@ -0,0 +1,221 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# New-HVEntitlement
## SYNOPSIS
Associates a user/group with a resource
## SYNTAX
### Default
```
New-HVEntitlement -User <String> -ResourceName <String> [-ResourceType <String>] [-Type <String>]
[-HvServer <Object>] [-WhatIf] [-Confirm] [<CommonParameters>]
```
### PipeLine
```
New-HVEntitlement -User <String> -Resource <Object> [-ResourceType <String>] [-Type <String>]
[-HvServer <Object>] [-WhatIf] [-Confirm] [<CommonParameters>]
```
## DESCRIPTION
This represents a simple association between a single user/group and a resource that they can be assigned.
## EXAMPLES
### EXAMPLE 1
```
New-HVEntitlement -User 'administrator@adviewdev.eng.vmware.com' -ResourceName 'InsClnPol' -Confirm:$false
```
Associate a user/group with a pool
### EXAMPLE 2
```
New-HVEntitlement -User 'adviewdev\administrator' -ResourceName 'Calculator' -ResourceType Application
```
Associate a user/group with a application
### EXAMPLE 3
```
New-HVEntitlement -User 'adviewdev.eng.vmware.com\administrator' -ResourceName 'UrlSetting1' -ResourceType URLRedirection
```
Associate a user/group with a URLRedirection settings
### EXAMPLE 4
```
New-HVEntitlement -User 'adviewdev.eng.vmware.com\administrator' -ResourceName 'GE1' -ResourceType GlobalEntitlement
```
Associate a user/group with a desktop entitlement
### EXAMPLE 5
```
New-HVEntitlement -User 'adviewdev\administrator' -ResourceName 'GEAPP1' -ResourceType GlobalApplicationEntitlement
```
Associate a user/group with a application entitlement
### EXAMPLE 6
```
$pools = Get-HVPool; $pools | New-HVEntitlement -User 'adviewdev\administrator' -Confirm:$false
```
Associate a user/group with list of pools
## PARAMETERS
### -User
User principal name of user or group
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -ResourceName
The resource(Application, Desktop etc.) name.
Supports only wildcard character '*' when resource type is desktop.
```yaml
Type: String
Parameter Sets: Default
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Resource
Object(s) of the resource(Application, Desktop etc.) to entitle
```yaml
Type: Object
Parameter Sets: PipeLine
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -ResourceType
Type of Resource(Application, Desktop etc)
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: Desktop
Accept pipeline input: False
Accept wildcard characters: False
```
### -Type
Whether or not this is a group or a user.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: User
Accept pipeline input: False
Accept wildcard characters: False
```
### -HvServer
Reference to Horizon View Server.
If the value is not passed or null then
first element from global:DefaultHVServers would be considered in-place of hvServer
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
## NOTES
| | |
|-|-|
| Author | Praveen Mathamsetty. |
| Author email | pmathamsetty@vmware.com |
| Version | 1.1 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.0.2, 7.1.0 |
| PowerCLI Version | PowerCLI 6.5, PowerCLI 6.5.1 |
| PowerShell Version | 5.0 |
## RELATED LINKS

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,329 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# New-HVGlobalEntitlement
## SYNOPSIS
Creates a Global Entitlement.
## SYNTAX
```
New-HVGlobalEntitlement [-DisplayName] <String> [-Type] <String> [[-Description] <String>] [[-Scope] <String>]
[[-Dedicated] <Boolean>] [[-FromHome] <Boolean>] [[-RequireHomeSite] <Boolean>]
[[-MultipleSessionAutoClean] <Boolean>] [[-Enabled] <Boolean>] [[-SupportedDisplayProtocols] <String[]>]
[[-DefaultDisplayProtocol] <String>] [[-AllowUsersToChooseProtocol] <Boolean>]
[[-AllowUsersToResetMachines] <Boolean>] [[-EnableHTMLAccess] <Boolean>] [[-HvServer] <Object>] [-WhatIf]
[-Confirm] [<CommonParameters>]
```
## DESCRIPTION
Global entitlements are used to route users to their resources across multiple pods.
These are persisted in a global ldap instance that is replicated across all pods in a linked mode view set.
## EXAMPLES
### EXAMPLE 1
```
New-HVGlobalEntitlement -DisplayName 'GE_APP' -Type APPLICATION_ENTITLEMENT
```
Creates new global application entitlement
### EXAMPLE 2
```
New-HVGlobalEntitlement -DisplayName 'GE_DESKTOP' -Type DESKTOP_ENTITLEMENT
```
Creates new global desktop entitlement
## PARAMETERS
### -DisplayName
Display Name of Global Entitlement.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Type
Specify whether to create desktop/app global entitlement
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Description
Description of Global Entitlement.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Scope
Scope for this global entitlement.
Visibility and Placement policies are defined by this value.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: ANY
Accept pipeline input: False
Accept wildcard characters: False
```
### -Dedicated
Specifies whether dedicated/floating resources associated with this global entitlement.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 5
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -FromHome
This value defines the starting location for resource placement and search.
When true, a pod in the user's home site is used to start the search.
When false, the current site is used.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 6
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -RequireHomeSite
This value determines whether we fail if a home site isn't defined for this global entitlement.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 7
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -MultipleSessionAutoClean
This value is used to determine if automatic session clean up is enabled.
This cannot be enabled when this Global Entitlement is associated with a Desktop that has dedicated user assignment.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 8
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -Enabled
If this Global Entitlement is enabled.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 9
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -SupportedDisplayProtocols
The set of supported display protocols for the global entitlement.
```yaml
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: 10
Default value: @("PCOIP","BLAST")
Accept pipeline input: False
Accept wildcard characters: False
```
### -DefaultDisplayProtocol
The default display protocol for the global entitlement.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 11
Default value: PCOIP
Accept pipeline input: False
Accept wildcard characters: False
```
### -AllowUsersToChooseProtocol
Whether the users can choose the protocol used.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 12
Default value: True
Accept pipeline input: False
Accept wildcard characters: False
```
### -AllowUsersToResetMachines
Whether users are allowed to reset/restart their machines.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 13
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -EnableHTMLAccess
If set to true, the desktops that are associated with this GlobalEntitlement must also have HTML Access enabled.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 14
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -HvServer
Reference to Horizon View Server.
If the value is not passed or null then
first element from global:DefaultHVServers would be considered in-place of hvServer
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 15
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
## NOTES
| | |
|-|-|
| Author | Praveen Mathamsetty. |
| Author email | pmathamsetty@vmware.com |
| Version | 1.1 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.0.2, 7.1.0 |
| PowerCLI Version | PowerCLI 6.5, PowerCLI 6.5.1 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -0,0 +1,178 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# New-HVHomeSite
## SYNOPSIS
Defines a homesite within a Horizon View Cloud Pod architecture
## SYNTAX
### Default (Default)
```
New-HVHomeSite -Group <String> -Site <String> [-HvServer <Object>] [<CommonParameters>]
```
### globalApplicationEntitlement
```
New-HVHomeSite [-Group <String>] [-Site <String>] [-globalApplicationEntitlement <String>] [-HvServer <Object>]
[<CommonParameters>]
```
### globalEntitlement
```
New-HVHomeSite [-Group <String>] [-Site <String>] [-globalEntitlement <String>] [-HvServer <Object>]
[<CommonParameters>]
```
## DESCRIPTION
Creates a new homesite within a Cloud Pod Archtitecture.
By default it will be applied to everything
but the choice can be made to only apply for a single global entitlement or singel global application entitlement
## EXAMPLES
### EXAMPLE 1
```
New-HVHomeSite -group group@domain -site SITE
```
### EXAMPLE 2
```
New-HVHomeSite -group group@domain -site SITE -globalapplicationentitlement ge-ap01
```
### EXAMPLE 3
```
New-HVHomeSite -group group@domain -site SITE -globalentitlement GE_Production
```
## PARAMETERS
### -Group
User principal name of a group
```yaml
Type: String
Parameter Sets: Default
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
```yaml
Type: String
Parameter Sets: globalApplicationEntitlement, globalEntitlement
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Site
Name of the Horizon View Site
```yaml
Type: String
Parameter Sets: Default
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
```yaml
Type: String
Parameter Sets: globalApplicationEntitlement, globalEntitlement
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -globalEntitlement
Name of the global entitlement
```yaml
Type: String
Parameter Sets: globalEntitlement
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -globalApplicationEntitlement
Name of the global application entitlement
```yaml
Type: String
Parameter Sets: globalApplicationEntitlement
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -HvServer
Reference to Horizon View Server to query the virtual machines from.
If the value is not passed or null then
first element from global:DefaultHVServers would be considered in-place of hvServer
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
## NOTES
| | |
|-|-|
| Author | Wouter Kursten |
| Author email | wouter@retouw.nl |
| Version | 1.0 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.4 |
| PowerCLI Version | PowerCLI 10.1.1 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -0,0 +1,383 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# New-HVManualApplication
## SYNOPSIS
Creates a Manual Application.
## SYNTAX
```
New-HVManualApplication [-HvServer <ViewServerImpl>] -Name <String> [-DisplayName <String>]
[-Description <String>] -ExecutablePath <String> [-Version <String>] [-Publisher <String>]
[-Enabled <Boolean>] [-EnablePreLaunch <Boolean>] [-ConnectionServerRestrictions <String[]>]
[-CategoryFolderName <String>] [-clientRestrictions <Boolean>] [-ShortcutLocations <String[]>]
[-MultiSessionMode <String>] [-MaxMultiSessions <Int32>] [-StartFolder <String>] [-Args <String>]
-Farm <String> [-AutoUpdateFileTypes <Boolean>] [-AutoUpdateOtherFileTypes <Boolean>]
[-GlobalApplicationEntitlement <String>] [<CommonParameters>]
```
## DESCRIPTION
Creates Application manually with given parameters.
## EXAMPLES
### EXAMPLE 1
```
New-HVManualApplication -Name 'App1' -DisplayName 'DisplayName' -Description 'ApplicationDescription' -ExecutablePath "PathOfTheExecutable" -Version 'AppVersion' -Publisher 'PublisherName' -Farm 'FarmName'
```
Creates a manual application App1 in the farm specified.
## PARAMETERS
### -HvServer
View API service object of Connect-HVServer cmdlet.
```yaml
Type: ViewServerImpl
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -Name
The Application name is the unique identifier used to identify this Application.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -DisplayName
The display name is the name that users will see when they connect to view client.
If the display name is left blank, it defaults to Name.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: $Name
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -Description
The description is a set of notes about the Application.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -ExecutablePath
Path to Application executable.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -Version
Application version.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -Publisher
Application publisher.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -Enabled
Indicates if Application is enabled.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: True
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -EnablePreLaunch
Application can be pre-launched if value is true.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -ConnectionServerRestrictions
Connection server restrictions.
This is a list of tags that access to the application is restricted to.
Empty/Null list means that the application can be accessed from any connection server.
```yaml
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -CategoryFolderName
Name of the category folder in the user's OS containing a shortcut to the application.
Unset if the application does not belong to a category.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -clientRestrictions
Client restrictions to be applied to Application.
Currently it is valid for RDSH pools.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -ShortcutLocations
Locations of the category folder in the user's OS containing a shortcut to the desktop.
The value must be set if categoryFolderName is provided.
```yaml
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -MultiSessionMode
Multi-session mode for the application.
An application launched in multi-session mode does not support reconnect behavior when user logs in from a different client instance.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: DISABLED
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -MaxMultiSessions
Maximum number of multi-sessions a user can have in this application pool.
```yaml
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: 0
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -StartFolder
Starting folder for Application.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -Args
Parameters to pass to application when launching.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -Farm
Farm name.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -AutoUpdateFileTypes
Whether or not the file types supported by this application should be allowed to automatically update to reflect changes reported by the agent.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: True
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -AutoUpdateOtherFileTypes
Whether or not the other file types supported by this application should be allowed to automatically update to reflect changes reported by the agent.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: True
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -GlobalApplicationEntitlement
The name of a Global Application Entitlement to associate this Application pool with.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
### A success message is displayed when done.
## NOTES
| | |
|-|-|
Author : Samiullasha S
Author email : ssami@vmware.com
Version : 1.0
===Tested Against Environment====
| | |
|-|-|
Horizon View Server Version : 7.8.0
PowerCLI Version : PowerCLI 11.1
PowerShell Version : 5.0
## RELATED LINKS

View File

@@ -0,0 +1,72 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# New-HVPodFederation
## SYNOPSIS
Initiates a Horizon View Pod Federation (Cloud Pod Architecture)
## SYNTAX
```
New-HVPodFederation [[-HvServer] <Object>] [<CommonParameters>]
```
## DESCRIPTION
Starts the initialisation of a Horizon View Pod Federation.
Other pod's can be joined to this federation to form the Cloud Pod Architecture
## EXAMPLES
### EXAMPLE 1
```
new-hvpodfederation
```
Returns health for the connectionserver(s)
## PARAMETERS
### -HvServer
Reference to Horizon View Server to query the virtual machines from.
If the value is not passed or null then
first element from global:DefaultHVServers would be considered in-place of hvServer
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
## NOTES
| | |
|-|-|
| Author | Wouter Kursten |
| Author email | wouter@retouw.nl |
| Version | 1.0 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.3.2,7.4 |
| PowerCLI Version | PowerCLI 6.5, PowerCLI 6.5.1 |
| PowerShell Version | 5.0 |
## RELATED LINKS

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,215 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# New-HVPreInstalledApplication
## SYNOPSIS
Creates a application pool from Pre-installed applications on RDS Server(s).
## SYNTAX
```
New-HVPreInstalledApplication -ApplicationName <String> [-ApplicationID <String>] [-DisplayName <String>]
-FarmName <String> [-EnablePreLaunch <Boolean>] [-ConnectionServerRestrictions <String[]>]
[-CategoryFolderName <String>] [-clientRestrictions <Boolean>] [-HvServer <Object>] [<CommonParameters>]
```
## DESCRIPTION
Creates a application pool from Pre-installed applications on RDS Server(s).
## EXAMPLES
### EXAMPLE 1
```
New-HVPreInstalledApplication -ApplicationName 'App1' -DisplayName 'DisplayName' -FarmName 'FarmName'
```
Creates a application App1 from the farm specified.
### EXAMPLE 2
```
New-HVPreInstalledApplication -ApplicationName 'App2' -FarmName FarmManual -EnablePreLaunch $True
```
Creates a application App2 from the farm specified and the PreLaunch option will be enabled.
### EXAMPLE 3
```
New-HVPreInstalledApplication -ApplicationName 'Excel 2016' -ApplicationID 'Excel-2016' -DisplayName 'Excel' -FarmName 'RDS-FARM-01'
```
Creates an application, Excel-2016, from the farm RDS-FARM-01.
The application will display as 'Excel' to the end user.
## PARAMETERS
### -ApplicationName
The Application name to search within the Farm for.
This should match the output of (Get-HVPreinstalledApplication).Name
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -ApplicationID
The unique identifier for this application.
The ApplicationID can only contain alphanumeric characters, dashes, and underscores.
If ApplicationID is not specified, it will be set to match the ApplicationName, with the spaces converted to underscore (_).
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: $($ApplicationName -replace " ","_")
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -DisplayName
The display name is the name that users will see when they connect with the Horizon Client.
If the display name is left blank, it defaults to ApplicationName.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: $ApplicationName
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -FarmName
Farm name.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -EnablePreLaunch
Application can be pre-launched if value is true.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -ConnectionServerRestrictions
Connection server restrictions.
This is a list of tags that access to the application is restricted to.
Empty/Null list means that the application can be accessed from any connection server.
```yaml
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -CategoryFolderName
Name of the category folder in the user's OS containing a shortcut to the application.
Unset if the application does not belong to a category.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -clientRestrictions
Client restrictions to be applied to Application.
Currently it is valid for RDSH pools.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -HvServer
View API service object of Connect-HVServer cmdlet.
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
### A success message is displayed when done.
## NOTES
| | |
|-|-|
| Author | Samiullasha S |
| Author email | ssami@vmware.com |
| Version | 1.0 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.8.0 |
| PowerCLI Version | PowerCLI 11.1 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -0,0 +1,101 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# New-HVSite
## SYNOPSIS
Creates a new site within a Horizon View Pod Federation (Cloud Pod Architecture)
## SYNTAX
```
New-HVSite [-name] <String> [-description] <String> [[-HvServer] <Object>] [<CommonParameters>]
```
## DESCRIPTION
Creates a new site within a Horizon View Pod Federation (Cloud Pod Architecture)
## EXAMPLES
### EXAMPLE 1
```
new-hvsite -name "NAME" -description "DESCRIPTION"
```
Returns information about the sites within a Horizon View Pod Federation.
## PARAMETERS
### -name
Name of the site (required)
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -description
Description of the site (required)
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -HvServer
Reference to Horizon View Server to query the virtual machines from.
If the value is not passed or null then
first element from global:DefaultHVServers would be considered in-place of hvServer
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
## NOTES
| | |
|-|-|
| Author | Wouter Kursten |
| Author email | wouter@retouw.nl |
| Version | 1.0 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.3.2,7.4 |
| PowerCLI Version | PowerCLI 6.5, PowerCLI 6.5.1 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -0,0 +1,127 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Register-HVPod
## SYNOPSIS
Registers a pod in a Horizon View Pod Federation (Cloud Pod Architecture)
## SYNTAX
```
Register-HVPod [-remoteconnectionserver] <String> [-ADUserName] <String> [-ADpassword] <SecureString>
[[-HvServer] <Object>] [<CommonParameters>]
```
## DESCRIPTION
Registers a pod in a Horizon View Pod Federation.
You have to be connected to the pod you are joining to the federation.
## EXAMPLES
### EXAMPLE 1
```
$adpassword = Read-Host 'Domain Password' -AsSecureString
```
register-hvpod -remoteconnectionserver "servername" -username "user\domain" -password $adpassword
### EXAMPLE 2
```
register-hvpod -remoteconnectionserver "servername" -username "user\domain"
```
It will now ask for the password
## PARAMETERS
### -remoteconnectionserver
Servername of a connectionserver that already belongs to the PodFederation
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -ADUserName
User principal name of user this is required to be in the domain\username format
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -ADpassword
Password of the type Securestring.
Can be created with:
$password = Read-Host 'Domain Password' -AsSecureString
```yaml
Type: SecureString
Parameter Sets: (All)
Aliases:
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -HvServer
Reference to Horizon View Server to query the virtual machines from.
If the value is not passed or null then
first element from global:DefaultHVServers would be considered in-place of hvServer
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
## NOTES
| | |
|-|-|
| Author | Wouter Kursten |
| Author email | wouter@retouw.nl |
| Version | 1.0 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.3.2,7.4 |
| PowerCLI Version | PowerCLI 6.5, PowerCLI 6.5.1 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -0,0 +1,118 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Remove-HVApplication
## SYNOPSIS
Removes the specified application if exists.
## SYNTAX
```
Remove-HVApplication [-ApplicationName] <String> [[-HvServer] <Object>] [-WhatIf] [-Confirm]
[<CommonParameters>]
```
## DESCRIPTION
Removes the specified application if exists.
## EXAMPLES
### EXAMPLE 1
```
Remove-HVApplication -ApplicationName 'App1' -HvServer $HvServer
```
Removes 'App1', if exists.
## PARAMETERS
### -ApplicationName
Application to be deleted.
The name of the application must be given that is to be searched for and remove if exists.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -HvServer
View API service object of Connect-HVServer cmdlet.
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
### Removes the specified application if exists.
## NOTES
| | |
|-|-|
| Author | Samiullasha S |
| Author email | ssami@vmware.com |
| Version | 1.2 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.8.0 |
| PowerCLI Version | PowerCLI 11.1 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -0,0 +1,119 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Remove-HVApplicationIcon
## SYNOPSIS
Used to remove a customized icon association for a given application.
## SYNTAX
```
Remove-HVApplicationIcon [-ApplicationName] <String> [[-HvServer] <Object>] [-WhatIf] [-Confirm]
[<CommonParameters>]
```
## DESCRIPTION
This function is used to remove an application association to the given application.
It will never remove the RDS system icons.
If application doesnot have any customized icon, an error will be thrown.
## EXAMPLES
### EXAMPLE 1
```
Removing the icon for an application A1.
```
Remove-HVApplicationIcon -ApplicationName A1 -HvServer $hvServer
## PARAMETERS
### -ApplicationName
Name of the application to which customized icon needs to be removed.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -HvServer
View API service object of Connect-HVServer cmdlet.
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
### None
## NOTES
| | |
|-|-|
| Author | Paramesh Oddepally. |
| Author email | poddepally@vmware.com |
| Version | 1.1 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.1 |
| PowerCLI Version | PowerCLI 6.5.1 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -0,0 +1,178 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Remove-HVEntitlement
## SYNOPSIS
Deletes association data between a user/group and a resource
## SYNTAX
```
Remove-HVEntitlement [-User] <String> [-ResourceName] <String> [[-Type] <String>] [[-ResourceType] <String>]
[[-HvServer] <Object>] [-WhatIf] [-Confirm] [<CommonParameters>]
```
## DESCRIPTION
Removes entitlement between a single user/group and a resource that already been assigned.
## EXAMPLES
### EXAMPLE 1
```
Remove-HVEntitlement -User 'administrator@adviewdev' -ResourceName LnkClnJSon -Confirm:$false
```
Deletes entitlement between a user/group and a pool resource
### EXAMPLE 2
```
Remove-HVEntitlement -User 'adviewdev\puser2' -ResourceName 'calculator' -ResourceType Application
```
Deletes entitlement between a user/group and a Application resource
### EXAMPLE 3
```
Remove-HVEntitlement -User 'adviewdev\administrator' -ResourceName 'GEAPP1' -ResourceType GlobalApplicationEntitlement
```
Deletes entitlement between a user/group and a GlobalApplicationEntitlement resource
## PARAMETERS
### -User
User principal name of user or group
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -ResourceName
The resource(Application, Desktop etc.) name.
Supports only wildcard character '*' when resource type is desktop.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Type
Whether or not this is a group or a user.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: User
Accept pipeline input: False
Accept wildcard characters: False
```
### -ResourceType
Type of Resource(Application, Desktop etc)
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: Desktop
Accept pipeline input: False
Accept wildcard characters: False
```
### -HvServer
Reference to Horizon View Server.
If the value is not passed or null then
first element from global:DefaultHVServers would be considered in-place of hvServer
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
## NOTES
| | |
|-|-|
| Author | Praveen Mathamsetty. |
| Author email | pmathamsetty@vmware.com |
| Version | 1.1 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.0.2, 7.1.0 |
| PowerCLI Version | PowerCLI 6.5, PowerCLI 6.5.1 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -0,0 +1,158 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Remove-HVFarm
## SYNOPSIS
Deletes specified farm(s).
## SYNTAX
### option
```
Remove-HVFarm -FarmName <String> [-HvServer <Object>] [-WhatIf] [-Confirm] [<CommonParameters>]
```
### pipeline
```
Remove-HVFarm -Farm <Object> [-HvServer <Object>] [-WhatIf] [-Confirm] [<CommonParameters>]
```
## DESCRIPTION
This function deletes the farm(s) with the specified name/object(s) from the Connection Server.
Optionally, user can pipe the farm object(s) as input to this function.
## EXAMPLES
### EXAMPLE 1
```
Remove-HVFarm -FarmName 'Farm-01' -HvServer $hvServer -Confirm:$false
```
Delete a given farm.
For an automated farm, all the RDS Server VMs are deleted from disk whereas for a manual farm only the RDS Server associations are removed.
### EXAMPLE 2
```
$farm_array | Remove-HVFarm -HvServer $hvServer
```
Deletes a given Farm object(s).
For an automated farm, all the RDS Server VMs are deleted from disk whereas for a manual farm only the RDS Server associations are removed.
### EXAMPLE 3
```
$farm1 = Get-HVFarm -FarmName 'Farm-01'
```
Remove-HVFarm -Farm $farm1
Deletes a given Farm object.
For an automated farm, all the RDS Server VMs are deleted from disk whereas for a manual farm only the RDS Server associations are removed.
## PARAMETERS
### -FarmName
Name of the farm to be deleted.
```yaml
Type: String
Parameter Sets: option
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Farm
Object(s) of the farm to be deleted.
Object(s) should be of type FarmSummaryView/FarmInfo.
```yaml
Type: Object
Parameter Sets: pipeline
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -HvServer
Reference to Horizon View Server to query the data from.
If the value is not passed or null then first element from global:DefaultHVServers would be considered in-place of hvServer.
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
### None
## NOTES
| | |
|-|-|
| Author | praveen mathamsetty. |
| Author email | pmathamsetty@vmware.com |
| Version | 1.1 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.0.2, 7.1.0 |
| PowerCLI Version | PowerCLI 6.5, PowerCLI 6.5.1 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -0,0 +1,147 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Remove-HVGlobalEntitlement
## SYNOPSIS
Deletes a Global Entitlement.
## SYNTAX
### Default
```
Remove-HVGlobalEntitlement -DisplayName <String> [-HvServer <Object>] [-WhatIf] [-Confirm] [<CommonParameters>]
```
### pipeline
```
Remove-HVGlobalEntitlement -GlobalEntitlement <Object> [-HvServer <Object>] [-WhatIf] [-Confirm]
[<CommonParameters>]
```
## DESCRIPTION
Deletes global entitlement(s) and global application entitlement(s).
Optionally, user can pipe the global entitlement(s) as input to this function.
## EXAMPLES
### EXAMPLE 1
```
Remove-HVGlobalEntitlement -DisplayName 'GE_APP'
```
Deletes global application/desktop entitlement with displayName 'GE_APP'
### EXAMPLE 2
```
Get-HVGlobalEntitlement -DisplayName 'GE_*' | Remove-HVGlobalEntitlement
```
Deletes global application/desktop entitlement(s), if displayName matches with 'GE_*'
## PARAMETERS
### -DisplayName
Display Name of Global Entitlement.
```yaml
Type: String
Parameter Sets: Default
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -GlobalEntitlement
{{ Fill GlobalEntitlement Description }}
```yaml
Type: Object
Parameter Sets: pipeline
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -HvServer
Reference to Horizon View Server.
If the value is not passed or null then
first element from global:DefaultHVServers would be considered inplace of hvServer
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
## NOTES
| | |
|-|-|
| Author | Praveen Mathamsetty. |
| Author email | pmathamsetty@vmware.com |
| Version | 1.1 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.0.2, 7.1.0 |
| PowerCLI Version | PowerCLI 6.5, PowerCLI 6.5.1 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -0,0 +1,154 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Remove-HVMachine
## SYNOPSIS
Remove a Horizon View desktop or desktops.
## SYNTAX
```
Remove-HVMachine [-MachineNames] <Array> [-DeleteFromDisk] [[-HVServer] <Object>] [-WhatIf] [-Confirm]
[<CommonParameters>]
```
## DESCRIPTION
Deletes a VM or an array of VM's from Horizon.
Utilizes an Or query filter to match machine names.
## EXAMPLES
### EXAMPLE 1
```
Remove-HVMachine -HVServer 'horizonserver123' -MachineNames 'LAX-WIN10-002'
```
Deletes VM 'LAX-WIN10-002' from HV Server 'horizonserver123'
### EXAMPLE 2
```
Remove-HVMachine -HVServer 'horizonserver123' -MachineNames $machines
```
Deletes VM's contained within an array of machine names from HV Server 'horizonserver123'
### EXAMPLE 3
```
Remove-HVMachine -HVServer 'horizonserver123' -MachineNames 'ManualVM01' -DeleteFromDisk:$false
```
Deletes VM 'ManualVM01' from Horizon inventory, but not from vSphere.
Note this only works for Full Clone VMs.
## PARAMETERS
### -MachineNames
The name or names of the machine(s) to be deleted.
Accepts a single VM or an array of VM names.This is a mandatory parameter.
```yaml
Type: Array
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -DeleteFromDisk
Determines whether the Machine VM should be deleted from vCenter Server.
This is only applicable for managed machines.
This must always be true for machines in linked and instant clone desktops.
This defaults to true for linked and instant clone machines and false for all other types.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -HVServer
The Horizon server where the machine to be deleted resides.
Parameter is not mandatory,
but if you do not specify the server, than make sure you are connected to a Horizon server
first with connect-hvserver.
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
## NOTES
| | |
|-|-|
| Author | Jose Rodriguez |
| Author email | jrodsguitar@gmail.com |
| Version | 1.0 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.1.1 |
| PowerCLI Version | PowerCLI 6.5, PowerCLI 6.5.1 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -0,0 +1,72 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Remove-HVPodFederation
## SYNOPSIS
Uninitiates a Horizon View Pod Federation (Cloud Pod Architecture)
## SYNTAX
```
Remove-HVPodFederation [[-HvServer] <Object>] [<CommonParameters>]
```
## DESCRIPTION
Starts the uninitialisation of a Horizon View Pod Federation.
It does NOT remove a pod from a federation.
## EXAMPLES
### EXAMPLE 1
```
Starts the Uninitiates a Horizon View Pod Federation.
```
Unintialises
## PARAMETERS
### -HvServer
Reference to Horizon View Server to query the virtual machines from.
If the value is not passed or null then
first element from global:DefaultHVServers would be considered in-place of hvServer
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
## NOTES
| | |
|-|-|
| Author | Wouter Kursten |
| Author email | wouter@retouw.nl |
| Version | 1.0 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.3.2,7.4 |
| PowerCLI Version | PowerCLI 6.5, PowerCLI 6.5.1 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -0,0 +1,186 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Remove-HVPool
## SYNOPSIS
Deletes specified pool(s).
## SYNTAX
### option
```
Remove-HVPool -poolName <String> [-TerminateSession] [-DeleteFromDisk] [-HvServer <Object>] [-WhatIf]
[-Confirm] [<CommonParameters>]
```
### pipeline
```
Remove-HVPool [-Pool <Object>] [-TerminateSession] [-DeleteFromDisk] [-HvServer <Object>] [-WhatIf] [-Confirm]
[<CommonParameters>]
```
## DESCRIPTION
This function deletes the pool(s) with the specified name/object(s) from Connection Server.
This can be used for deleting any pool irrespective of its type.
Optionally, user can pipe the pool object(s) as input to this function.
## EXAMPLES
### EXAMPLE 1
```
Remove-HVPool -HvServer $hvServer -PoolName 'FullClone' -DeleteFromDisk -Confirm:$false
```
Deletes pool from disk with given parameters PoolName etc.
### EXAMPLE 2
```
$pool_array | Remove-HVPool -HvServer $hvServer -DeleteFromDisk
```
Deletes specified pool from disk
### EXAMPLE 3
```
Remove-HVPool -Pool $pool1
```
Deletes specified pool and VM(s) associations are removed from view Manager
## PARAMETERS
### -poolName
Name of the pool to be deleted.
```yaml
Type: String
Parameter Sets: option
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Pool
Object(s) of the pool to be deleted.
```yaml
Type: Object
Parameter Sets: pipeline
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -TerminateSession
Logs off a session forcibly to virtual machine(s).
This operation will also log off a locked session.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -DeleteFromDisk
Switch parameter to delete the virtual machine(s) from the disk.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -HvServer
View API service object of Connect-HVServer cmdlet.
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
### None
## NOTES
| | |
|-|-|
| Author | Praveen Mathamsetty. |
| Author email | pmathamsetty@vmware.com |
| Version | 1.1 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.0.2, 7.1.0 |
| PowerCLI Version | PowerCLI 6.5, PowerCLI 6.5.1 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -0,0 +1,86 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Remove-HVSite
## SYNOPSIS
renames a new site within a Horizon View Pod Federation (Cloud Pod Architecture)
## SYNTAX
```
Remove-HVSite [-name] <String> [[-HvServer] <Object>] [<CommonParameters>]
```
## DESCRIPTION
renames a new site within a Horizon View Pod Federation (Cloud Pod Architecture)
## EXAMPLES
### EXAMPLE 1
```
set-hvsite -site "CURRENTSITENAME" -name "NAME" -description "DESCRIPTION"
```
Returns information about the sites within a Horizon View Pod Federation.
## PARAMETERS
### -name
Name of the site (required)
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -HvServer
Reference to Horizon View Server to query the virtual machines from.
If the value is not passed or null then
first element from global:DefaultHVServers would be considered in-place of hvServer
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
## NOTES
| | |
|-|-|
| Author | Wouter Kursten |
| Author email | wouter@retouw.nl |
| Version | 1.0 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.3.2,7.4 |
| PowerCLI Version | PowerCLI 6.5, PowerCLI 6.5.1 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -0,0 +1,129 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Reset-HVMachine
## SYNOPSIS
Resets Horizon View desktops.
## SYNTAX
```
Reset-HVMachine [-MachineName] <String> [[-HvServer] <Object>] [-WhatIf] [-Confirm] [<CommonParameters>]
```
## DESCRIPTION
Queries and resets virtual machines, the machines list would be determined
based on queryable fields machineName.
Use an asterisk (*) as wildcard.
If the result has multiple machines all will be reset.
Please note that on an Instant Clone Pool this will do the same as a recover of the machine.
## EXAMPLES
### EXAMPLE 1
```
reset-HVMachine -MachineName 'PowerCLIVM'
```
Queries VM(s) with given parameter machineName
### EXAMPLE 2
```
reset-HVMachine -MachineName 'PowerCLIVM*'
```
Queries VM(s) with given parameter machinename with wildcard character *
## PARAMETERS
### -MachineName
The name of the Machine(s) to query for.
This is a required value.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -HvServer
Reference to Horizon View Server to query the virtual machines from.
If the value is not passed or null then
first element from global:DefaultHVServers would be considered in-place of hvServer
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
## NOTES
| | |
|-|-|
| Author | Wouter Kursten |
| Author email | wouter@retouw.nl |
| Version | 1.0 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.3.2 |
| PowerCLI Version | PowerCLI 6.5, PowerCLI 6.5.1 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -0,0 +1,340 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Set-HVApplication
## SYNOPSIS
Updates settings for an existing Application Pool.
## SYNTAX
```
Set-HVApplication [-HvServer <ViewServerImpl>] [-Name] <String> [-DisplayName <String>] [-Description <String>]
[-ExecutablePath <String>] [-Version <String>] [-Publisher <String>] [-Enabled <Boolean>]
[-EnablePreLaunch <Boolean>] [-ConnectionServerRestrictions <String[]>] [-CategoryFolderName <String>]
[-clientRestrictions <Boolean>] [-ShortcutLocations <String[]>] [-StartFolder <String>] [-Args <String>]
[-AutoUpdateFileTypes <Boolean>] [-AutoUpdateOtherFileTypes <Boolean>]
[-GlobalApplicationEntitlement <String>] [<CommonParameters>]
```
## DESCRIPTION
Updates settings for an existing Application Pool.
It does not update the Application Icon.
See Set-HVApplicationIcon for a function to update icons.
This function specifically targets ApplicationInfo.Data and Application.ExecutionData properties.
## EXAMPLES
### EXAMPLE 1
```
New-HVManualApplication -Name 'App1' -DisplayName 'DisplayName' -Description 'ApplicationDescription' -ExecutablePath "PathOfTheExecutable" -Version 'AppVersion' -Publisher 'PublisherName' -Farm 'FarmName'
```
Creates a manual application App1 in the farm specified.
## PARAMETERS
### -HvServer
View API service object of Connect-HVServer cmdlet.
```yaml
Type: ViewServerImpl
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -Name
The Application name is the unique identifier used to identify this Application.
This cannot be updated but is used to specify which application should be updated.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -DisplayName
The display name is the name that users will see when they connect to view client.
If the display name is left blank, it defaults to Name.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: $Name
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -Description
The description is a set of notes about the Application.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -ExecutablePath
Path to Application executable.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -Version
Application version.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -Publisher
Application publisher.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -Enabled
Indicates if Application is enabled.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: True
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -EnablePreLaunch
Application can be pre-launched if value is true.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -ConnectionServerRestrictions
Connection server restrictions.
This is a list of tags that access to the application is restricted to.
Empty/Null list means that the application can be accessed from any connection server.
```yaml
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -CategoryFolderName
Name of the category folder in the user's OS containing a shortcut to the application.
Unset if the application does not belong to a category.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -clientRestrictions
Client restrictions to be applied to Application.
Currently it is valid for RDSH pools.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -ShortcutLocations
Locations of the category folder in the user's OS containing a shortcut to the desktop.
The value must be set if categoryFolderName is provided.
```yaml
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -StartFolder
Starting folder for Application.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -Args
Parameters to pass to application when launching.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -AutoUpdateFileTypes
Whether or not the file types supported by this application should be allowed to automatically update to reflect changes reported by the agent.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: True
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -AutoUpdateOtherFileTypes
Whether or not the other file types supported by this application should be allowed to automatically update to reflect changes reported by the agent.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: True
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -GlobalApplicationEntitlement
The name of a Global Application Entitlement to associate this Application pool with.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
### A success message is displayed when done.
## NOTES
| | |
|-|-|
| Author | Matt Frey |
| Author email | mfrey@vmware.com |
| Version | 1.0 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.8.0 |
| PowerCLI Version | PowerCLI 11.1 |
| PowerShell Version | 5.1 |
## RELATED LINKS

View File

@@ -0,0 +1,134 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Set-HVApplicationIcon
## SYNOPSIS
Used to create/update an icon association for a given application.
## SYNTAX
```
Set-HVApplicationIcon [-ApplicationName] <String> [-IconPath] <Object> [[-HvServer] <Object>] [-WhatIf]
[-Confirm] [<CommonParameters>]
```
## DESCRIPTION
This function is used to create an application icon and associate it with the given application.
If the specified icon already exists in the LDAP, it will just updates the icon association to the application.
Any of the existing customized icon association to the given application will be overwritten.
## EXAMPLES
### EXAMPLE 1
```
Creating the icon I1 and associating with application A1. Same command is used for update icon also.
```
Set-HVApplicationIcon -ApplicationName A1 -IconPath C:\I1.ico -HvServer $hvServer
## PARAMETERS
### -ApplicationName
Name of the application to which the association to be made.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -IconPath
Path of the icon.
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -HvServer
View API service object of Connect-HVServer cmdlet.
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
### None
## NOTES
| | |
|-|-|
| Author | Paramesh Oddepally. |
| Author email | poddepally@vmware.com |
| Version | 1.1 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.1 |
| PowerCLI Version | PowerCLI 6.5.1 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -0,0 +1,212 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Set-HVEventDatabase
## SYNOPSIS
Registers or changes a Horizon View Event database.
## SYNTAX
```
Set-HVEventDatabase [-ServerName] <String> [[-DatabaseType] <String>] [[-DatabasePort] <Int32>]
[-DatabaseName] <String> [[-TablePrefix] <String>] [-UserName] <String> [-password] <SecureString>
[[-eventtime] <String>] [[-eventnewtime] <Int32>] [[-HvServer] <Object>] [<CommonParameters>]
```
## DESCRIPTION
Registers or changes a Horizon View Event database
## EXAMPLES
### EXAMPLE 1
```
register-hveventdatabase -server SERVER@domain -database DATABASENAME -username USER@domain -password $password
```
## PARAMETERS
### -ServerName
Name of the database server (Required)
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -DatabaseType
Database type, possible options: MYSQL,SQLSERVER,ORACLE.
Defaults to SQLSERVER
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: SQLSERVER
Accept pipeline input: False
Accept wildcard characters: False
```
### -DatabasePort
Port number on the database server to which View will send events.
Defaults to 1433.
```yaml
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: 1433
Accept pipeline input: False
Accept wildcard characters: False
```
### -DatabaseName
Name of the Database (required)
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -TablePrefix
Prefix to use for the Event Databse.
Allowed characters are letters, numbers, and the characters @, $, #, _, and may not be longer than 6 characters.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -UserName
UserName to connect to the database (required)
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -password
Password of the user connecting to the database in Securestring format.
Can be created with: $password = Read-Host 'Domain Password' -AsSecureString
```yaml
Type: SecureString
Parameter Sets: (All)
Aliases:
Required: True
Position: 7
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -eventtime
Time to show the events for.
Possible options are ONE_WEEK, TWO_WEEKS, THREE_WEEKS, ONE_MONTH,TWO_MONTHS, THREE_MONTHS, SIX_MONTHS
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 8
Default value: TWO_WEEKS
Accept pipeline input: False
Accept wildcard characters: False
```
### -eventnewtime
Time in days to classify events for new.
Range 1-3
```yaml
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: 9
Default value: 2
Accept pipeline input: False
Accept wildcard characters: False
```
### -HvServer
Reference to Horizon View Server to query the virtual machines from.
If the value is not passed or null then
first element from global:DefaultHVServers would be considered in-place of hvServer
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 10
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
## NOTES
| | |
|-|-|
| Author | Wouter Kursten |
| Author email | wouter@retouw.nl |
| Version | 1.0 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.4 |
| PowerCLI Version | PowerCLI 10 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -0,0 +1,279 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Set-HVFarm
## SYNOPSIS
Edit farm configuration by passing key/values as parameters/json.
## SYNTAX
### option
```
Set-HVFarm -FarmName <String> [-Enable] [-Disable] [-Start] [-Stop] [-Key <String>] [-Value <Object>]
[-Spec <String>] [-HvServer <Object>] [-WhatIf] [-Confirm] [<CommonParameters>]
```
### pipeline
```
Set-HVFarm [-Farm <Object>] [-Enable] [-Disable] [-Start] [-Stop] [-Key <String>] [-Value <Object>]
[-Spec <String>] [-HvServer <Object>] [-WhatIf] [-Confirm] [<CommonParameters>]
```
## DESCRIPTION
This function allows user to edit farm configuration by passing key/value pairs.
Optionally, user can pass a JSON spec file.
User can also pipe the farm object(s) as input to this function.
## EXAMPLES
### EXAMPLE 1
```
Set-HVFarm -FarmName 'Farm-01' -Spec 'C:\Edit-HVFarm\ManualEditFarm.json' -Confirm:$false
```
Updates farm configuration by using json file
### EXAMPLE 2
```
Set-HVFarm -FarmName 'Farm-01' -Key 'base.description' -Value 'updated description'
```
Updates farm configuration with given parameters key and value
### EXAMPLE 3
```
$farm_array | Set-HVFarm -Key 'base.description' -Value 'updated description'
```
Updates farm(s) configuration with given parameters key and value
### EXAMPLE 4
```
Set-HVFarm -farm 'Farm2' -Start
```
Enables provisioning to specified farm
### EXAMPLE 5
```
Set-HVFarm -farm 'Farm2' -Enable
```
Enables specified farm
## PARAMETERS
### -FarmName
Name of the farm to edit.
```yaml
Type: String
Parameter Sets: option
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Farm
Object(s) of the farm to edit.
Object(s) should be of type FarmSummaryView/FarmInfo.
```yaml
Type: Object
Parameter Sets: pipeline
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -Enable
Switch to enable the farm(s).
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -Disable
Switch to disable the farm(s).
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -Start
Switch to enable provisioning immediately for the farm(s).
It's applicable only for 'AUTOMATED' farm type.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -Stop
Switch to disable provisioning immediately for the farm(s).
It's applicable only for 'AUTOMATED' farm type.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -Key
Property names path separated by .
(dot) from the root of desktop spec.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Value
Property value corresponds to above key name.
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Spec
Path of the JSON specification file containing key/value pair.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -HvServer
Reference to Horizon View Server to query the data from.
If the value is not passed or null then first element from global:DefaultHVServers would be considered in-place of hvServer.
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
### None
## NOTES
| | |
|-|-|
| Author | praveen mathamsetty. |
| Author email | pmathamsetty@vmware.com |
| Version | 1.1 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.0.2, 7.1.0 |
| PowerCLI Version | PowerCLI 6.5, PowerCLI 6.5.1 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -0,0 +1,253 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Set-HVGlobalEntitlement
## SYNOPSIS
Sets the existing pool properties.
## SYNTAX
### option
```
Set-HVGlobalEntitlement -displayName <String> [-Key <String>] [-Value <Object>] [-Spec <String>] [-Enable]
[-Disable] [-enableHTMLAccess <Boolean>] [-HvServer <Object>] [-WhatIf] [-Confirm] [<CommonParameters>]
```
### pipeline
```
Set-HVGlobalEntitlement [-GlobalEntitlements <Object>] [-Key <String>] [-Value <Object>] [-Spec <String>]
[-Enable] [-Disable] [-enableHTMLAccess <Boolean>] [-HvServer <Object>] [-WhatIf] [-Confirm]
[<CommonParameters>]
```
## DESCRIPTION
This cmdlet allows user to edit global entitlements.
## EXAMPLES
### EXAMPLE 1
```
Set-HVGlobalEntitlement -DisplayName 'MyGlobalEntitlement' -Spec 'C:\Edit-HVPool\EditPool.json' -Confirm:$false
```
Updates pool configuration by using json file
### EXAMPLE 2
```
Set-HVGlobalEntitlement -DisplayName 'MyGlobalEntitlement' -Key 'base.description' -Value 'update description'
```
Updates pool configuration with given parameters key and value
### EXAMPLE 3
```
Set-HVGlobalEntitlement -DisplayName 'MyGlobalEntitlement' -enableHTMLAccess $true
```
Set Allow HTML Access on a global entitlement.
Note that it must also be enabled on the Pool and as of 7.3.0 Allow User to Choose Protocol must be enabled (which is unfortunately read-only)
### EXAMPLE 4
```
Get-HVGlobalEntitlement | Set-HVGlobalEntitlement -Disable
```
Disable all global entitlements
## PARAMETERS
### -displayName
Display Name of Global Entitlement.
```yaml
Type: String
Parameter Sets: option
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -GlobalEntitlements
{{ Fill GlobalEntitlements Description }}
```yaml
Type: Object
Parameter Sets: pipeline
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -Key
Property names path separated by .
(dot) from the root of desktop spec.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Value
Property value corresponds to above key name.
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Spec
Path of the JSON specification file containing key/value pair.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Enable
{{ Fill Enable Description }}
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -Disable
{{ Fill Disable Description }}
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -enableHTMLAccess
If set to true, the desktops that are associated with this GlobalEntitlement must also have HTML Access enabled.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -HvServer
View API service object of Connect-HVServer cmdlet.
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
### None
## NOTES
| | |
|-|-|
Author : Mark Elvers
Author email : mark.elvers@tunbury.org
Version : 1.0
===Tested Against Environment====
| | |
|-|-|
Horizon View Server Version : 7.3.0, 7.3.1
PowerCLI Version : PowerCLI 6.5.1
PowerShell Version : 5.0
## RELATED LINKS

View File

@@ -0,0 +1,520 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Set-HVGlobalSettings
## SYNOPSIS
Sets the Global Settings of the Connection Server Pod
## SYNTAX
```
Set-HVGlobalSettings [[-Key] <String>] [[-Value] <Object>] [[-Spec] <String>]
[[-clientMaxSessionTimePolicy] <String>] [[-clientMaxSessionTimeMinutes] <Int32>]
[[-clientIdleSessionTimeoutPolicy] <String>] [[-clientIdleSessionTimeoutMinutes] <Int32>]
[[-clientSessionTimeoutMinutes] <Int32>] [[-desktopSSOTimeoutPolicy] <String>]
[[-desktopSSOTimeoutMinutes] <Int32>] [[-applicationSSOTimeoutPolicy] <String>]
[[-applicationSSOTimeoutMinutes] <Int32>] [[-viewAPISessionTimeoutMinutes] <Int32>]
[[-preLoginMessage] <String>] [[-displayWarningBeforeForcedLogoff] <Boolean>]
[[-forcedLogoffTimeoutMinutes] <Int32>] [[-forcedLogoffMessage] <String>]
[[-enableServerInSingleUserMode] <Boolean>] [[-storeCALOnBroker] <Boolean>] [[-storeCALOnClient] <Boolean>]
[[-reauthSecureTunnelAfterInterruption] <Boolean>] [[-messageSecurityMode] <String>]
[[-enableIPSecForSecurityServerPairing] <Boolean>] [[-HvServer] <Object>] [-WhatIf] [-Confirm]
[<CommonParameters>]
```
## DESCRIPTION
This cmdlet allows user to set Global Settings by passing key/value pair or by passing specific parameters.
Optionally, user can pass a JSON spec file.
## EXAMPLES
### EXAMPLE 1
```
Set-HVGlobalSettings 'ManualPool' -Spec 'C:\Set-HVGlobalSettings\Set-GlobalSettings.json'
```
### EXAMPLE 2
```
Set-HVGlobalSettings -Key 'generalData.clientMaxSessionTimePolicy' -Value 'NEVER'
```
### EXAMPLE 3
```
Set-HVGlobalSettings -clientMaxSessionTimePolicy "TIMEOUT_AFTER" -clientMaxSessionTimeMinutes 1200
```
## PARAMETERS
### -Key
Property names path separated by .
(dot) from the root of global settings spec.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Value
Property value corresponds to above key name.
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Spec
Path of the JSON specification file containing key/value pair.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -clientMaxSessionTimePolicy
Client max session lifetime policy.
"TIMEOUT_AFTER" Indicates that the client session times out after a configurable session length (in minutes)
"NEVER" Indicates no absolute client session length (sessions only end due to inactivity)
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -clientMaxSessionTimeMinutes
Determines how long a user can keep a session open after logging in to View Connection Server.
The value is set in minutes.
When a session times out, the session is terminated and the View client is disconnected from the resource.
Default value is 600.
Minimum value is 5.
Maximum value is 600.
This property is required if clientMaxSessionTimePolicy is set to "TIMEOUT_AFTER"
```yaml
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: 5
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
```
### -clientIdleSessionTimeoutPolicy
Specifies the policy for the maximum time that a that a user can be idle before the broker takes measure to protect the session.
"TIMEOUT_AFTER" Indicates that the user session can be idle for a configurable max time (in minutes) before the broker takes measure to protect the session.
"NEVER" Indicates that the client session is never locked.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -clientIdleSessionTimeoutMinutes
Determines how long a that a user can be idle before the broker takes measure to protect the session.
The value is set in minutes.
Default value is 15
This property is required if -clientIdleSessionTimeoutPolicy is set to "TIMEOUT_AFTER"
```yaml
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: 7
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
```
### -clientSessionTimeoutMinutes
Determines the maximum length of time that a Broker session will be kept active if there is no traffic between a client and the Broker.
The value is set in minutes.
Default value is 1200
Minimum value is 5
```yaml
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: 8
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
```
### -desktopSSOTimeoutPolicy
The single sign on setting for when a user connects to View Connection Server.
"DISABLE_AFTER" SSO is disabled the specified number of minutes after a user connects to View Connection Server.
"DISABLED" Single sign on is always disabled.
"ALWAYS_ENABLED" Single sign on is always enabled.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 9
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -desktopSSOTimeoutMinutes
SSO is disabled the specified number of minutes after a user connects to View Connection Server.
Minimum value is 1
Maximum value is 999
```yaml
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: 10
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
```
### -applicationSSOTimeoutPolicy
The single sign on timeout policy for application sessions.
"DISABLE_AFTER" SSO is disabled the specified number of minutes after a user connects to View Connection Server.
"DISABLED" Single sign on is always disabled.
"ALWAYS_ENABLED" Single sign on is always enabled.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 11
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -applicationSSOTimeoutMinutes
SSO is disabled the specified number of minutes after a user connects to View Connection Server.
Minimum value is 1
Maximum value is 999
```yaml
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: 12
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
```
### -viewAPISessionTimeoutMinutes
Determines how long (in minutes) an idle View API session continues before the session times out.
Setting the View API session timeout to a high number of minutes increases the risk of unauthorized use of View API.
Use caution when you allow an idle session to persist a long time.
Default value is 10
Minimum value is 1
Maximum value is 4320
```yaml
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: 13
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
```
### -preLoginMessage
Displays a disclaimer or another message to View Client users when they log in.
No message will be displayed if this is null.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 14
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -displayWarningBeforeForcedLogoff
Displays a warning message when users are forced to log off because a scheduled or immediate update such as a machine-refresh operation is about to start.
$TRUE or $FALSE
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 15
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -forcedLogoffTimeoutMinutes
{{ Fill forcedLogoffTimeoutMinutes Description }}
```yaml
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: 16
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
```
### -forcedLogoffMessage
The warning to be displayed before logging off the user.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 17
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -enableServerInSingleUserMode
Permits certain RDSServer operating systems to be used for non-RDS Desktops.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 18
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -storeCALOnBroker
Used for configuring whether or not to store the RDS Per Device CAL on Broker.
$TRUE or $FALSE
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 19
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -storeCALOnClient
Used for configuring whether or not to store the RDS Per Device CAL on client devices.
This value can be true only if the storeCALOnBroker is true.
$TRUE or $FALSE
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 20
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -reauthSecureTunnelAfterInterruption
Reauthenticate secure tunnel connections after network interruption Determines if user credentials must be reauthenticated after a network interruption when View clients use secure tunnel connections to View resources.
When you select this setting, if a secure tunnel connection ends during a session, View Client requires the user to reauthenticate before reconnecting.
This setting offers increased security.
For example, if a laptop is stolen and moved to a different network, the user cannot automatically gain access to the remote resource because the network connection was temporarily interrupted.
When this setting is not selected, the client reconnects to the resource without requiring the user to reauthenticate.
This setting has no effect when you use direct connection.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 21
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -messageSecurityMode
Determines if signing and verification of the JMS messages passed between View Manager components takes place.
"DISABLED" Message security mode is disabled.
"MIXED" Message security mode is enabled but not enforced.
You can use this mode to detect components in your View environment that predate View Manager 3.0.
The log files generated by View Connection Server contain references to these components.
"ENABLED" Message security mode is enabled.
Unsigned messages are rejected by View components.
Message security mode is enabled by default.
Note: View components that predate View Manager 3.0 are not allowed to communicate with other View components.
"ENHANCED" Message Security mode is Enhanced.
Message signing and validation is performed based on the current Security Level and desktop Message Security mode.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 22
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -enableIPSecForSecurityServerPairing
Determines whether to use Internet Protocol Security (IPSec) for connections between security servers and View Connection Server instances.
By default, secure connections (using IPSec) for security server connections is enabled.
$TRUE or $FALSE
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 23
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -HvServer
View API service object of Connect-HVServer cmdlet.
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 24
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
### None
## NOTES
| | |
|-|-|
| Author | Matt Frey. |
| Author email | mfrey@vmware.com |
| Version | 1.0 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.1 |
| PowerCLI Version | PowerCLI 6.5.1 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -0,0 +1,147 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Set-HVInstantCloneMaintenance
## SYNOPSIS
Enable or disable instant clone maintanence mode
## SYNTAX
```
Set-HVInstantCloneMaintenance [-VMHost] <String> [-Enable] [-Disable] [-HvServer <Object>] [-WhatIf] [-Confirm]
[<CommonParameters>]
```
## DESCRIPTION
Toggles a host in instant clone maintanence mode.
Specify the VMHost name and enable or disable to toggle.
## EXAMPLES
### EXAMPLE 1
```
-Enable $true
```
Set-HvInstantCloneMaintenance -VMHost \<hostname\> -Disable $true
## PARAMETERS
### -VMHost
ESXi Host name to modify the InstantClone.Maintenance attribute
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Enable
Enable Instant Clone maintenance mode.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -Disable
Disable Instant Clone maintenance mode
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -HvServer
{{ Fill HvServer Description }}
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
## NOTES
| | |
|-|-|
| Author | Jack McMichael |
| Author email | @jackwmc4 / jackwmc4@gmail.com |
| Version | 1.0 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.6 |
| PowerCLI Version | PowerCLI 11 |
| PowerShell Version | 5.1 |
## RELATED LINKS

View File

@@ -0,0 +1,221 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Set-HVMachine
## SYNOPSIS
Sets existing virtual Machine(s).
## SYNTAX
### option
```
Set-HVMachine -MachineName <String> [-Maintenance <String>] [-Key <String>] [-Value <Object>] [-User <String>]
[-HvServer <Object>] [-WhatIf] [-Confirm] [<CommonParameters>]
```
### pipeline
```
Set-HVMachine -Machine <Object> [-Maintenance <String>] [-Key <String>] [-Value <Object>] [-User <String>]
[-HvServer <Object>] [-WhatIf] [-Confirm] [<CommonParameters>]
```
## DESCRIPTION
This cmdlet allows user to edit Machine configuration by passing key/value pair.
Allows the machine in to Maintenance mode and vice versa
## EXAMPLES
### EXAMPLE 1
```
Set-HVMachine -MachineName 'Agent_Praveen' -Maintenance ENTER_MAINTENANCE_MODE
```
Moving the machine in to Maintenance mode using machine name
### EXAMPLE 2
```
Get-HVMachine -MachineName 'Agent_Praveen' | Set-HVMachine -Maintenance ENTER_MAINTENANCE_MODE
```
Moving the machine in to Maintenance mode using machine object(s)
### EXAMPLE 3
```
$machine = Get-HVMachine -MachineName 'Agent_Praveen'; Set-HVMachine -Machine $machine -Maintenance EXIT_MAINTENANCE_MODE
```
Moving the machine in to Maintenance mode using machine object(s)
## PARAMETERS
### -MachineName
The name of the Machine to edit.
```yaml
Type: String
Parameter Sets: option
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Machine
Object(s) of the virtual Machine(s) to edit.
```yaml
Type: Object
Parameter Sets: pipeline
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -Maintenance
The virtual machine is in maintenance mode.
Users cannot log in or use the virtual machine
PARAMETER Key
Property names path separated by .
(dot) from the root of machine info spec.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Key
{{ Fill Key Description }}
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Value
Property value corresponds to above key name.
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -User
{{ Fill User Description }}
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -HvServer
Reference to Horizon View Server to query the virtual machines from.
If the value is not passed or null then
first element from global:DefaultHVServers would be considered in-place of hvServer
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
### None
## NOTES
| | |
|-|-|
| Author | Praveen Mathamsetty. |
| Author email | pmathamsetty@vmware.com |
| Version | 1.1 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.0.2, 7.1.0 |
| PowerCLI Version | PowerCLI 6.5, PowerCLI 6.5.1 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -0,0 +1,86 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Set-HVPodFederation
## SYNOPSIS
Used to change the name of a Horizon View Pod Federation (Cloud Pod Architecture)
## SYNTAX
```
Set-HVPodFederation [-name] <String> [[-HvServer] <Object>] [<CommonParameters>]
```
## DESCRIPTION
Used to change the name of a Horizon View Pod Federation (Cloud Pod Architecture)
## EXAMPLES
### EXAMPLE 1
```
set-hvpodfederation -name "New Name"
```
Will update the name of the current podfederation.
## PARAMETERS
### -name
The new name of the Pod Federation.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -HvServer
Reference to Horizon View Server to query the virtual machines from.
If the value is not passed or null then
first element from global:DefaultHVServers would be considered in-place of hvServer
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
## NOTES
| | |
|-|-|
| Author | Wouter Kursten |
| Author email | wouter@retouw.nl |
| Version | 1.0 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.3.2,7.4 |
| PowerCLI Version | PowerCLI 6.5, PowerCLI 6.5.1 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -0,0 +1,361 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Set-HVPool
## SYNOPSIS
Sets the existing pool properties.
## SYNTAX
### option
```
Set-HVPool -PoolName <String> [-Enable] [-Disable] [-Start] [-Stop] [-Key <String>] [-Value <Object>]
[-Spec <String>] [-globalEntitlement <String>] [-ResourcePool <String>] [-clearGlobalEntitlement]
[-allowUsersToChooseProtocol <Boolean>] [-enableHTMLAccess <Boolean>] [-HvServer <Object>] [-WhatIf]
[-Confirm] [<CommonParameters>]
```
### pipeline
```
Set-HVPool [-Pool <Object>] [-Enable] [-Disable] [-Start] [-Stop] [-Key <String>] [-Value <Object>]
[-Spec <String>] [-globalEntitlement <String>] [-ResourcePool <String>] [-clearGlobalEntitlement]
[-allowUsersToChooseProtocol <Boolean>] [-enableHTMLAccess <Boolean>] [-HvServer <Object>] [-WhatIf]
[-Confirm] [<CommonParameters>]
```
## DESCRIPTION
This cmdlet allows user to edit pool configuration by passing key/value pair.
Optionally, user can pass a JSON spec file.
## EXAMPLES
### EXAMPLE 1
```
Set-HVPool -PoolName 'ManualPool' -Spec 'C:\Edit-HVPool\EditPool.json' -Confirm:$false
```
Updates pool configuration by using json file
### EXAMPLE 2
```
Set-HVPool -PoolName 'RDSPool' -Key 'base.description' -Value 'update description'
```
Updates pool configuration with given parameters key and value
### EXAMPLE 3
```
Set-HVPool -PoolName 'LnkClone' -Disable
```
Disables specified pool
### EXAMPLE 4
```
Set-HVPool -PoolName 'LnkClone' -Enable
```
Enables specified pool
### EXAMPLE 5
```
Set-HVPool -PoolName 'LnkClone' -Start
```
Enables provisioning to specified pool
### EXAMPLE 6
```
Set-HVPool -PoolName 'LnkClone' -Stop
```
Disables provisioning to specified pool
## PARAMETERS
### -PoolName
Name of the pool to edit.
```yaml
Type: String
Parameter Sets: option
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Pool
Object(s) of the pool to edit.
```yaml
Type: Object
Parameter Sets: pipeline
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -Enable
Switch parameter to enable the pool.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -Disable
Switch parameter to disable the pool.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -Start
Switch parameter to start the pool.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -Stop
Switch parameter to stop the pool.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -Key
Property names path separated by .
(dot) from the root of desktop spec.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Value
Property value corresponds to above key name.
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Spec
Path of the JSON specification file containing key/value pair.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -globalEntitlement
{{ Fill globalEntitlement Description }}
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -ResourcePool
{{ Fill ResourcePool Description }}
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -clearGlobalEntitlement
{{ Fill clearGlobalEntitlement Description }}
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -allowUsersToChooseProtocol
{{ Fill allowUsersToChooseProtocol Description }}
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -enableHTMLAccess
{{ Fill enableHTMLAccess Description }}
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -HvServer
View API service object of Connect-HVServer cmdlet.
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
### None
## NOTES
| | |
|-|-|
| Author | Praveen Mathamsetty. |
| Author email | pmathamsetty@vmware.com |
| Version | 1.2 |
| Updated | Mark Elvers \<mark.elvers@tunbury.org\> |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.0.2, 7.1.0 |
| PowerCLI Version | PowerCLI 6.5, PowerCLI 6.5.1 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -0,0 +1,117 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Set-HVSite
## SYNOPSIS
renames a new site within a Horizon View Pod Federation (Cloud Pod Architecture)
## SYNTAX
```
Set-HVSite [-sitename] <String> [-name] <String> [-description] <String> [[-HvServer] <Object>]
[<CommonParameters>]
```
## DESCRIPTION
renames a new site within a Horizon View Pod Federation (Cloud Pod Architecture)
## EXAMPLES
### EXAMPLE 1
```
set-hvsite -site "CURRENTSITENAME" -name "NAME" -description "DESCRIPTION"
```
Returns information about the sites within a Horizon View Pod Federation.
## PARAMETERS
### -sitename
Name of the site to be edited
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -name
New name of the site (required)
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -description
New description of the site (required)
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -HvServer
Reference to Horizon View Server to query the virtual machines from.
If the value is not passed or null then
first element from global:DefaultHVServers would be considered in-place of hvServer
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
## NOTES
| | |
|-|-|
| Author | Wouter Kursten |
| Author email | wouter@retouw.nl |
| Version | 1.0 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.3.2,7.4 |
| PowerCLI Version | PowerCLI 6.5, PowerCLI 6.5.1 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -0,0 +1,86 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Set-HVlicense
## SYNOPSIS
Sets or changes the license for Horizon View
## SYNTAX
```
Set-HVlicense [-license] <String> [[-HvServer] <Object>] [<CommonParameters>]
```
## DESCRIPTION
Sets or changes the license for Horizon View
## EXAMPLES
### EXAMPLE 1
```
Set-HVlicense -license "LICENSE-KEY"
```
Returns information about the sites within a Horizon View Pod Federation.
## PARAMETERS
### -license
License key (string)
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -HvServer
Reference to Horizon View Server to query the virtual machines from.
If the value is not passed or null then
first element from global:DefaultHVServers would be considered in-place of hvServer
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
## NOTES
| | |
|-|-|
| Author | Wouter Kursten |
| Author email | wouter@retouw.nl |
| Version | 1.0 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.4,7.5 |
| PowerCLI Version | PowerCLI 10 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -0,0 +1,465 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Start-HVFarm
## SYNOPSIS
Performs maintenance tasks on the farm(s).
## SYNTAX
### RECOMPOSE
```
Start-HVFarm -Farm <Object> [-Recompose] [-StartTime <DateTime>] -LogoffSetting <String>
[-StopOnFirstError <Boolean>] [-Servers <String[]>] -ParentVM <String> -SnapshotVM <String>
[-Vcenter <String>] [-HvServer <Object>] [-WhatIf] [-Confirm] [<CommonParameters>]
```
### SCHEDULEMAINTENANCE
```
Start-HVFarm -Farm <Object> [-ScheduleMaintenance] [-StartTime <DateTime>] [-LogoffSetting <String>]
[-StopOnFirstError <Boolean>] [-ParentVM <String>] [-SnapshotVM <String>] [-Vcenter <String>]
-MaintenanceMode <String> [-MaintenanceStartTime <String>] [-MaintenancePeriod <String>] [-StartInt <Int32>]
[-EveryInt <Int32>] [-HvServer <Object>] [-WhatIf] [-Confirm] [<CommonParameters>]
```
### CANCELMAINTENANCE
```
Start-HVFarm -Farm <Object> [-CancelMaintenance] -MaintenanceMode <String> [-HvServer <Object>] [-WhatIf]
[-Confirm] [<CommonParameters>]
```
## DESCRIPTION
This function is used to perform maintenance tasks like enable/disable, start/stop and recompose the farm.
This function is also used for scheduling maintenance operation on instant-clone farm(s).
## EXAMPLES
### EXAMPLE 1
```
Start-HVFarm -Recompose -Farm 'Farm-01' -LogoffSetting FORCE_LOGOFF -ParentVM 'View-Agent-Win8' -SnapshotVM 'Snap_USB' -Confirm:$false
```
Requests a recompose of RDS Servers in the specified automated farm
### EXAMPLE 2
```
$myTime = Get-Date '10/03/2016 12:30:00'
```
Start-HVFarm -Farm 'Farm-01' -Recompose -LogoffSetting 'FORCE_LOGOFF' -ParentVM 'ParentVM' -SnapshotVM 'SnapshotVM' -StartTime $myTime
Requests a recompose task for automated farm in specified time
### EXAMPLE 3
```
Start-HVFarm -Farm 'ICFarm-01' -ScheduleMaintenance -MaintenanceMode IMMEDIATE
```
Requests a ScheduleMaintenance task for instant-clone farm.
Schedules an IMMEDIATE maintenance.
### EXAMPLE 4
```
Start-HVFarm -ScheduleMaintenance -Farm 'ICFarm-01' -MaintenanceMode RECURRING -MaintenancePeriod WEEKLY -MaintenanceStartTime '11:30' -StartInt 6 -EveryInt 1 -ParentVM 'vm-rdsh-ic' -SnapshotVM 'Snap_Updated'
```
Requests a ScheduleMaintenance task for instant-clone farm.
Schedules a recurring weekly maintenace every Saturday night at 23:30 and updates the parentVM and snapshot.
### EXAMPLE 5
```
Start-HVFarm -CancelMaintenance -Farm 'ICFarm-01' -MaintenanceMode RECURRING
```
Requests a CancelMaintenance task for instant-clone farm.
Cancels recurring maintenance.
## PARAMETERS
### -Farm
Name/Object(s) of the farm.
Object(s) should be of type FarmSummaryView/FarmInfo.
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -Recompose
Switch for recompose operation.
Requests a recompose of RDS Servers in the specified 'AUTOMATED' farm.
This marks the RDS Servers for recompose, which is performed asynchronously.
```yaml
Type: SwitchParameter
Parameter Sets: RECOMPOSE
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -ScheduleMaintenance
Switch for ScheduleMaintenance operation.
Requests for scheduling maintenance operation on RDS Servers in the specified Instant clone farm.
This marks the RDS Servers for scheduled maintenance, which is performed according to the schedule.
```yaml
Type: SwitchParameter
Parameter Sets: SCHEDULEMAINTENANCE
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -CancelMaintenance
Switch for cancelling maintenance operation.
Requests for cancelling a scheduled maintenance operation on the specified Instant clone farm.
This stops further maintenance operation on the given farm.
```yaml
Type: SwitchParameter
Parameter Sets: CANCELMAINTENANCE
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -StartTime
Specifies when to start the recompose/ScheduleMaintenance operation.
If unset, the recompose operation will begin immediately.
For IMMEDIATE maintenance if unset, maintenance will begin immediately.
For RECURRING maintenance if unset, will be calculated based on recurring maintenance configuration.
If in the past, maintenance will begin immediately.
```yaml
Type: DateTime
Parameter Sets: RECOMPOSE, SCHEDULEMAINTENANCE
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -LogoffSetting
Determines when to perform the operation on machines which have an active session.
This property will be one of:
"FORCE_LOGOFF" - Users will be forced to log off when the system is ready to operate on their RDS Servers.
Before being forcibly logged off, users may have a grace period in which to save their work (Global Settings).
This is the default value.
"WAIT_FOR_LOGOFF" - Wait for connected users to disconnect before the task starts.
The operation starts immediately on RDS Servers without active sessions.
```yaml
Type: String
Parameter Sets: RECOMPOSE
Aliases:
Required: True
Position: Named
Default value: FORCE_LOGOFF
Accept pipeline input: False
Accept wildcard characters: False
```
```yaml
Type: String
Parameter Sets: SCHEDULEMAINTENANCE
Aliases:
Required: False
Position: Named
Default value: FORCE_LOGOFF
Accept pipeline input: False
Accept wildcard characters: False
```
### -StopOnFirstError
Indicates that the operation should stop on first error.
Defaults to true.
```yaml
Type: Boolean
Parameter Sets: RECOMPOSE, SCHEDULEMAINTENANCE
Aliases:
Required: False
Position: Named
Default value: True
Accept pipeline input: False
Accept wildcard characters: False
```
### -Servers
The RDS Server(s) id to recompose.
Provide a comma separated list for multiple RDSServerIds.
```yaml
Type: String[]
Parameter Sets: RECOMPOSE
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -ParentVM
New base image VM for automated farm's RDS Servers.
This must be in the same datacenter as the base image of the RDS Server.
```yaml
Type: String
Parameter Sets: RECOMPOSE
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
```yaml
Type: String
Parameter Sets: SCHEDULEMAINTENANCE
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -SnapshotVM
Base image snapshot for the Automated Farm's RDS Servers.
```yaml
Type: String
Parameter Sets: RECOMPOSE
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
```yaml
Type: String
Parameter Sets: SCHEDULEMAINTENANCE
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Vcenter
Virtual Center server-address (IP or FQDN) of the given farm.
This should be same as provided to the Connection Server while adding the vCenter server.
```yaml
Type: String
Parameter Sets: RECOMPOSE, SCHEDULEMAINTENANCE
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -MaintenanceMode
The mode of schedule maintenance for Instant Clone Farm.
This property will be one of:
"IMMEDIATE" - All server VMs will be refreshed once, immediately or at user scheduled time.
"RECURRING" - All server VMs will be periodically refreshed based on MaintenancePeriod and MaintenanceStartTime.
```yaml
Type: String
Parameter Sets: SCHEDULEMAINTENANCE, CANCELMAINTENANCE
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -MaintenanceStartTime
Configured start time for the recurring maintenance.
This property must be in the form hh:mm in 24 hours format.
```yaml
Type: String
Parameter Sets: SCHEDULEMAINTENANCE
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -MaintenancePeriod
This represents the frequency at which to perform recurring maintenance.
This property will be one of:
"DAILY" - Daily recurring maintenance
"WEEKLY" - Weekly recurring maintenance
"MONTHLY" - Monthly recurring maintenance
```yaml
Type: String
Parameter Sets: SCHEDULEMAINTENANCE
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -StartInt
Start index for weekly or monthly maintenance.
Weekly: 1-7 (Sun-Sat), Monthly: 1-31.
This property is required if maintenancePeriod is set to "WEEKLY"or "MONTHLY".
This property has values 1-7 for maintenancePeriod "WEEKLY".
This property has values 1-31 for maintenancePeriod "MONTHLY".
```yaml
Type: Int32
Parameter Sets: SCHEDULEMAINTENANCE
Aliases:
Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
```
### -EveryInt
How frequently to repeat maintenance, expressed as a multiple of the maintenance period.
e.g.
Every 2 weeks.
This property has a default value of 1.
This property has values 1-100.
```yaml
Type: Int32
Parameter Sets: SCHEDULEMAINTENANCE
Aliases:
Required: False
Position: Named
Default value: 1
Accept pipeline input: False
Accept wildcard characters: False
```
### -HvServer
Reference to Horizon View Server to query the data from.
If the value is not passed or null then first element from global:DefaultHVServers would be considered in-place of hvServer.
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
### None
## NOTES
| | |
|-|-|
| Author | praveen mathamsetty. |
| Author email | pmathamsetty@vmware.com |
| Version | 1.1 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.0.2, 7.1.0 |
| PowerCLI Version | PowerCLI 6.5, PowerCLI 6.5.1 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -0,0 +1,399 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Start-HVPool
## SYNOPSIS
Perform maintenance tasks on Pool.
## SYNTAX
### REFRESH
```
Start-HVPool -Pool <Object> [-Refresh] [-StartTime <DateTime>] -LogoffSetting <String>
[-StopOnFirstError <Boolean>] [-Machines <String[]>] [-HvServer <Object>] [-WhatIf] [-Confirm]
[<CommonParameters>]
```
### RECOMPOSE
```
Start-HVPool -Pool <Object> [-Recompose] [-StartTime <DateTime>] -LogoffSetting <String>
[-StopOnFirstError <Boolean>] [-Machines <String[]>] -ParentVM <String> -SnapshotVM <String>
[-Vcenter <String>] [-HvServer <Object>] [-WhatIf] [-Confirm] [<CommonParameters>]
```
### REBALANCE
```
Start-HVPool -Pool <Object> [-Rebalance] [-StartTime <DateTime>] -LogoffSetting <String>
[-StopOnFirstError <Boolean>] [-Machines <String[]>] [-HvServer <Object>] [-WhatIf] [-Confirm]
[<CommonParameters>]
```
### PUSH_IMAGE
```
Start-HVPool -Pool <Object> [-SchedulePushImage] [-StartTime <DateTime>] [-LogoffSetting <String>]
[-StopOnFirstError <Boolean>] [-ParentVM <String>] [-SnapshotVM <String>] [-Vcenter <String>]
[-HvServer <Object>] [-WhatIf] [-Confirm] [<CommonParameters>]
```
### CANCEL_PUSH_IMAGE
```
Start-HVPool -Pool <Object> [-CancelPushImage] [-HvServer <Object>] [-WhatIf] [-Confirm] [<CommonParameters>]
```
## DESCRIPTION
This cmdlet is used to perform maintenance tasks like enable/disable the pool, enable/disable the provisioning of a pool, refresh, rebalance, recompose, push image and cancel image.
Push image and Cancel image tasks only applies for instant clone pool.
## EXAMPLES
### EXAMPLE 1
```
Start-HVPool -Recompose -Pool 'LCPool3' -LogoffSetting FORCE_LOGOFF -ParentVM 'View-Agent-Win8' -SnapshotVM 'Snap_USB'
```
Requests a recompose of machines in the specified pool
### EXAMPLE 2
```
Start-HVPool -Refresh -Pool 'LCPool3' -LogoffSetting FORCE_LOGOFF -Confirm:$false
```
Requests a refresh of machines in the specified pool
### EXAMPLE 3
```
$myTime = Get-Date '10/03/2016 12:30:00'
```
Start-HVPool -Rebalance -Pool 'LCPool3' -LogoffSetting FORCE_LOGOFF -StartTime $myTime
Requests a rebalance of machines in a pool with specified time
### EXAMPLE 4
```
Start-HVPool -SchedulePushImage -Pool 'InstantPool' -LogoffSetting FORCE_LOGOFF -ParentVM 'InsParentVM' -SnapshotVM 'InsSnapshotVM'
```
Requests an update of push image operation on the specified Instant Clone Engine sourced pool
### EXAMPLE 5
```
Start-HVPool -CancelPushImage -Pool 'InstantPool'
```
Requests a cancellation of the current scheduled push image operation on the specified Instant Clone Engine sourced pool
## PARAMETERS
### -Pool
Name/Object(s) of the pool.
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -Refresh
Switch parameter to refresh operation.
```yaml
Type: SwitchParameter
Parameter Sets: REFRESH
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -Recompose
Switch parameter to recompose operation.
```yaml
Type: SwitchParameter
Parameter Sets: RECOMPOSE
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -Rebalance
Switch parameter to rebalance operation.
```yaml
Type: SwitchParameter
Parameter Sets: REBALANCE
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -SchedulePushImage
Switch parameter to push image operation.
```yaml
Type: SwitchParameter
Parameter Sets: PUSH_IMAGE
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -CancelPushImage
Switch parameter to cancel push image operation.
```yaml
Type: SwitchParameter
Parameter Sets: CANCEL_PUSH_IMAGE
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -StartTime
Specifies when to start the operation.
If unset, the operation will begin immediately.
```yaml
Type: DateTime
Parameter Sets: REFRESH, RECOMPOSE, REBALANCE, PUSH_IMAGE
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -LogoffSetting
Determines when to perform the operation on machines which have an active session.
This property will be one of:
'FORCE_LOGOFF' - Users will be forced to log off when the system is ready to operate on their virtual machines.
'WAIT_FOR_LOGOFF' - Wait for connected users to disconnect before the task starts.
The operation starts immediately on machines without active sessions.
```yaml
Type: String
Parameter Sets: REFRESH, RECOMPOSE, REBALANCE
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
```yaml
Type: String
Parameter Sets: PUSH_IMAGE
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -StopOnFirstError
Indicates that the operation should stop on first error.
```yaml
Type: Boolean
Parameter Sets: REFRESH, RECOMPOSE, REBALANCE, PUSH_IMAGE
Aliases:
Required: False
Position: Named
Default value: True
Accept pipeline input: False
Accept wildcard characters: False
```
### -Machines
The machine names to recompose.
These must be associated with the pool.
```yaml
Type: String[]
Parameter Sets: REFRESH, RECOMPOSE, REBALANCE
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -ParentVM
New base image VM for the desktop.
This must be in the same datacenter as the base image of the desktop.
```yaml
Type: String
Parameter Sets: RECOMPOSE
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
```yaml
Type: String
Parameter Sets: PUSH_IMAGE
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -SnapshotVM
Name of the snapshot used in pool deployment.
```yaml
Type: String
Parameter Sets: RECOMPOSE
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
```yaml
Type: String
Parameter Sets: PUSH_IMAGE
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Vcenter
Virtual Center server-address (IP or FQDN) of the given pool.
This should be same as provided to the Connection Server while adding the vCenter server.
```yaml
Type: String
Parameter Sets: RECOMPOSE, PUSH_IMAGE
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -HvServer
View API service object of Connect-HVServer cmdlet.
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
### None
## NOTES
| | |
|-|-|
| Author | Praveen Mathamsetty. |
| Author email | pmathamsetty@vmware.com |
| Version | 1.1 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.0.2, 7.1.0 |
| PowerCLI Version | PowerCLI 6.5, PowerCLI 6.5.1 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -0,0 +1,110 @@
---
external help file: VMware.HV.Helper-help.xml
Module Name: VMware.HV.Helper
online version:
schema: 2.0.0
---
# Unregister-HVPod
## SYNOPSIS
Removes a pod from a podfederation
## SYNTAX
```
Unregister-HVPod [-PodName] <String> [[-force] <Boolean>] [[-HvServer] <Object>] [<CommonParameters>]
```
## DESCRIPTION
Starts the uninitialisation of a Horizon View Pod Federation.
It does NOT remove a pod from a federation.
## EXAMPLES
### EXAMPLE 1
```
Unregister-hvpod -podname PODNAME
```
Checks if you are connected to the pod and gracefully unregisters it from the podfedaration
### EXAMPLE 2
```
Unregister-hvpod -podname PODNAME -force
```
Checks if you are connected to the pod and gracefully unregisters it from the podfedaration
## PARAMETERS
### -PodName
The name of the pod to be removed.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -force
This can be used to forcefully remove a pod from the pod federation.
This can only be done while connected to one of the other pods in the federation
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -HvServer
Reference to Horizon View Server to query the virtual machines from.
If the value is not passed or null then
first element from global:DefaultHVServers would be considered in-place of hvServer
```yaml
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
## NOTES
| | |
|-|-|
| Author | Wouter Kursten |
| Author email | wouter@retouw.nl |
| Version | 1.0 |
===Tested Against Environment====
| | |
|-|-|
| Horizon View Server Version | 7.3.2,7.4 |
| PowerCLI Version | PowerCLI 6.5, PowerCLI 6.5.1 |
| PowerShell Version | 5.0 |
## RELATED LINKS

View File

@@ -120,10 +120,12 @@ Function Get-NSXTSegment {
$network = $subnets.network
$gateway = $subnets.gateway_address
$dhcpRange = $subnets.dhcp_ranges
$type = $segment.type
$tmp = [pscustomobject] @{
Name = $segment.display_name;
ID = $segment.Id;
TYPE = $type;
Network = $network;
Gateway = $gateway;
DHCPRange = $dhcpRange;
@@ -156,6 +158,8 @@ Function New-NSXTSegment {
New-NSXTSegment -Name "sddc-cgw-network-4" -Gateway "192.168.4.1/24" -DHCP -DHCPRange "192.168.4.2-192.168.4.254" -DomainName 'vmc.local'
.EXAMPLE
New-NSXTSegment -Name "sddc-cgw-network-5" -Gateway "192.168.5.1/24"
.EXAMPLE
New-NSXTSegment -Name "sddc-cgw-network-5" -Gateway "192.168.5.1/24" -Disconnected
#>
Param (
[Parameter(Mandatory=$True)]$Name,
@@ -163,6 +167,7 @@ Function New-NSXTSegment {
[Parameter(Mandatory=$False)]$DHCPRange,
[Parameter(Mandatory=$False)]$DomainName,
[Switch]$DHCP,
[Switch]$Disconnected,
[Switch]$Troubleshoot
)
@@ -178,9 +183,21 @@ Function New-NSXTSegment {
}
}
$payload = @{
display_name = $Name;
subnets = @($subnets)
if($Disconnected) {
$payload = @{
display_name = $Name;
subnets = @($subnets)
advanced_config = @{
local_egress = "False"
connectivity = "OFF";
}
type = "DISCONNECTED";
}
} else {
$payload = @{
display_name = $Name;
subnets = @($subnets)
}
}
if($DomainName) {
@@ -221,6 +238,98 @@ Function New-NSXTSegment {
}
}
Function Set-NSXTSegment {
<#
.NOTES
===========================================================================
Created by: William Lam
Date: 03/04/2018
Organization: VMware
Blog: http://www.virtuallyghetto.com
Twitter: @lamw
===========================================================================
.SYNOPSIS
Set a NSX-T Segment (Logical Networks) to either connected or disconnected
.DESCRIPTION
This cmdlet set an NSX-T Segment (Logical Networks) to either connected or disconnected
.EXAMPLE
New-NSXTSegment -Name "sddc-cgw-network-4" -Disconnected
.EXAMPLE
New-NSXTSegment -Name "sddc-cgw-network-4" -Connected
#>
Param (
[Parameter(Mandatory=$True)]$Name,
[Switch]$Disconnected,
[Switch]$Connected,
[Switch]$Troubleshoot
)
If (-Not $global:nsxtProxyConnection) { Write-error "No NSX-T Proxy Connection found, please use Connect-NSXTProxy" } Else {
$SegmentId = (Get-NSXTSegment -Name $Name).Id
if($Disconnected) {
$type = "DISCONNECTED"
$connectivity = "OFF"
$localEgress = "False"
$gateway = (Get-NSXTSegment -Name $Name).Gateway
}
If($Connected) {
$type = "ROUTED"
$connectivity = "ON"
$localEgress = "True"
$gateway = (Get-NSXTSegment -Name $Name).Gateway
}
$subnets = @{
gateway_address = $gateway;
}
$payload = @{
advanced_config = @{
local_egress = $localEgress;
connectivity = $connectivity;
}
type = $type;
subnets = @($subnets)
}
$body = $payload | ConvertTo-Json -depth 4
$method = "PATCH"
$aegmentsURL = $global:nsxtProxyConnection.Server + "/policy/api/v1/infra/tier-1s/cgw/segments/$SegmentId"
if($Troubleshoot) {
Write-Host -ForegroundColor cyan "`n[DEBUG] - $method`n$newSegmentsURL`n"
Write-Host -ForegroundColor cyan "[DEBUG]`n$body`n"
}
try {
if($PSVersionTable.PSEdition -eq "Core") {
$requests = Invoke-WebRequest -Uri $aegmentsURL -Body $body -Method $method -Headers $global:nsxtProxyConnection.headers -SkipCertificateCheck
} else {
$requests = Invoke-WebRequest -Uri $aegmentsURL -Body $body -Method $method -Headers $global:nsxtProxyConnection.headers
}
} catch {
if($_.Exception.Response.StatusCode -eq "Unauthorized") {
Write-Host -ForegroundColor Red "`nThe NSX-T Proxy session is no longer valid, please re-run the Connect-NSXTProxy cmdlet to retrieve a new token`n"
break
} else {
Write-Error "Error in updating NSX-T Segment connectivity"
Write-Error "`n($_.Exception.Message)`n"
break
}
}
if($requests.StatusCode -eq 200) {
Write-Host "Successfully updated NSX-T Segment $Name"
($requests.Content | ConvertFrom-Json) | select display_name, id
}
}
}
Function Remove-NSXTSegment {
<#
.NOTES

View File

@@ -0,0 +1,90 @@
#
# Module manifest for module 'VMware.HCX'
#
# Generated by: wlam@vmware.com
#
# Generated on: 09/11/18
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'VMware.WorkspaceOneAccess.psm1'
# Version number of this module.
ModuleVersion = '1.0.0'
# Supported PSEditions
# CompatiblePSEditions = @()
# ID used to uniquely identify this module
GUID = 'VMware.WorkspaceOneAccess'
# Author of this module
Author = 'William Lam'
# Company or vendor of this module
CompanyName = 'VMware'
# Copyright statement for this module
Copyright = '(c) 2020 VMware. All rights reserved.'
# Description of the functionality provided by this module
Description = 'PowerShell Module for Workspace One Access'
# Minimum version of the Windows PowerShell engine required by this module
PowerShellVersion = '6.0'
# Functions 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 functions to export.
FunctionsToExport = 'Connect-WorkspaceOneAccess','Get-WSDirectory','Get-WSIdentityProvider','Get-WSOrgNetwork','New-WS3rdPartyIdentityProvider','New-WSJitDirectory','Remove-WS3rdPartyIdentityProvider','Remove-WSDirectory'
# Cmdlets 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 cmdlets to export.
CmdletsToExport = @()
# Variables to export from this module
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 = @()
# DSC resources to export from this module
# DscResourcesToExport = @()
# List of all modules packaged with this module
# ModuleList = @()
# List of all files packaged with this module
# FileList = @()
# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
PrivateData = @{
PSData = @{
# Tags applied to this module. These help with module discovery in online galleries.
# Tags = @()
# A URL to the license for this module.
# LicenseUri = ''
# A URL to the main website for this project.
# ProjectUri = ''
# A URL to an icon representing this module.
# IconUri = ''
# ReleaseNotes of this module
# ReleaseNotes = ''
} # End of PSData hashtable
} # End of PrivateData hashtable
# HelpInfo URI of this module
# HelpInfoURI = ''
# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
# DefaultCommandPrefix = ''
}

View File

@@ -0,0 +1,572 @@
Function Connect-WorkspaceOneAccess {
<#
.NOTES
===========================================================================
Created by: William Lam
Date: 02/04/2020
Organization: VMware
Blog: http://www.virtuallyghetto.com
Twitter: @lamw
===========================================================================
.SYNOPSIS
Log into Workspace One Access (formally VMware Identity Manager)
.DESCRIPTION
This cmdlet creates $global:workspaceOneAccessConnection object containing valid refresh token to vIDM/Workspace One Access
.EXAMPLE
Connect-WorkspaceOneAccess -Tenant $Tenant -ClientId $ClientId -ClientSecret $ClientSecret
#>
Param (
[Parameter(Mandatory=$true)][String]$Tenant,
[Parameter(Mandatory=$true)][String]$ClientId,
[Parameter(Mandatory=$true)][String]$ClientSecret,
[Switch]$Troubleshoot
)
$text = "${ClientId}:${ClientSecret}"
$base64 = [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($text))
$headers = @{
"Authorization"="Basic $base64";
"Content-Type"="application/x-www-form-urlencoded";
}
$oauthUrl = "https://${Tenant}/SAAS/auth/oauthtoken?grant_type=client_credentials"
$method = "POST"
if($Troubleshoot) {
Write-Host -ForegroundColor cyan "`n[DEBUG] - $method`n$oauthUrl`n"
}
$results = Invoke-WebRequest -Uri $oauthUrl -Method $method -Headers $headers
if($results.StatusCode -ne 200) {
Write-Host -ForegroundColor Red "Failed to retrieve Access Token, please ensure your ClientId and Client Secret is valid"
break
}
$accessToken = ($results.Content | ConvertFrom-Json).access_token
$authHeader = @{
"Authorization"="Bearer $accessToken";
}
$global:workspaceOneAccessConnection = new-object PSObject -Property @{
'Server' = "https://$Tenant"
'headers' = $authHeader
}
$global:workspaceOneAccessConnection
}
Function Get-WSDirectory {
<#
.NOTES
===========================================================================
Created by: William Lam
Date: 02/04/2020
Organization: VMware
Blog: http://www.virtuallyghetto.com
Twitter: @lamw
===========================================================================
.SYNOPSIS
Retrieves all Directories within Workspace One Access
.DESCRIPTION
This cmdlet retrieves all Directories within Workspace One Access
.EXAMPLE
Get-WSDirectory
.EXAMPLE
Get-WSDirectory -Name <DIRECTORY>
#>
Param (
[Parameter(Mandatory=$false)][String]$Name,
[Switch]$Troubleshoot
)
$directoryHeaders = @{
"Accept"="application/vnd.vmware.horizon.manager.connector.management.directory.list+json";
"Content-Type"="application/vnd.vmware.horizon.manager.connector.management.directory.list+json";
"Authorization"=$global:workspaceOneAccessConnection.headers.Authorization;
}
$directoryUrl = $global:workspaceOneAccessConnection.Server + "/SAAS/jersey/manager/api/connectormanagement/directoryconfigs?includeJitDirectories=true"
$method = "GET"
if($Troubleshoot) {
Write-Host -ForegroundColor cyan "`n[DEBUG] - $method`n$directoryUrl`n"
}
try {
if($PSVersionTable.PSEdition -eq "Core") {
$results = Invoke-Webrequest -Uri $directoryUrl -Method $method -UseBasicParsing -Headers $directoryHeaders -SkipCertificateCheck
} else {
$results = Invoke-Webrequest -Uri $directoryUrl -Method $method -UseBasicParsing -Headers $directoryHeaders
}
} catch {
if($_.Exception.Response.StatusCode -eq "Unauthorized") {
Write-Host -ForegroundColor Red "`nThe Workspace One session is no longer valid, please re-run the Connect-WorkspaceOne cmdlet to retrieve a new token`n"
break
} else {
Write-Error "Error in retrieving Directory"
Write-Error "`n($_.Exception.Message)`n"
break
}
}
if($results.StatusCode -eq 200) {
$directories = ([System.Text.Encoding]::ASCII.GetString($results.Content) | ConvertFrom-Json).items
if ($PSBoundParameters.ContainsKey("Name")){
$directories = $directories | where {$_.name -eq $Name}
}
$directories
}
}
Function Remove-WSDirectory {
<#
.NOTES
===========================================================================
Created by: William Lam
Date: 02/04/2020
Organization: VMware
Blog: http://www.virtuallyghetto.com
Twitter: @lamw
===========================================================================
.SYNOPSIS
Deletes a specific Workspace One Access Directory
.DESCRIPTION
This cmdlet deletes a specific directory within Workspace One Access
.EXAMPLE
Remove-WSDirectory -Name <DIRECTORY>
#>
Param (
[Parameter(Mandatory=$false)][String]$Name,
[Switch]$Troubleshoot
)
$directory = Get-WSDirectory -Name $Name
if($directory) {
$directoryHeaders = @{
"Authorization"=$global:workspaceOneAccessConnection.headers.Authorization;
}
$directoryUrl = $global:workspaceOneAccessConnection.Server + "/SAAS/jersey/manager/api/connectormanagement/directoryconfigs/$($directory.directoryId)?asyncDelete=true"
$method = "DELETE"
if($Troubleshoot) {
Write-Host -ForegroundColor cyan "`n[DEBUG] - $method`n$directoryUrl`n"
}
try {
if($PSVersionTable.PSEdition -eq "Core") {
$results = Invoke-Webrequest -Uri $directoryUrl -Method $method -UseBasicParsing -Headers $directoryHeaders -SkipCertificateCheck
} else {
$results = Invoke-Webrequest -Uri $directoryUrl -Method $method -UseBasicParsing -Headers $directoryHeaders
}
} catch {
if($_.Exception.Response.StatusCode -eq "Unauthorized") {
Write-Host -ForegroundColor Red "`nThe Workspace One session is no longer valid, please re-run the Connect-WorkspaceOne cmdlet to retrieve a new token`n"
break
} else {
Write-Error "Error in deleting new Directory"
Write-Error "`n($_.Exception.Message)`n"
break
}
}
if($results.StatusCode -eq 200) {
Write-Host "`nSuccessfully deleted Directory $Name ..."
}
} else {
Write-Host "`nUnable to find Directory $Name"
}
}
Function New-WSJitDirectory {
<#
.NOTES
===========================================================================
Created by: William Lam
Date: 02/04/2020
Organization: VMware
Blog: http://www.virtuallyghetto.com
Twitter: @lamw
===========================================================================
.SYNOPSIS
Creates a Just-in-Time (Jit) Directory in Workspace One Access
.DESCRIPTION
This cmdlet creates a Just-in-Time (Jit) Directory in Workspace One Access
.EXAMPLE
New-WSJitDirectory -Name <DIRECTORY>
#>
Param (
[Parameter(Mandatory=$false)][String]$Name,
[Parameter(Mandatory=$false)][String]$Domain,
[Switch]$Troubleshoot
)
$directoryHeaders = @{
"Accept"="application/vnd.vmware.horizon.manager.connector.management.directory.jit+json";
"Content-Type"="application/vnd.vmware.horizon.manager.connector.management.directory.jit+json"
"Authorization"=$global:workspaceOneAccessConnection.headers.Authorization;
}
$directoryUrl = $global:workspaceOneAccessConnection.Server + "/SAAS/jersey/manager/api/connectormanagement/directoryconfigs"
$method = "POST"
$json = @{
name = $Name
domains = @($Domain)
}
$body = $json | ConvertTo-Json
if($Troubleshoot) {
Write-Host -ForegroundColor cyan "`n[DEBUG] - $method`n$directoryUrl`n"
Write-Host -ForegroundColor cyan "[DEBUG]`n$body`n"
}
try {
if($PSVersionTable.PSEdition -eq "Core") {
$results = Invoke-Webrequest -Uri $directoryUrl -Method $method -UseBasicParsing -Headers $directoryHeaders -Body $body -SkipCertificateCheck
} else {
$results = Invoke-Webrequest -Uri $directoryUrl -Method $method -UseBasicParsing -Headers $directoryHeaders -Body $body
}
} catch {
if($_.Exception.Response.StatusCode -eq "Unauthorized") {
Write-Host -ForegroundColor Red "`nThe Workspace One session is no longer valid, please re-run the Connect-WorkspaceOne cmdlet to retrieve a new token`n"
break
} else {
Write-Error "Error in creating new Jit Directory"
Write-Error "`n($_.Exception.Message)`n"
break
}
}
if($results.StatusCode -eq 201) {
Write-Host "`nSuccessfully created Jit Directory $Name ..."
([System.Text.Encoding]::ASCII.GetString($results.Content) | ConvertFrom-Json)
}
}
Function Get-WSOrgNetwork {
<#
.NOTES
===========================================================================
Created by: William Lam
Date: 02/04/2020
Organization: VMware
Blog: http://www.virtuallyghetto.com
Twitter: @lamw
===========================================================================
.SYNOPSIS
Retreives all Org Networks within Workspace One Access
.DESCRIPTION
This cmdlet retreives all Org Networks within Workspace One Access
.EXAMPLE
Get-WSOrgNetwork
.EXAMPLE
Get-WSOrgNetwork -Name <NETWORK>
#>
Param (
[Parameter(Mandatory=$false)][String]$Name,
[Switch]$Troubleshoot
)
$listOrgNetworkHeaders = @{
"Accept"="application/vnd.vmware.horizon.manager.orgnetwork.list+json";
"Content-Type"="application/vnd.vmware.horizon.manager.orgnetwork.list+json"
"Authorization"=$global:workspaceOneAccessConnection.headers.Authorization;
}
$orgNetworkUrl = $global:workspaceOneAccessConnection.Server + "/SAAS/jersey/manager/api/orgnetworks"
$method = "GET"
if($Troubleshoot) {
Write-Host -ForegroundColor cyan "`n[DEBUG] - $method`n$orgNetworkUrl`n"
}
try {
if($PSVersionTable.PSEdition -eq "Core") {
$results = Invoke-Webrequest -Uri $orgNetworkUrl -Method $method -UseBasicParsing -Headers $listOrgNetworkHeaders -SkipCertificateCheck
} else {
$results = Invoke-Webrequest -Uri $orgNetworkUrl -Method $method -UseBasicParsing -Headers $listOrgNetworkHeaders
}
} catch {
if($_.Exception.Response.StatusCode -eq "Unauthorized") {
Write-Host -ForegroundColor Red "`nThe Workspace One session is no longer valid, please re-run the Connect-WorkspaceOne cmdlet to retrieve a new token`n"
break
} else {
Write-Error "Error in creating new Directory"
Write-Error "`n($_.Exception.Message)`n"
break
}
}
if($results.StatusCode -eq 200) {
$networks = ([System.Text.Encoding]::ASCII.GetString($results.Content) | ConvertFrom-Json).items
if ($PSBoundParameters.ContainsKey("Name")){
$networks = $networks | where {$_.name -eq $Name}
}
$networks
}
}
Function Get-WSIdentityProvider {
<#
.NOTES
===========================================================================
Created by: William Lam
Date: 02/04/2020
Organization: VMware
Blog: http://www.virtuallyghetto.com
Twitter: @lamw
===========================================================================
.SYNOPSIS
Retreives all Identity Providers within Workspace One Access
.DESCRIPTION
This cmdlet retreives all Identity Providers within Workspace One Access
.EXAMPLE
Get-WSIdentityProvider
.EXAMPLE
Get-WSIdentityProvider -Name <PROVIDER>
#>
Param (
[Parameter(Mandatory=$false)][String]$Name,
[Switch]$Troubleshoot
)
$listOrgNetworkHeaders = @{
"Accept"="application/vnd.vmware.horizon.manager.identityprovider.summary.list+json";
"Content-Type"="application/vnd.vmware.horizon.manager.identityprovider.summary.list+json"
"Authorization"=$global:workspaceOneAccessConnection.headers.Authorization;
}
$providerUrl = $global:workspaceOneAccessConnection.Server + "/SAAS/jersey/manager/api/identityProviders?onlyEnabledAdapters=true"
$method = "GET"
if($Troubleshoot) {
Write-Host -ForegroundColor cyan "`n[DEBUG] - $method`n$providerUrl`n"
}
try {
if($PSVersionTable.PSEdition -eq "Core") {
$results = Invoke-Webrequest -Uri $providerUrl -Method $method -UseBasicParsing -Headers $listOrgNetworkHeaders -SkipCertificateCheck
} else {
$results = Invoke-Webrequest -Uri $providerUrl -Method $method -UseBasicParsing -Headers $listOrgNetworkHeaders
}
} catch {
if($_.Exception.Response.StatusCode -eq "Unauthorized") {
Write-Host -ForegroundColor Red "`nThe Workspace One session is no longer valid, please re-run the Connect-WorkspaceOne cmdlet to retrieve a new token`n"
break
} else {
Write-Error "Error in retrieving Directory"
Write-Error "`n($_.Exception.Message)`n"
break
}
}
if($results.StatusCode -eq 200) {
$providers = ([System.Text.Encoding]::ASCII.GetString($results.Content) | ConvertFrom-Json).items
if ($PSBoundParameters.ContainsKey("Name")){
$providers = $providers | where {$_.name -eq $Name}
}
$providers
}
}
Function New-WS3rdPartyIdentityProvider {
<#
.NOTES
===========================================================================
Created by: William Lam
Date: 02/04/2020
Organization: VMware
Blog: http://www.virtuallyghetto.com
Twitter: @lamw
===========================================================================
.SYNOPSIS
Creates a new 3rd Party Identity Providers within Workspace One Access
.DESCRIPTION
This cmdlet creates a new 3rd party Identity Provider within Workspace One Access
.EXAMPLE
New-WS3rdPartyIdentityProvider
.EXAMPLE
New-WS3rdPartyIdentityProvider -Name "AWS Directory Service" -DirectoryName "VMware" -NetworkName "ALL RANGES" -MetadataFile FederationMetadata.xml
#>
Param (
[Parameter(Mandatory=$true)][String]$Name,
[Parameter(Mandatory=$true)][String]$DirectoryName,
[Parameter(Mandatory=$true)][String]$NetworkName,
[Parameter(Mandatory=$true)][String]$MetadataFile,
[Switch]$Troubleshoot
)
$idpDirectory = Get-WSDirectory -Name $DirectoryName
$network = Get-WSOrgNetwork -Name $NetworkName
$metadataXML = Get-Content -Raw $MetadataFile
$idpBody = [pscustomobject] @{
"authMethods" = @(
@{
"authMethodId" = 1;
"authScore" = 1;
"defaultMethod" = $false;
"authMethodOrder" = 0;
"authMethodName" = "adfsPassword";
"samlAuthnContext" = "urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport";
}
);
"identityProviderType" = "MANUAL";
"nameIdFormatType" = "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress";
"identityFromSamlAttribute" = $false;
"friendlyName" = $Name;
"metaData" = "$metadataXML";
"preferredBinding" = "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST";
"jitEnabled" = "true";
"saml2IdPSLOConfiguration" = @{
"sendSLORequest" = $true;
}
"directoryConfigurations" = @(
[pscustomobject] @{
"type" = $idpDirectory.type;
"name" = $idpDirectory.name;
"directoryId" = $idpDirectory.directoryId;
"userstoreId" = $idpDirectory.userstoreId;
"countDomains" = $idpDirectory.countDomains;
"deleteInProgress" = $false;
"migratedToEnterpriseService" = $false;
"syncConfigurationEnabled" = $false;
}
);
"nameIdFormatAttributeMappings" = [pscustomobject] @{
"urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress" = "emails";
"urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" = "id";
"urn:oasis:names:tc:SAML:2.0:nameid-format:transient" = "userName";
};
"orgNetworks" = @(
[pscustomobject] @{
"name" = $network.name;
"ipAddressRanges" = $network.ipAddressRanges;
"uuid" = $network.uuid;
"description" = $network.description;
"defaultNetwork" = $network.defaultNetwork;
}
);
"description" = "";
"nIDPStatus" = 1;
"idpUrl" = $null;
"name" = $Name;
}
$idpHeaders = @{
"Accept"="application/vnd.vmware.horizon.manager.external.identityprovider+json";
"Content-Type"="application/vnd.vmware.horizon.manager.external.identityprovider+json";
"Authorization"=$global:workspaceOneAccessConnection.headers.Authorization;
}
$body = $idpBody | ConvertTo-Json -Depth 10
$identityProviderUrl = $global:workspaceOneAccessConnection.Server + "/SAAS/jersey/manager/api/identityProviders"
$method = "POST"
if($Troubleshoot) {
Write-Host -ForegroundColor cyan "`n[DEBUG] - $method`n$directoryUrl`n"
Write-Host -ForegroundColor cyan "[DEBUG]`n$body`n"
}
try {
if($PSVersionTable.PSEdition -eq "Core") {
$results = Invoke-Webrequest -Uri $identityProviderUrl -Method $method -UseBasicParsing -Headers $idpHeaders -Body $body -SkipCertificateCheck
} else {
$results = Invoke-Webrequest -Uri $identityProviderUrl -Method $method -UseBasicParsing -Headers $idpHeaders -Body $body
}
} catch {
if($_.Exception.Response.StatusCode -eq "Unauthorized") {
Write-Host -ForegroundColor Red "`nThe Workspace One session is no longer valid, please re-run the Connect-WorkspaceOne cmdlet to retrieve a new token`n"
break
} else {
Write-Error "Error in creating new Identity Provider"
Write-Error "`n($_.Exception.Message)`n"
break
}
}
if($results.StatusCode -eq 201) {
Write-Host "`nSuccessfully created new Identity Provider $Name ..."
([System.Text.Encoding]::ASCII.GetString($results.Content) | ConvertFrom-Json) | Select Name, Id
}
}
Function Remove-WS3rdPartyIdentityProvider {
<#
.NOTES
===========================================================================
Created by: William Lam
Date: 02/04/2020
Organization: VMware
Blog: http://www.virtuallyghetto.com
Twitter: @lamw
===========================================================================
.SYNOPSIS
Deletes a specific 3rd Party Identity Provider within Workspace One Access
.DESCRIPTION
This cmdlet deletes a specific 3rd Party Identity Provider within Workspace One Access
.EXAMPLE
Remove-WS3rdPartyIdentityProvider -Name <IDP>
#>
Param (
[Parameter(Mandatory=$true)][String]$Name,
[Switch]$Troubleshoot
)
$idp = Get-WSIdentityProvider -Name $Name
if($idp) {
$identityProviderHeaders = @{
"Authorization"=$global:workspaceOneAccessConnection.headers.Authorization;
}
$identityProviderURL = $global:workspaceOneAccessConnection.Server + "/SAAS/jersey/manager/api/identityProviders/$($idp.id)"
$method = "DELETE"
if($Troubleshoot) {
Write-Host -ForegroundColor cyan "`n[DEBUG] - $method`n$identityProviderURL`n"
}
try {
if($PSVersionTable.PSEdition -eq "Core") {
$results = Invoke-Webrequest -Uri $identityProviderURL -Method $method -UseBasicParsing -Headers $identityProviderHeaders -SkipCertificateCheck
} else {
$results = Invoke-Webrequest -Uri $identityProviderURL -Method $method -UseBasicParsing -Headers $identityProviderHeaders
}
} catch {
if($_.Exception.Response.StatusCode -eq "Unauthorized") {
Write-Host -ForegroundColor Red "`nThe Workspace One session is no longer valid, please re-run the Connect-WorkspaceOne cmdlet to retrieve a new token`n"
break
} else {
Write-Error "Error in deleting Identity Provider"
Write-Error "`n($_.Exception.Message)`n"
break
}
}
if($results.StatusCode -eq 200) {
Write-Host "`nSuccessfully deleted Identity Provider $Name ..."
}
} else {
Write-Host "`nUnable to find Identity Provider $Name"
}
}

330
Modules/VyOS/VyOS.psm1 Normal file
View File

@@ -0,0 +1,330 @@
Function Set-VMKeystrokes {
param(
[Parameter(Mandatory=$true)][String]$VMName,
[Parameter(Mandatory=$true)][String]$StringInput,
[Parameter(Mandatory=$false)][Boolean]$ReturnCarriage,
[Parameter(Mandatory=$false)][Boolean]$DebugOn
)
# Map subset of USB HID keyboard scancodes
# https://gist.github.com/MightyPork/6da26e382a7ad91b5496ee55fdc73db2
$hidCharacterMap = @{
"a"="0x04";
"b"="0x05";
"c"="0x06";
"d"="0x07";
"e"="0x08";
"f"="0x09";
"g"="0x0a";
"h"="0x0b";
"i"="0x0c";
"j"="0x0d";
"k"="0x0e";
"l"="0x0f";
"m"="0x10";
"n"="0x11";
"o"="0x12";
"p"="0x13";
"q"="0x14";
"r"="0x15";
"s"="0x16";
"t"="0x17";
"u"="0x18";
"v"="0x19";
"w"="0x1a";
"x"="0x1b";
"y"="0x1c";
"z"="0x1d";
"1"="0x1e";
"2"="0x1f";
"3"="0x20";
"4"="0x21";
"5"="0x22";
"6"="0x23";
"7"="0x24";
"8"="0x25";
"9"="0x26";
"0"="0x27";
"!"="0x1e";
"@"="0x1f";
"#"="0x20";
"$"="0x21";
"%"="0x22";
"^"="0x23";
"&"="0x24";
"*"="0x25";
"("="0x26";
")"="0x27";
"_"="0x2d";
"+"="0x2e";
"{"="0x2f";
"}"="0x30";
"|"="0x31";
":"="0x33";
"`""="0x34";
"~"="0x35";
"<"="0x36";
">"="0x37";
"?"="0x38";
"-"="0x2d";
"="="0x2e";
"["="0x2f";
"]"="0x30";
"\"="0x31";
"`;"="0x33";
"`'"="0x34";
","="0x36";
"."="0x37";
"/"="0x38";
" "="0x2c";
}
$vm = Get-View -ViewType VirtualMachine -Filter @{"Name"="^$($VMName)$"}
# Verify we have a VM or fail
if(!$vm) {
Write-host "Unable to find VM $VMName"
return
}
$hidCodesEvents = @()
foreach($character in $StringInput.ToCharArray()) {
# Check to see if we've mapped the character to HID code
if($hidCharacterMap.ContainsKey([string]$character)) {
$hidCode = $hidCharacterMap[[string]$character]
$tmp = New-Object VMware.Vim.UsbScanCodeSpecKeyEvent
# Add leftShift modifer for capital letters and/or special characters
if( ($character -cmatch "[A-Z]") -or ($character -match "[!|@|#|$|%|^|&|(|)|_|+|{|}|||:|~|<|>|?|*]") ) {
$modifer = New-Object Vmware.Vim.UsbScanCodeSpecModifierType
$modifer.LeftShift = $true
$tmp.Modifiers = $modifer
}
# Convert to expected HID code format
$hidCodeHexToInt = [Convert]::ToInt64($hidCode,"16")
$hidCodeValue = ($hidCodeHexToInt -shl 16) -bor 0007
$tmp.UsbHidCode = $hidCodeValue
$hidCodesEvents+=$tmp
if($DebugOn) {
Write-Host "Character: $character -> HIDCode: $hidCode -> HIDCodeValue: $hidCodeValue"
}
} else {
Write-Host "The following character `"$character`" has not been mapped, you will need to manually process this character"
break
}
}
# Add return carriage to the end of the string input (useful for logins or executing commands)
if($ReturnCarriage) {
# Convert return carriage to HID code format
$hidCodeHexToInt = [Convert]::ToInt64("0x28","16")
$hidCodeValue = ($hidCodeHexToInt -shl 16) + 7
$tmp = New-Object VMware.Vim.UsbScanCodeSpecKeyEvent
$tmp.UsbHidCode = $hidCodeValue
$hidCodesEvents+=$tmp
}
# Call API to send keystrokes to VM
$spec = New-Object Vmware.Vim.UsbScanCodeSpec
$spec.KeyEvents = $hidCodesEvents
Write-Host "Sending `'$StringInput`' ...`n"
$results = $vm.PutUsbScanCodes($spec)
}
Function New-VyOSInstallation {
<#
.NOTES
===========================================================================
Created by: William Lam
Organization: VMware
Blog: www.virtuallyghetto.com
Twitter: @lamw
===========================================================================
.DESCRIPTION
This function automates the installation and configuration of VyOS from ISO
.PARAMETER VMName
The name of the VyOS VM
.PARAMETER ManagementPassword
The password to configure for the vyos user
.EXAMPLE
New-VyOSInstallation -VMName VyOS-Router -ManagementPassword VMware1!
#>
param(
[Parameter(Mandatory=$true)][String]$VMName,
[Parameter(Mandatory=$true)][String]$ManagementPassword
)
# Login to console and install VyOS before starting configuration
Set-VMKeystrokes -VMName $VMName -StringInput "vyos" -ReturnCarriage $true
Set-VMKeystrokes -VMName $VMName -StringInput "vyos" -ReturnCarriage $true
Set-VMKeystrokes -VMName $VMName -StringInput "install image" -ReturnCarriage $true
Set-VMKeystrokes -VMName $VMName -StringInput "yes" -ReturnCarriage $true
Start-Sleep -Seconds 5
Set-VMKeystrokes -VMName $VMName -StringInput "Auto" -ReturnCarriage $true
Start-Sleep -Seconds 1
Set-VMKeystrokes -VMName $VMName -StringInput "sda" -ReturnCarriage $true
Start-Sleep -Seconds 5
Set-VMKeystrokes -VMName $VMName -StringInput "yes" -ReturnCarriage $true
Start-Sleep -Seconds 5
Set-VMKeystrokes -VMName $VMName -StringInput " " -ReturnCarriage $true
Start-Sleep -Seconds 10
Set-VMKeystrokes -VMName $VMName -StringInput "vyos-router" -ReturnCarriage $true
Start-Sleep -Seconds 5
Set-VMKeystrokes -VMName $VMName -StringInput " " -ReturnCarriage $true
Start-Sleep -Seconds 10
Set-VMKeystrokes -VMName $VMName -StringInput "$ManagementPassword" -ReturnCarriage $true
Start-Sleep -Seconds 5
Set-VMKeystrokes -VMName $VMName -StringInput "$ManagementPassword" -ReturnCarriage $true
Start-Sleep -Seconds 5
Set-VMKeystrokes -VMName $VMName -StringInput "sda" -ReturnCarriage $true
Start-Sleep -Seconds 5
Set-VMKeystrokes -VMName $VMName -StringInput "reboot" -ReturnCarriage $true
Start-Sleep -Seconds 5
Set-VMKeystrokes -VMName $VMName -StringInput "y" -ReturnCarriage $true
Start-Sleep -Seconds 5
Get-VM $VMName | Get-CDDrive | Set-CDDrive -Connected $false -Confirm:$false -ErrorAction Ignore -WarningAction Ignore | Out-Null
Write-Host -ForegroundColor Green "VyOS has been installed, VM will reboot for changes to go into effect"
}
Function New-VyOSConfiguration {
<#
.NOTES
===========================================================================
Created by: William Lam
Organization: VMware
Blog: www.virtuallyghetto.com
Twitter: @lamw
===========================================================================
.DESCRIPTION
This function automates the installation and configuration of VyOS from ISO
.PARAMETER VMName
The name of the VyOS VM
.PARAMETER ManagementPassword
The password to configure for the vyos user
.PARAMETER ConfigFile
The path to VyOS configuration file
.PARAMETER ManagementAddress
The IP Address of the OUTSIDE Interface (eth0)
.PARAMETER ManagementGateway
The Gateway Addrss of the OUTSIDE Interface (eth0)
.PARAMETER ManagementDNSDomain
The DNS Domain on the WAN network
.PARAMETER ManagementDNSServer
The DNS Server on the WAN Network
.PARAMETER ManagementJumpHostIP
The IP Address of Windows Jumphost that can be used to RDP into various VLANs
.EXAMPLE
New-VyOSConfiguration -VMName VyOS-Router -ConfigFile vyos.template -ManagementAddress 192.168.30.156/24 -ManagementGateway 192.168.30.1 -ManagementDNSDomain primp-industries.com -ManagementDNSServer 192.168.30.2 -ManagementJumpHostIP 192.168.30.199 -ManagementPassword VMware1!
#>
param(
[Parameter(Mandatory=$true)][String]$VMName,
[Parameter(Mandatory=$true)][String]$ConfigFile,
[Parameter(Mandatory=$true)][String]$ManagementAddress,
[Parameter(Mandatory=$true)][String]$ManagementGateway,
[Parameter(Mandatory=$true)][String]$ManagementDNSDomain,
[Parameter(Mandatory=$true)][String]$ManagementDNSServer,
[Parameter(Mandatory=$true)][String]$ManagementJumpHostIP,
[Parameter(Mandatory=$true)][String]$ManagementPassword
)
# Login to console and install VyOS before starting configuration
Set-VMKeystrokes -VMName $VMName -StringInput "vyos" -ReturnCarriage $true
Set-VMKeystrokes -VMName $VMName -StringInput "$ManagementPassword" -ReturnCarriage $true
foreach ($cmd in Get-Content -Path $ConfigFile | Where-Object { $_.Trim() -ne '' }) {
if($cmd.Contains('[MANAGEMENT_ADDRESS]')) {
$cmd = $cmd.replace('[MANAGEMENT_ADDRESS]',$ManagementAddress)
if($Troubleshoot) {
$cmd
} else {
Set-VMKeystrokes -VMName $VMName -StringInput $cmd -ReturnCarriage $true
Start-Sleep -Seconds 1
}
} elseif($cmd.Contains('[MANAGEMENT_IP]')) {
$ManagementAddress = $ManagementAddress.substring(0,$ManagementAddress.IndexOf('/'))
$cmd = $cmd.replace('[MANAGEMENT_IP]',$ManagementAddress)
if($Troubleshoot) {
$cmd
} else {
Set-VMKeystrokes -VMName $VMName -StringInput $cmd -ReturnCarriage $true
Start-Sleep -Seconds 1
}
} elseif($cmd.Contains('[MANAGEMENT_GATEWAY]')) {
$cmd = $cmd.replace('[MANAGEMENT_GATEWAY]',$ManagementGateway)
if($Troubleshoot) {
$cmd
} else {
Set-VMKeystrokes -VMName $VMName -StringInput $cmd -ReturnCarriage $true
Start-Sleep -Seconds 1
}
} elseif($cmd.Contains('[JUMPHOST_VM_IP]')) {
$cmd = $cmd.replace('[JUMPHOST_VM_IP]',$ManagementJumpHostIP)
if($Troubleshoot) {
$cmd
} else {
Set-VMKeystrokes -VMName $VMName -StringInput $cmd -ReturnCarriage $true
Start-Sleep -Seconds 1
}
} elseif($cmd.Contains('[MANAGEMENT_DNS_DOMAIN]')) {
$cmd = $cmd.replace('[MANAGEMENT_DNS_DOMAIN]',$ManagementDNSDomain)
$cmd = $cmd.replace('[MANAGEMENT_DNS_SERVER]',$ManagementDNSServer)
if($Troubleshoot) {
$cmd
} else {
Set-VMKeystrokes -VMName $VMName -StringInput $cmd -ReturnCarriage $true
Start-Sleep -Seconds 1
}
} elseif($cmd.Contains('[MANAGEMENT_DNS_SERVER]')) {
$cmd = $cmd.replace('[MANAGEMENT_DNS_SERVER]',$ManagementDNSServer)
if($Troubleshoot) {
$cmd
} else {
Set-VMKeystrokes -VMName $VMName -StringInput $cmd -ReturnCarriage $true
Start-Sleep -Seconds 1
}
} else {
if($Troubleshoot) {
$cmd
} else {
Set-VMKeystrokes -VMName $VMName -StringInput $cmd -ReturnCarriage $true
Start-Sleep -Seconds 1
}
}
}
<#
# Configure and Enable VyOS REST API
# REST API not very functional, no GET operatoin and a bit kludgey on setup
$httpApiConf = "http-api.conf"
$config = @"
{
"listen_address": "$($ManagementAddress.substring(0,$ManagementAddress.IndexOf('/')))",
"port": 8080,
"debug": true,
"api_keys": [
{"id": "powercli", "key": "${ManagementPassword}"}
]
}
"@
$config | Set-Content "$httpApiConf"
Get-Item "$httpApiConf" | Copy-VMGuestFile -LocalToGuest -Destination "/home/vyos/${httpApiConf}" -VM (Get-VM $VMName) -GuestUser "vyos" -GuestPassword "$ManagementPassword" -Force
Write-Host "Creating VyOS REST API Configuration /etc/vyos/${httpApiConf} ..."
$scriptText = "echo `"${ManagementPassword}`" | sudo -S cp /home/vyos/${httpApiConf} /etc/vyos/${httpApiConf}"
Invoke-VMScript -ScriptText $scriptText -vm (Get-VM $VMName) -GuestUser "vyos" -GuestPassword $ManagementPassword
Write-Host "Starting VyOS REST API ..."
$scriptText = "echo `"${ManagementPassword}`" | sudo -S systemctl start vyos-http-api"
Invoke-VMScript -ScriptText $scriptText -vm (Get-VM $VMName) -GuestUser "vyos" -GuestPassword $ManagementPassword
#>
}

View File

@@ -0,0 +1,66 @@
configure
set service ssh port 22
set interfaces ethernet eth0 address '[MANAGEMENT_ADDRESS]'
set interfaces ethernet eth0 description 'Outside'
set interfaces ethernet eth1 address '192.168.0.1/24'
set interfaces ethernet eth1 description 'Inside'
set nat source rule 100 outbound-interface 'eth0'
set nat source rule 100 translation address '[MANAGEMENT_IP]'
set nat source rule 100 translation address 'masquerade'
set protocols static route 0.0.0.0/0 next-hop [MANAGEMENT_GATEWAY]
set interfaces ethernet eth1 mtu '1700'
set interfaces ethernet eth1 vif 10 address '172.30.10.1/24'
set interfaces ethernet eth1 vif 10 description 'VLAN 10 for MGMT'
set interfaces ethernet eth1 vif 20 address '172.30.20.1/24'
set interfaces ethernet eth1 vif 20 description 'VLAN 20 for HOST VTEP'
set interfaces ethernet eth1 vif 20 mtu '1700'
set interfaces ethernet eth1 vif 30 address '172.30.30.1/24'
set interfaces ethernet eth1 vif 30 description 'VLAN 30 for EDGE VTEP'
set interfaces ethernet eth1 vif 30 mtu '1700'
set interfaces ethernet eth1 vif 40 address '172.30.40.1/24'
set interfaces ethernet eth1 vif 40 description 'VLAN 40 for EDGE UPLINK'
set interfaces ethernet eth1 vif 40 mtu '1700'
set nat destination rule 100 description 'RDP to [JUMPHOST_VM_IP]:3389'
set nat destination rule 100 destination port '3389'
set nat destination rule 100 inbound-interface 'eth0'
set nat destination rule 100 protocol 'tcp'
set nat destination rule 100 translation address '192.168.0.10'
set nat destination rule 100 translation port '3389'
set service dns forwarding domain [MANAGEMENT_DNS_DOMAIN] server [MANAGEMENT_DNS_SERVER]
set service dns forwarding domain 10.30.172.in-addr.arpa. server [MANAGEMENT_DNS_SERVER]
set service dns forwarding domain 20.30.172.in-addr.arpa. server [MANAGEMENT_DNS_SERVER]
set service dns forwarding domain 30.30.172.in-addr.arpa. server [MANAGEMENT_DNS_SERVER]
set service dns forwarding domain 40.30.172.in-addr.arpa. server [MANAGEMENT_DNS_SERVER]
set service dns forwarding allow-from 0.0.0.0/0
set service dns forwarding listen-address 192.168.0.1
set service dns forwarding listen-address 172.30.10.1
set service dns forwarding listen-address 172.30.20.1
set service dns forwarding listen-address 172.30.30.1
set service dns forwarding listen-address 172.30.40.1
set service dns forwarding name-server 8.8.8.8
set service dns forwarding name-server 8.8.8.4
set nat source rule 10 outbound-interface eth0
set nat source rule 10 source address 172.30.10.0/24
set nat source rule 10 translation address masquerade
set nat source rule 20 outbound-interface eth0
set nat source rule 20 source address 172.30.20.0/24
set nat source rule 20 translation address masquerade
set nat source rule 30 outbound-interface eth0
set nat source rule 30 source address 172.30.30.0/24
set nat source rule 30 translation address masquerade
set nat source rule 40 outbound-interface eth0
set nat source rule 40 source address 172.30.40.0/24
set nat source rule 40 translation address masquerade
commit
save
exit