From 6797eb81568ac66039418ac32f3efe35209173b4 Mon Sep 17 00:00:00 2001 From: William Lam Date: Sat, 30 Nov 2019 07:43:08 -0800 Subject: [PATCH 01/21] Updating to latest CSP Auth API --- Modules/VMware.CSP/VMware.CSP.psm1 | 3 +-- Modules/VMware.DRaaS/VMware.DRaaS.psm1 | 2 +- Modules/VMware.HCX/VMware.HCX.psm1 | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Modules/VMware.CSP/VMware.CSP.psm1 b/Modules/VMware.CSP/VMware.CSP.psm1 index 0562950..469bcad 100644 --- a/Modules/VMware.CSP/VMware.CSP.psm1 +++ b/Modules/VMware.CSP/VMware.CSP.psm1 @@ -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 diff --git a/Modules/VMware.DRaaS/VMware.DRaaS.psm1 b/Modules/VMware.DRaaS/VMware.DRaaS.psm1 index 3028c8c..7067d49 100644 --- a/Modules/VMware.DRaaS/VMware.DRaaS.psm1 +++ b/Modules/VMware.DRaaS/VMware.DRaaS.psm1 @@ -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 diff --git a/Modules/VMware.HCX/VMware.HCX.psm1 b/Modules/VMware.HCX/VMware.HCX.psm1 index 9bfcc18..d869ea1 100644 --- a/Modules/VMware.HCX/VMware.HCX.psm1 +++ b/Modules/VMware.HCX/VMware.HCX.psm1 @@ -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 From ab266189c28cb5ccceb796ba9af49083ad804ebb Mon Sep 17 00:00:00 2001 From: Matt Frey Date: Mon, 19 Aug 2019 13:30:22 -0500 Subject: [PATCH 02/21] Fix for Get-HVInternalName and GlobalEntitlementId --- Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1 | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1 b/Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1 index 67a99cd..8e8b1c5 100644 --- a/Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1 +++ b/Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1 @@ -7767,7 +7767,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 +8025,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] @@ -12776,4 +12782,4 @@ Export-ModuleMember -Function Get-HVEventDatabase, Set-HVEventDatabase, Clear-HV # vCenter Server related Export-ModuleMember -Function Get-HVvCenterServer, Get-HVvCenterServerHealth # Misc/other related -Export-ModuleMember -Function Get-HVlicense, Set-HVlicense, Get-HVHealth, Set-HVInstantCloneMaintenance, Get-HVBaseImageVM, Get-HVBaseImageVMSnapshot +Export-ModuleMember -Function Get-HVlicense, Set-HVlicense, Get-HVHealth, Set-HVInstantCloneMaintenance, Get-HVBaseImageVM, Get-HVBaseImageVMSnapshot \ No newline at end of file From 7a39d2831487a0ba6f813a3efcdfc029d1642874 Mon Sep 17 00:00:00 2001 From: Matt Frey Date: Fri, 20 Dec 2019 10:39:42 -0600 Subject: [PATCH 03/21] Fix issue with manual parameterset on new-hvpool --- Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1 b/Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1 index 8e8b1c5..6931a0d 100644 --- a/Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1 +++ b/Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1 @@ -3746,6 +3746,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 +3778,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 From fa9a3c502662348859169b208bd3ca618babf6fb Mon Sep 17 00:00:00 2001 From: Matt Frey Date: Fri, 20 Dec 2019 10:47:06 -0600 Subject: [PATCH 04/21] Iterate version number to 1.3.1 --- Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1 b/Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1 index 6931a0d..a140dd0 100644 --- a/Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1 +++ b/Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1 @@ -1,5 +1,5 @@ #Script Module : VMware.Hv.Helper -#Version : 1.3 +#Version : 1.3.1 #Copyright © 2016 VMware, Inc. All Rights Reserved. From adfe78f236a43ad48a5829f4d9c6442790a3b2ce Mon Sep 17 00:00:00 2001 From: Matt Frey Date: Fri, 20 Dec 2019 10:49:26 -0600 Subject: [PATCH 05/21] One more place to iterate version number --- Modules/VMware.Hv.Helper/VMware.HV.Helper.psd1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/VMware.Hv.Helper/VMware.HV.Helper.psd1 b/Modules/VMware.Hv.Helper/VMware.HV.Helper.psd1 index 7edd3bc..91e9943 100644 --- a/Modules/VMware.Hv.Helper/VMware.HV.Helper.psd1 +++ b/Modules/VMware.Hv.Helper/VMware.HV.Helper.psd1 @@ -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' From 39cc775d25470dc3f1b60a7301e65269d150a296 Mon Sep 17 00:00:00 2001 From: mtelvers Date: Fri, 3 Jan 2020 09:33:42 +0000 Subject: [PATCH 06/21] Update VMware.HV.Helper.psm1 Add -clearGlobalEntitlement to Set-HVPool --- Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1 b/Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1 index 67a99cd..98baa80 100644 --- a/Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1 +++ b/Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1 @@ -6207,6 +6207,9 @@ function Set-HVPool { [string] $ResourcePool, + [Parameter(Mandatory = $false)] + [switch]$clearGlobalEntitlement, + [Parameter(Mandatory = $false)] [boolean]$allowUsersToChooseProtocol, @@ -6319,6 +6322,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 From 254e062e52d2fc919b3a5301a81fd143897a83b8 Mon Sep 17 00:00:00 2001 From: Joshua Grall Date: Fri, 10 Jan 2020 14:00:27 -0600 Subject: [PATCH 07/21] Fixing path --- Modules/ContentLibrary/ContentLibrary.psm1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/ContentLibrary/ContentLibrary.psm1 b/Modules/ContentLibrary/ContentLibrary.psm1 index 25e6a58..3443897 100644 --- a/Modules/ContentLibrary/ContentLibrary.psm1 +++ b/Modules/ContentLibrary/ContentLibrary.psm1 @@ -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{ From 3f430900cf68465a6b8068721db7749e7e7c7ae3 Mon Sep 17 00:00:00 2001 From: Rob Nelson Date: Thu, 23 Jan 2020 16:33:43 -0500 Subject: [PATCH 08/21] Make `-StartTime` argument to `Start-HVPool` take effect --- Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1 b/Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1 index dbf144c..67ffef3 100644 --- a/Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1 +++ b/Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1 @@ -7010,7 +7010,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 @@ -12796,4 +12797,4 @@ Export-ModuleMember -Function Get-HVEventDatabase, Set-HVEventDatabase, Clear-HV # vCenter Server related Export-ModuleMember -Function Get-HVvCenterServer, Get-HVvCenterServerHealth # Misc/other related -Export-ModuleMember -Function Get-HVlicense, Set-HVlicense, Get-HVHealth, Set-HVInstantCloneMaintenance, Get-HVBaseImageVM, Get-HVBaseImageVMSnapshot \ No newline at end of file +Export-ModuleMember -Function Get-HVlicense, Set-HVlicense, Get-HVHealth, Set-HVInstantCloneMaintenance, Get-HVBaseImageVM, Get-HVBaseImageVMSnapshot From 1b0dd9f42e13490bc5ce89c5bd80f0cc5920951f Mon Sep 17 00:00:00 2001 From: William Lam Date: Wed, 5 Feb 2020 05:48:12 -0800 Subject: [PATCH 09/21] Workspace One Access PS Module --- .../VMware.WorkspaceOneAccess.psd1 | 90 +++ .../VMware.WorkspaceOneAccess.psm1 | 572 ++++++++++++++++++ 2 files changed, 662 insertions(+) create mode 100644 Modules/VMware.WorkspaceOneAccess/VMware.WorkspaceOneAccess.psd1 create mode 100644 Modules/VMware.WorkspaceOneAccess/VMware.WorkspaceOneAccess.psm1 diff --git a/Modules/VMware.WorkspaceOneAccess/VMware.WorkspaceOneAccess.psd1 b/Modules/VMware.WorkspaceOneAccess/VMware.WorkspaceOneAccess.psd1 new file mode 100644 index 0000000..b25bf20 --- /dev/null +++ b/Modules/VMware.WorkspaceOneAccess/VMware.WorkspaceOneAccess.psd1 @@ -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 = '' + +} \ No newline at end of file diff --git a/Modules/VMware.WorkspaceOneAccess/VMware.WorkspaceOneAccess.psm1 b/Modules/VMware.WorkspaceOneAccess/VMware.WorkspaceOneAccess.psm1 new file mode 100644 index 0000000..9e2e978 --- /dev/null +++ b/Modules/VMware.WorkspaceOneAccess/VMware.WorkspaceOneAccess.psm1 @@ -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 +#> + 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 +#> + 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 +#> + 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 +#> + 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 +#> + 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 +#> + 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" + } +} \ No newline at end of file From 118739b8fba376e4d437e0647ead4c7e9aed977b Mon Sep 17 00:00:00 2001 From: Matt Frey Date: Thu, 6 Feb 2020 13:49:04 -0600 Subject: [PATCH 10/21] Minor cleanup and platyPS help --- Modules/VMware.Hv.Helper/README.md | 13 +- .../VMware.Hv.Helper/VMware.HV.Helper.psm1 | 81 +- .../VMware.Hv.Helper/docs/Add-HVDesktop.md | 188 ++ .../VMware.Hv.Helper/docs/Add-HVRDSServer.md | 138 ++ .../docs/Clear-HVEventDatabase.md | 100 + .../VMware.Hv.Helper/docs/Connect-HVEvent.md | 127 ++ .../docs/Disconnect-HVEvent.md | 71 + .../docs/Get-HVApplication.md | 110 + .../docs/Get-HVBaseImageVM.md | 143 ++ .../docs/Get-HVEntitlement.md | 154 ++ Modules/VMware.Hv.Helper/docs/Get-HVEvent.md | 201 ++ .../docs/Get-HVEventDatabase.md | 69 + Modules/VMware.Hv.Helper/docs/Get-HVFarm.md | 179 ++ .../docs/Get-HVFarmSummary.md | 179 ++ .../docs/Get-HVGlobalEntitlement.md | 118 ++ .../docs/Get-HVGlobalSession.md | 69 + .../docs/Get-HVGlobalSettings.md | 70 + Modules/VMware.Hv.Helper/docs/Get-HVHealth.md | 95 + .../VMware.Hv.Helper/docs/Get-HVHomeSite.md | 89 + .../docs/Get-HVInternalName.md | 120 ++ .../docs/Get-HVLocalSession.md | 69 + .../VMware.Hv.Helper/docs/Get-HVMachine.md | 180 ++ .../docs/Get-HVMachineSummary.md | 195 ++ .../docs/Get-HVPodFederation.md | 71 + Modules/VMware.Hv.Helper/docs/Get-HVPool.md | 218 ++ .../VMware.Hv.Helper/docs/Get-HVPoolSpec.md | 142 ++ .../docs/Get-HVPoolSummary.md | 218 ++ .../docs/Get-HVPreInstalledApplication.md | 85 + .../docs/Get-HVQueryFilter.md | 308 +++ .../docs/Get-HVQueryResult.md | 181 ++ .../docs/Get-HVResourceStructure.md | 70 + Modules/VMware.Hv.Helper/docs/Get-HVSite.md | 71 + .../VMware.Hv.Helper/docs/Get-HVlicense.md | 69 + .../docs/Get-HVvCenterServer.md | 90 + .../docs/Get-HVvCenterServerHealth.md | 97 + .../docs/New-HVEntitlement.md | 221 ++ Modules/VMware.Hv.Helper/docs/New-HVFarm.md | 1133 ++++++++++ .../docs/New-HVGlobalEntitlement.md | 329 +++ .../VMware.Hv.Helper/docs/New-HVHomeSite.md | 178 ++ .../docs/New-HVManualApplication.md | 383 ++++ .../docs/New-HVPodFederation.md | 72 + Modules/VMware.Hv.Helper/docs/New-HVPool.md | 1830 +++++++++++++++++ .../docs/New-HVPreInstalledApplication.md | 215 ++ Modules/VMware.Hv.Helper/docs/New-HVSite.md | 101 + .../VMware.Hv.Helper/docs/Register-HVPod.md | 127 ++ .../docs/Remove-HVApplication.md | 118 ++ .../docs/Remove-HVApplicationIcon.md | 119 ++ .../docs/Remove-HVEntitlement.md | 178 ++ .../VMware.Hv.Helper/docs/Remove-HVFarm.md | 158 ++ .../docs/Remove-HVGlobalEntitlement.md | 147 ++ .../VMware.Hv.Helper/docs/Remove-HVMachine.md | 154 ++ .../docs/Remove-HVPodFederation.md | 72 + .../VMware.Hv.Helper/docs/Remove-HVPool.md | 186 ++ .../VMware.Hv.Helper/docs/Remove-HVSite.md | 86 + .../VMware.Hv.Helper/docs/Reset-HVMachine.md | 129 ++ .../docs/Set-HVApplication.md | 340 +++ .../docs/Set-HVApplicationIcon.md | 134 ++ .../docs/Set-HVEventDatabase.md | 212 ++ Modules/VMware.Hv.Helper/docs/Set-HVFarm.md | 279 +++ .../docs/Set-HVGlobalEntitlement.md | 253 +++ .../docs/Set-HVGlobalSettings.md | 520 +++++ .../docs/Set-HVInstantCloneMaintenance.md | 147 ++ .../VMware.Hv.Helper/docs/Set-HVMachine.md | 221 ++ .../docs/Set-HVPodFederation.md | 86 + Modules/VMware.Hv.Helper/docs/Set-HVPool.md | 361 ++++ Modules/VMware.Hv.Helper/docs/Set-HVSite.md | 117 ++ .../VMware.Hv.Helper/docs/Set-HVlicense.md | 86 + Modules/VMware.Hv.Helper/docs/Start-HVFarm.md | 465 +++++ Modules/VMware.Hv.Helper/docs/Start-HVPool.md | 399 ++++ .../VMware.Hv.Helper/docs/Unregister-HVPod.md | 110 + 70 files changed, 14002 insertions(+), 42 deletions(-) create mode 100755 Modules/VMware.Hv.Helper/docs/Add-HVDesktop.md create mode 100755 Modules/VMware.Hv.Helper/docs/Add-HVRDSServer.md create mode 100755 Modules/VMware.Hv.Helper/docs/Clear-HVEventDatabase.md create mode 100755 Modules/VMware.Hv.Helper/docs/Connect-HVEvent.md create mode 100755 Modules/VMware.Hv.Helper/docs/Disconnect-HVEvent.md create mode 100755 Modules/VMware.Hv.Helper/docs/Get-HVApplication.md create mode 100755 Modules/VMware.Hv.Helper/docs/Get-HVBaseImageVM.md create mode 100755 Modules/VMware.Hv.Helper/docs/Get-HVEntitlement.md create mode 100755 Modules/VMware.Hv.Helper/docs/Get-HVEvent.md create mode 100755 Modules/VMware.Hv.Helper/docs/Get-HVEventDatabase.md create mode 100755 Modules/VMware.Hv.Helper/docs/Get-HVFarm.md create mode 100755 Modules/VMware.Hv.Helper/docs/Get-HVFarmSummary.md create mode 100755 Modules/VMware.Hv.Helper/docs/Get-HVGlobalEntitlement.md create mode 100755 Modules/VMware.Hv.Helper/docs/Get-HVGlobalSession.md create mode 100755 Modules/VMware.Hv.Helper/docs/Get-HVGlobalSettings.md create mode 100755 Modules/VMware.Hv.Helper/docs/Get-HVHealth.md create mode 100755 Modules/VMware.Hv.Helper/docs/Get-HVHomeSite.md create mode 100755 Modules/VMware.Hv.Helper/docs/Get-HVInternalName.md create mode 100755 Modules/VMware.Hv.Helper/docs/Get-HVLocalSession.md create mode 100755 Modules/VMware.Hv.Helper/docs/Get-HVMachine.md create mode 100755 Modules/VMware.Hv.Helper/docs/Get-HVMachineSummary.md create mode 100755 Modules/VMware.Hv.Helper/docs/Get-HVPodFederation.md create mode 100755 Modules/VMware.Hv.Helper/docs/Get-HVPool.md create mode 100755 Modules/VMware.Hv.Helper/docs/Get-HVPoolSpec.md create mode 100755 Modules/VMware.Hv.Helper/docs/Get-HVPoolSummary.md create mode 100755 Modules/VMware.Hv.Helper/docs/Get-HVPreInstalledApplication.md create mode 100755 Modules/VMware.Hv.Helper/docs/Get-HVQueryFilter.md create mode 100755 Modules/VMware.Hv.Helper/docs/Get-HVQueryResult.md create mode 100755 Modules/VMware.Hv.Helper/docs/Get-HVResourceStructure.md create mode 100755 Modules/VMware.Hv.Helper/docs/Get-HVSite.md create mode 100755 Modules/VMware.Hv.Helper/docs/Get-HVlicense.md create mode 100755 Modules/VMware.Hv.Helper/docs/Get-HVvCenterServer.md create mode 100755 Modules/VMware.Hv.Helper/docs/Get-HVvCenterServerHealth.md create mode 100755 Modules/VMware.Hv.Helper/docs/New-HVEntitlement.md create mode 100755 Modules/VMware.Hv.Helper/docs/New-HVFarm.md create mode 100755 Modules/VMware.Hv.Helper/docs/New-HVGlobalEntitlement.md create mode 100755 Modules/VMware.Hv.Helper/docs/New-HVHomeSite.md create mode 100755 Modules/VMware.Hv.Helper/docs/New-HVManualApplication.md create mode 100755 Modules/VMware.Hv.Helper/docs/New-HVPodFederation.md create mode 100755 Modules/VMware.Hv.Helper/docs/New-HVPool.md create mode 100755 Modules/VMware.Hv.Helper/docs/New-HVPreInstalledApplication.md create mode 100755 Modules/VMware.Hv.Helper/docs/New-HVSite.md create mode 100755 Modules/VMware.Hv.Helper/docs/Register-HVPod.md create mode 100755 Modules/VMware.Hv.Helper/docs/Remove-HVApplication.md create mode 100755 Modules/VMware.Hv.Helper/docs/Remove-HVApplicationIcon.md create mode 100755 Modules/VMware.Hv.Helper/docs/Remove-HVEntitlement.md create mode 100755 Modules/VMware.Hv.Helper/docs/Remove-HVFarm.md create mode 100755 Modules/VMware.Hv.Helper/docs/Remove-HVGlobalEntitlement.md create mode 100755 Modules/VMware.Hv.Helper/docs/Remove-HVMachine.md create mode 100755 Modules/VMware.Hv.Helper/docs/Remove-HVPodFederation.md create mode 100755 Modules/VMware.Hv.Helper/docs/Remove-HVPool.md create mode 100755 Modules/VMware.Hv.Helper/docs/Remove-HVSite.md create mode 100755 Modules/VMware.Hv.Helper/docs/Reset-HVMachine.md create mode 100755 Modules/VMware.Hv.Helper/docs/Set-HVApplication.md create mode 100755 Modules/VMware.Hv.Helper/docs/Set-HVApplicationIcon.md create mode 100755 Modules/VMware.Hv.Helper/docs/Set-HVEventDatabase.md create mode 100755 Modules/VMware.Hv.Helper/docs/Set-HVFarm.md create mode 100755 Modules/VMware.Hv.Helper/docs/Set-HVGlobalEntitlement.md create mode 100755 Modules/VMware.Hv.Helper/docs/Set-HVGlobalSettings.md create mode 100755 Modules/VMware.Hv.Helper/docs/Set-HVInstantCloneMaintenance.md create mode 100755 Modules/VMware.Hv.Helper/docs/Set-HVMachine.md create mode 100755 Modules/VMware.Hv.Helper/docs/Set-HVPodFederation.md create mode 100755 Modules/VMware.Hv.Helper/docs/Set-HVPool.md create mode 100755 Modules/VMware.Hv.Helper/docs/Set-HVSite.md create mode 100755 Modules/VMware.Hv.Helper/docs/Set-HVlicense.md create mode 100755 Modules/VMware.Hv.Helper/docs/Start-HVFarm.md create mode 100755 Modules/VMware.Hv.Helper/docs/Start-HVPool.md create mode 100755 Modules/VMware.Hv.Helper/docs/Unregister-HVPod.md diff --git a/Modules/VMware.Hv.Helper/README.md b/Modules/VMware.Hv.Helper/README.md index fe87153..bce3072 100644 --- a/Modules/VMware.Hv.Helper/README.md +++ b/Modules/VMware.Hv.Helper/README.md @@ -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 $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' +``` diff --git a/Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1 b/Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1 index 67ffef3..89e3dfc 100644 --- a/Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1 +++ b/Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1 @@ -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 @@ -5660,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 @@ -6444,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 @@ -6828,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 @@ -10700,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) @@ -10751,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) @@ -10852,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) @@ -10875,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" @@ -10939,7 +10940,7 @@ function register-hvpod { [System.gc]::collect() } -function unregister-hvpod { +function Unregister-HVPod { <# .Synopsis Removes a pod from a podfederation @@ -11029,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) @@ -11088,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) @@ -11138,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) @@ -11203,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) @@ -11277,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) @@ -11803,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 diff --git a/Modules/VMware.Hv.Helper/docs/Add-HVDesktop.md b/Modules/VMware.Hv.Helper/docs/Add-HVDesktop.md new file mode 100755 index 0000000..54353ce --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Add-HVDesktop.md @@ -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] [-Machines] [[-Users] ] [[-Vcenter] ] + [[-HvServer] ] [-WhatIf] [-Confirm] [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Add-HVRDSServer.md b/Modules/VMware.Hv.Helper/docs/Add-HVRDSServer.md new file mode 100755 index 0000000..6018ad7 --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Add-HVRDSServer.md @@ -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] [-RdsServers] [[-HvServer] ] [-WhatIf] [-Confirm] + [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Clear-HVEventDatabase.md b/Modules/VMware.Hv.Helper/docs/Clear-HVEventDatabase.md new file mode 100755 index 0000000..c3adf9e --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Clear-HVEventDatabase.md @@ -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] ] [-WhatIf] [-Confirm] [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Connect-HVEvent.md b/Modules/VMware.Hv.Helper/docs/Connect-HVEvent.md new file mode 100755 index 0000000..b1bd759 --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Connect-HVEvent.md @@ -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] ] [[-HvServer] ] [[-DbUserName] ] + [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Disconnect-HVEvent.md b/Modules/VMware.Hv.Helper/docs/Disconnect-HVEvent.md new file mode 100755 index 0000000..6be94f4 --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Disconnect-HVEvent.md @@ -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] [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Get-HVApplication.md b/Modules/VMware.Hv.Helper/docs/Get-HVApplication.md new file mode 100755 index 0000000..0d521cb --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Get-HVApplication.md @@ -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] ] [[-HvServer] ] [[-FormatList] ] + [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Get-HVBaseImageVM.md b/Modules/VMware.Hv.Helper/docs/Get-HVBaseImageVM.md new file mode 100755 index 0000000..b534b24 --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Get-HVBaseImageVM.md @@ -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 ] [-VirtualCenter ] [-Type ] [] +``` + +### Name +``` +Get-HVBaseImageVM [-HvServer ] [-VirtualCenter ] [-Name ] [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Get-HVEntitlement.md b/Modules/VMware.Hv.Helper/docs/Get-HVEntitlement.md new file mode 100755 index 0000000..e7747b0 --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Get-HVEntitlement.md @@ -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] ] [[-Type] ] [[-ResourceName] ] [[-ResourceType] ] + [[-HvServer] ] [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Get-HVEvent.md b/Modules/VMware.Hv.Helper/docs/Get-HVEvent.md new file mode 100755 index 0000000..043e1ec --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Get-HVEvent.md @@ -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] [[-TimePeriod] ] [[-FilterType] ] [[-UserFilter] ] + [[-SeverityFilter] ] [[-TimeFilter] ] [[-ModuleFilter] ] [[-MessageFilter] ] + [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Get-HVEventDatabase.md b/Modules/VMware.Hv.Helper/docs/Get-HVEventDatabase.md new file mode 100755 index 0000000..4cb554b --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Get-HVEventDatabase.md @@ -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] ] [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Get-HVFarm.md b/Modules/VMware.Hv.Helper/docs/Get-HVFarm.md new file mode 100755 index 0000000..c8b0718 --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Get-HVFarm.md @@ -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] ] [[-FarmDisplayName] ] [[-FarmType] ] [[-Enabled] ] + [[-SuppressInfo] ] [[-HvServer] ] [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Get-HVFarmSummary.md b/Modules/VMware.Hv.Helper/docs/Get-HVFarmSummary.md new file mode 100755 index 0000000..153bfb9 --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Get-HVFarmSummary.md @@ -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] ] [[-FarmDisplayName] ] [[-FarmType] ] + [[-Enabled] ] [[-SuppressInfo] ] [[-HvServer] ] [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Get-HVGlobalEntitlement.md b/Modules/VMware.Hv.Helper/docs/Get-HVGlobalEntitlement.md new file mode 100755 index 0000000..4d1ac8d --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Get-HVGlobalEntitlement.md @@ -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] ] [[-Description] ] [[-SuppressInfo] ] + [[-HvServer] ] [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Get-HVGlobalSession.md b/Modules/VMware.Hv.Helper/docs/Get-HVGlobalSession.md new file mode 100755 index 0000000..c4d1963 --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Get-HVGlobalSession.md @@ -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] ] [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Get-HVGlobalSettings.md b/Modules/VMware.Hv.Helper/docs/Get-HVGlobalSettings.md new file mode 100755 index 0000000..fa0a7fd --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Get-HVGlobalSettings.md @@ -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] ] [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Get-HVHealth.md b/Modules/VMware.Hv.Helper/docs/Get-HVHealth.md new file mode 100755 index 0000000..cc53349 --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Get-HVHealth.md @@ -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] ] [[-HvServer] ] [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Get-HVHomeSite.md b/Modules/VMware.Hv.Helper/docs/Get-HVHomeSite.md new file mode 100755 index 0000000..3d75693 --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Get-HVHomeSite.md @@ -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] ] [[-HvServer] ] [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Get-HVInternalName.md b/Modules/VMware.Hv.Helper/docs/Get-HVInternalName.md new file mode 100755 index 0000000..fc8efaf --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Get-HVInternalName.md @@ -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] [[-VcId] ] [[-BaseImageVmId] ] + [[-HvServer] ] [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Get-HVLocalSession.md b/Modules/VMware.Hv.Helper/docs/Get-HVLocalSession.md new file mode 100755 index 0000000..0b1dcd3 --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Get-HVLocalSession.md @@ -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] ] [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Get-HVMachine.md b/Modules/VMware.Hv.Helper/docs/Get-HVMachine.md new file mode 100755 index 0000000..ac20ec1 --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Get-HVMachine.md @@ -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] ] [[-MachineName] ] [[-DnsName] ] [[-State] ] + [[-JsonFilePath] ] [[-HvServer] ] [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Get-HVMachineSummary.md b/Modules/VMware.Hv.Helper/docs/Get-HVMachineSummary.md new file mode 100755 index 0000000..c745752 --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Get-HVMachineSummary.md @@ -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] ] [[-MachineName] ] [[-DnsName] ] [[-State] ] + [[-JsonFilePath] ] [[-SuppressInfo] ] [[-HvServer] ] [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Get-HVPodFederation.md b/Modules/VMware.Hv.Helper/docs/Get-HVPodFederation.md new file mode 100755 index 0000000..e8c4885 --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Get-HVPodFederation.md @@ -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] ] [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Get-HVPool.md b/Modules/VMware.Hv.Helper/docs/Get-HVPool.md new file mode 100755 index 0000000..9c7d2b3 --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Get-HVPool.md @@ -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] ] [[-PoolDisplayName] ] [[-PoolType] ] + [[-UserAssignment] ] [[-Enabled] ] [[-ProvisioningEnabled] ] + [[-SuppressInfo] ] [[-HvServer] ] [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Get-HVPoolSpec.md b/Modules/VMware.Hv.Helper/docs/Get-HVPoolSpec.md new file mode 100755 index 0000000..3994ae7 --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Get-HVPoolSpec.md @@ -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] [[-FilePath] ] [[-HvServer] ] [-WhatIf] [-Confirm] + [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Get-HVPoolSummary.md b/Modules/VMware.Hv.Helper/docs/Get-HVPoolSummary.md new file mode 100755 index 0000000..f69e88d --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Get-HVPoolSummary.md @@ -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] ] [[-PoolDisplayName] ] [[-PoolType] ] + [[-UserAssignment] ] [[-Enabled] ] [[-ProvisioningEnabled] ] + [[-SuppressInfo] ] [[-HvServer] ] [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Get-HVPreInstalledApplication.md b/Modules/VMware.Hv.Helper/docs/Get-HVPreInstalledApplication.md new file mode 100755 index 0000000..33bfcab --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Get-HVPreInstalledApplication.md @@ -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] [[-HvServer] ] [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Get-HVQueryFilter.md b/Modules/VMware.Hv.Helper/docs/Get-HVQueryFilter.md new file mode 100755 index 0000000..764579c --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Get-HVQueryFilter.md @@ -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] [-Ne] [-MemberValue] [] +``` + +### startswith +``` +Get-HVQueryFilter [-MemberName] [-Startswith] [-MemberValue] [] +``` + +### contains +``` +Get-HVQueryFilter [-MemberName] [-Contains] [-MemberValue] [] +``` + +### eq +``` +Get-HVQueryFilter [-MemberName] [-Eq] [-MemberValue] [] +``` + +### not +``` +Get-HVQueryFilter [-Not] [-Filter] [] +``` + +### and +``` +Get-HVQueryFilter [-And] [-Filters] [] +``` + +### or +``` +Get-HVQueryFilter [-Or] [-Filters] [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Get-HVQueryResult.md b/Modules/VMware.Hv.Helper/docs/Get-HVQueryResult.md new file mode 100755 index 0000000..f959cff --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Get-HVQueryResult.md @@ -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] [[-Filter] ] [[-SortBy] ] + [[-SortDescending] ] [[-Limit] ] [[-HvServer] ] [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Get-HVResourceStructure.md b/Modules/VMware.Hv.Helper/docs/Get-HVResourceStructure.md new file mode 100755 index 0000000..6767049 --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Get-HVResourceStructure.md @@ -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 \ | + +## SYNTAX + +``` +Get-HVResourceStructure [[-HvServer] ] [] +``` + +## 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 \ No newline at end of file diff --git a/Modules/VMware.Hv.Helper/docs/Get-HVSite.md b/Modules/VMware.Hv.Helper/docs/Get-HVSite.md new file mode 100755 index 0000000..de64331 --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Get-HVSite.md @@ -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] ] [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Get-HVlicense.md b/Modules/VMware.Hv.Helper/docs/Get-HVlicense.md new file mode 100755 index 0000000..97f270a --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Get-HVlicense.md @@ -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] ] [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Get-HVvCenterServer.md b/Modules/VMware.Hv.Helper/docs/Get-HVvCenterServer.md new file mode 100755 index 0000000..1540c41 --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Get-HVvCenterServer.md @@ -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] ] [[-Name] ] [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Get-HVvCenterServerHealth.md b/Modules/VMware.Hv.Helper/docs/Get-HVvCenterServerHealth.md new file mode 100755 index 0000000..1226441 --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Get-HVvCenterServerHealth.md @@ -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] ] [[-VirtualCenter] ] [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/New-HVEntitlement.md b/Modules/VMware.Hv.Helper/docs/New-HVEntitlement.md new file mode 100755 index 0000000..b86f11b --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/New-HVEntitlement.md @@ -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 -ResourceName [-ResourceType ] [-Type ] + [-HvServer ] [-WhatIf] [-Confirm] [] +``` + +### PipeLine +``` +New-HVEntitlement -User -Resource [-ResourceType ] [-Type ] + [-HvServer ] [-WhatIf] [-Confirm] [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/New-HVFarm.md b/Modules/VMware.Hv.Helper/docs/New-HVFarm.md new file mode 100755 index 0000000..dacc0df --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/New-HVFarm.md @@ -0,0 +1,1133 @@ +--- +external help file: VMware.HV.Helper-help.xml +Module Name: VMware.HV.Helper +online version: +schema: 2.0.0 +--- + +# New-HVFarm + +## SYNOPSIS +Creates a new farm. + +## SYNTAX + +### LINKED_CLONE +``` +New-HVFarm [-LinkedClone] -FarmName [-FarmDisplayName ] [-Description ] + [-AccessGroup ] [-Enable ] [-DisconnectedSessionTimeoutPolicy ] + [-DisconnectedSessionTimeoutMinutes ] [-EmptySessionTimeoutPolicy ] + [-EmptySessionTimeoutMinutes ] [-LogoffAfterTimeout ] [-DefaultDisplayProtocol ] + [-AllowDisplayProtocolOverride ] [-EnableHTMLAccess ] [-EnableCollaboration ] + [-EnableGRIDvGPUs ] [-VGPUGridProfile ] [-ServerErrorThreshold ] + [-OverrideGlobalSetting ] [-MirageServerEnabled ] [-Url ] [-Vcenter ] + -ParentVM -SnapshotVM -VmFolder -HostOrCluster -ResourcePool + [-dataCenter ] -Datastores [-StorageOvercommit ] [-UseVSAN ] + [-EnableProvisioning ] [-StopProvisioningOnError ] [-TransparentPageSharingScope ] + [-NamingMethod ] [-NamingPattern ] [-MinReady ] [-MaximumCount ] + [-UseSeparateDatastoresReplicaAndOSDisks ] [-ReplicaDiskDatastore ] + [-UseNativeSnapshots ] [-ReclaimVmDiskSpace ] [-ReclamationThresholdGB ] + [-BlackoutTimes ] [-AdContainer ] -NetBiosName [-DomainAdmin ] + [-ReusePreExistingAccounts ] -SysPrepName [-MaxSessionsType ] [-MaxSessions ] + [-HvServer ] [-WhatIf] [-Confirm] [] +``` + +### INSTANT_CLONE +``` +New-HVFarm [-InstantClone] -FarmName [-FarmDisplayName ] [-Description ] + [-AccessGroup ] [-Enable ] [-DisconnectedSessionTimeoutPolicy ] + [-DisconnectedSessionTimeoutMinutes ] [-EmptySessionTimeoutPolicy ] + [-EmptySessionTimeoutMinutes ] [-LogoffAfterTimeout ] [-DefaultDisplayProtocol ] + [-AllowDisplayProtocolOverride ] [-EnableHTMLAccess ] [-EnableCollaboration ] + [-EnableGRIDvGPUs ] [-VGPUGridProfile ] [-ServerErrorThreshold ] + [-OverrideGlobalSetting ] [-MirageServerEnabled ] [-Url ] [-Vcenter ] + -ParentVM -SnapshotVM -VmFolder -HostOrCluster -ResourcePool + [-dataCenter ] -Datastores [-StorageOvercommit ] [-UseVSAN ] + [-EnableProvisioning ] [-StopProvisioningOnError ] [-TransparentPageSharingScope ] + [-NamingMethod ] [-NamingPattern ] [-MinReady ] [-MaximumCount ] + [-UseSeparateDatastoresReplicaAndOSDisks ] [-ReplicaDiskDatastore ] + [-UseNativeSnapshots ] [-ReclaimVmDiskSpace ] [-AdContainer ] -NetBiosName + [-DomainAdmin ] [-PowerOffScriptName ] [-PowerOffScriptParameters ] + [-PostSynchronizationScriptName ] [-PostSynchronizationScriptParameters ] + [-MaxSessionsType ] [-MaxSessions ] [-HvServer ] [-WhatIf] [-Confirm] + [] +``` + +### MANUAL +``` +New-HVFarm [-Manual] -FarmName [-FarmDisplayName ] [-Description ] + [-AccessGroup ] [-Enable ] [-DisconnectedSessionTimeoutPolicy ] + [-DisconnectedSessionTimeoutMinutes ] [-EmptySessionTimeoutPolicy ] + [-EmptySessionTimeoutMinutes ] [-LogoffAfterTimeout ] [-DefaultDisplayProtocol ] + [-AllowDisplayProtocolOverride ] [-EnableHTMLAccess ] [-EnableCollaboration ] + [-EnableGRIDvGPUs ] [-VGPUGridProfile ] [-ServerErrorThreshold ] + [-OverrideGlobalSetting ] [-MirageServerEnabled ] [-Url ] -RdsServers + [-HvServer ] [-WhatIf] [-Confirm] [] +``` + +### JSON_FILE +``` +New-HVFarm [-FarmName ] [-FarmDisplayName ] [-Description ] [-AccessGroup ] + [-Enable ] [-DisconnectedSessionTimeoutPolicy ] [-DisconnectedSessionTimeoutMinutes ] + [-EmptySessionTimeoutPolicy ] [-EmptySessionTimeoutMinutes ] [-LogoffAfterTimeout ] + [-DefaultDisplayProtocol ] [-AllowDisplayProtocolOverride ] [-EnableHTMLAccess ] + [-EnableCollaboration ] [-EnableGRIDvGPUs ] [-VGPUGridProfile ] + [-ServerErrorThreshold ] [-OverrideGlobalSetting ] [-MirageServerEnabled ] + [-Url ] [-NamingPattern ] [-Spec ] [-HvServer ] [-WhatIf] [-Confirm] + [] +``` + +## DESCRIPTION +Creates a new farm, the type would be determined based on input parameters. + +## EXAMPLES + +### EXAMPLE 1 +``` +New-HVFarm -LinkedClone -FarmName 'LCFarmTest' -ParentVM 'Win_Server_2012_R2' -SnapshotVM 'Snap_RDS' -VmFolder 'PoolVM' -HostOrCluster 'cls' -ResourcePool 'cls' -Datastores 'datastore1 (5)' -FarmDisplayName 'LC Farm Test' -Description 'created LC Farm from PS' -EnableProvisioning $true -StopProvisioningOnError $false -NamingPattern "LCFarmVM_PS" -MinReady 1 -MaximumCount 1 -SysPrepName "RDSH_Cust2" -NetBiosName "adviewdev" +``` + +Creates new linkedClone farm by using naming pattern + +### EXAMPLE 2 +``` +New-HVFarm -InstantClone -FarmName 'ICFarmCL' -ParentVM 'vm-rdsh-ic' -SnapshotVM 'Snap_5' -VmFolder 'Instant_Clone_VMs' -HostOrCluster 'vimal-cluster' -ResourcePool 'vimal-cluster' -Datastores 'datastore1' -FarmDisplayName 'IC Farm using CL' -Description 'created IC Farm from PS command-line' -EnableProvisioning $true -StopProvisioningOnError $false -NamingPattern "ICFarmCL-" -NetBiosName "ad-vimalg" +``` + +Creates new linkedClone farm by using naming pattern + +### EXAMPLE 3 +``` +New-HVFarm -Spec C:\VMWare\Specs\LinkedClone.json -Confirm:$false +``` + +Creates new linkedClone farm by using json file + +### EXAMPLE 4 +``` +New-HVFarm -Spec C:\VMWare\Specs\InstantCloneFarm.json -Confirm:$false +``` + +Creates new instantClone farm by using json file + +### EXAMPLE 5 +``` +New-HVFarm -Manual -FarmName "manualFarmTest" -FarmDisplayName "manualFarmTest" -Description "Manual PS Test" -RdsServers "vm-for-rds.eng.vmware.com","vm-for-rds-2.eng.vmware.com" -Confirm:$false +``` + +Creates new manual farm by using rdsServers names + +### EXAMPLE 6 +``` +New-HVFarm -Spec C:\VMWare\Specs\AutomatedInstantCloneFarm.json -FarmName 'InsPool' -NamingPattern 'InsFarm-' +``` + +Creates new instant clone farm by reading few parameters from json and few parameters from command line. + +## PARAMETERS + +### -LinkedClone +Switch to Create Automated Linked Clone farm. + +```yaml +Type: SwitchParameter +Parameter Sets: LINKED_CLONE +Aliases: + +Required: True +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InstantClone +Switch to Create Automated Instant Clone farm. + +```yaml +Type: SwitchParameter +Parameter Sets: INSTANT_CLONE +Aliases: + +Required: True +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Manual +Switch to Create Manual farm. + +```yaml +Type: SwitchParameter +Parameter Sets: MANUAL +Aliases: + +Required: True +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -FarmName +Name of the farm. + +```yaml +Type: String +Parameter Sets: LINKED_CLONE, INSTANT_CLONE, MANUAL +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +```yaml +Type: String +Parameter Sets: JSON_FILE +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -FarmDisplayName +Display name of the farm. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: $farmName +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Description +Description of the farm. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AccessGroup +View access group can organize the servers in the farm. +Default Value is 'Root'. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: Root +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Enable +Set true to enable the farm otherwise set to false. + +```yaml +Type: Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: True +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisconnectedSessionTimeoutPolicy +farmSpec.data.settings.disconnectedSessionTimeoutPolicy + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: NEVER +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisconnectedSessionTimeoutMinutes +farmSpec.data.settings.disconnectedSessionTimeoutMinutes + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -EmptySessionTimeoutPolicy +farmSpec.data.settings.emptySessionTimeoutPolicy + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: AFTER +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -EmptySessionTimeoutMinutes +farmSpec.data.settings.emptySessionTimeoutMinutes + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: 1 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LogoffAfterTimeout +farmSpec.data.settings.logoffAfterTimeout + +```yaml +Type: Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultDisplayProtocol +farmSpec.data.displayProtocolSettings.defaultDisplayProtocol + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: PCOIP +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AllowDisplayProtocolOverride +farmSpec.data.displayProtocolSettings.allowDisplayProtocolOverride + +```yaml +Type: Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: True +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -EnableHTMLAccess +farmSpec.data.displayProtocolSettings.enableHTMLAccess + +```yaml +Type: Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -EnableCollaboration +farmSpec.data.displayProtocolSettings.EnableCollaboration + +```yaml +Type: Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -EnableGRIDvGPUs +farmSpec.data.displayProtocolSettings.EnableGRIDvGPUs + +```yaml +Type: Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VGPUGridProfile +farmSpec.data.displayProtocolSettings.VGPUGridProfile + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServerErrorThreshold +farmSpec.data.serverErrorThreshold + +```yaml +Type: Object +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OverrideGlobalSetting +farmSpec.data.mirageConfigurationOverrides.overrideGlobalSetting + +```yaml +Type: Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MirageServerEnabled +farmSpec.data.mirageConfigurationOverrides.enabled + +```yaml +Type: Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Url +farmSpec.data.mirageConfigurationOverrides.url + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Vcenter +Virtual Center server-address (IP or FQDN) where the farm RDS Servers are located. +This should be same as provided to the Connection Server while adding the vCenter server. + +```yaml +Type: String +Parameter Sets: LINKED_CLONE, INSTANT_CLONE +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParentVM +Base image VM for RDS Servers. +Applicable to Linked Clone and Instant Clone farms. + +```yaml +Type: String +Parameter Sets: LINKED_CLONE, INSTANT_CLONE +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SnapshotVM +Base image snapshot for RDS Servers. + +```yaml +Type: String +Parameter Sets: LINKED_CLONE, INSTANT_CLONE +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VmFolder +VM folder to deploy the RDSServers to. +Applicable to Linked Clone and Instant Clone farms. + +```yaml +Type: String +Parameter Sets: LINKED_CLONE, INSTANT_CLONE +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -HostOrCluster +Host or cluster to deploy the RDSServers in. +Applicable to Linked Clone and Instant Clone farms. + +```yaml +Type: String +Parameter Sets: LINKED_CLONE, INSTANT_CLONE +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourcePool +Resource pool to deploy the RDSServers. +Applicable to Linked Clone and Instant Clone farms. + +```yaml +Type: String +Parameter Sets: LINKED_CLONE, INSTANT_CLONE +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -dataCenter +farmSpec.automatedfarmSpec.virtualCenterProvisioningSettings.virtualCenterProvisioningData.dataCenter if LINKED_CLONE, INSTANT_CLONE + +```yaml +Type: String +Parameter Sets: LINKED_CLONE, INSTANT_CLONE +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Datastores +Datastore names to store the RDSServer. +Applicable to Linked Clone and Instant Clone farms. + +```yaml +Type: String[] +Parameter Sets: LINKED_CLONE, INSTANT_CLONE +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StorageOvercommit +farmSpec.automatedfarmSpec.virtualCenterProvisioningSettings.virtualCenterStorageSettings.datastores.storageOvercommit if LINKED_CLONE, INSTANT_CLONE + +```yaml +Type: String[] +Parameter Sets: LINKED_CLONE, INSTANT_CLONE +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UseVSAN +Whether to use vSphere VSAN. +This is applicable for vSphere 5.5 or later. +Applicable to Linked Clone and Instant Clone farms. + +```yaml +Type: Boolean +Parameter Sets: LINKED_CLONE, INSTANT_CLONE +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -EnableProvisioning +Set to true to enable provision of RDSServers immediately in farm. +Applicable to Linked Clone and Instant Clone farms. + +```yaml +Type: Boolean +Parameter Sets: LINKED_CLONE, INSTANT_CLONE +Aliases: + +Required: False +Position: Named +Default value: True +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StopProvisioningOnError +Set to true to stop provisioning of all RDSServers on error. +Applicable to Linked Clone and Instant Clone farms. + +```yaml +Type: Boolean +Parameter Sets: LINKED_CLONE, INSTANT_CLONE +Aliases: + +Required: False +Position: Named +Default value: True +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TransparentPageSharingScope +The transparent page sharing scope. +The default value is 'VM'. + +```yaml +Type: String +Parameter Sets: LINKED_CLONE, INSTANT_CLONE +Aliases: + +Required: False +Position: Named +Default value: VM +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NamingMethod +Determines how the VMs in the farm are named. +Set PATTERN to use naming pattern. +The default value is PATTERN. +Currently only PATTERN is allowed. + +```yaml +Type: String +Parameter Sets: LINKED_CLONE, INSTANT_CLONE +Aliases: + +Required: False +Position: Named +Default value: PATTERN +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NamingPattern +RDS Servers will be named according to the specified naming pattern. +Value would be considered only when $namingMethod = PATTERN +The default value is farmName + '{n:fixed=4}'. + +```yaml +Type: String +Parameter Sets: LINKED_CLONE, INSTANT_CLONE, JSON_FILE +Aliases: + +Required: False +Position: Named +Default value: $farmName + '{n:fixed=4}' +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MinReady +Minimum number of ready (provisioned) Servers during View Composer maintenance operations. +The default value is 0. +Applicable to Linked Clone farms. + +```yaml +Type: Int32 +Parameter Sets: LINKED_CLONE, INSTANT_CLONE +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaximumCount +Maximum number of Servers in the farm. +The default value is 1. +Applicable to Linked Clone and Instant Clone farms. + +```yaml +Type: Int32 +Parameter Sets: LINKED_CLONE, INSTANT_CLONE +Aliases: + +Required: False +Position: Named +Default value: 1 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UseSeparateDatastoresReplicaAndOSDisks +farmSpec.automatedfarmSpec.virtualCenterProvisioningSettings.virtualCenterStorageSettings.viewComposerStorageSettings.useSeparateDatastoresReplicaAndOSDisks if INSTANT_CLONE, LINKED_CLONE + +```yaml +Type: Boolean +Parameter Sets: LINKED_CLONE, INSTANT_CLONE +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ReplicaDiskDatastore +farmSpec.automatedfarmSpec.virtualCenterProvisioningSettings.virtualCenterStorageSettings.viewComposerStorageSettings.replicaDiskDatastore, if LINKED_CLONE, INSTANT_CLONE + +```yaml +Type: String +Parameter Sets: LINKED_CLONE, INSTANT_CLONE +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UseNativeSnapshots +farmSpec.automatedfarmSpec.virtualCenterProvisioningSettings.virtualCenterStorageSettings.viewComposerStorageSettings.useNativeSnapshots, if LINKED_CLONE, INSTANT_CLONE + +```yaml +Type: Boolean +Parameter Sets: LINKED_CLONE, INSTANT_CLONE +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ReclaimVmDiskSpace +farmSpec.automatedfarmSpec.virtualCenterProvisioningSettings.virtualCenterStorageSettings.viewComposerStorageSettings.spaceReclamationSettings.reclaimVmDiskSpace, if LINKED_CLONE, INSTANT_CLONE + +```yaml +Type: Boolean +Parameter Sets: LINKED_CLONE, INSTANT_CLONE +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ReclamationThresholdGB +farmSpec.automatedfarmSpec.virtualCenterProvisioningSettings.virtualCenterStorageSettings.viewComposerStorageSettings.spaceReclamationSettings.reclamationThresholdGB + +```yaml +Type: Int32 +Parameter Sets: LINKED_CLONE +Aliases: + +Required: False +Position: Named +Default value: 1 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -BlackoutTimes +farmSpec.automatedfarmSpec.virtualCenterProvisioningSettings.virtualCenterStorageSettings.viewComposerStorageSettings.spaceReclamationSettings.blackoutTimes + +```yaml +Type: FarmBlackoutTime[] +Parameter Sets: LINKED_CLONE +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AdContainer +This is the Active Directory container which the Servers will be added to upon creation. +The default value is 'CN=Computers'. +Applicable to Linked Clone and Instant Clone farms. + +```yaml +Type: String +Parameter Sets: LINKED_CLONE, INSTANT_CLONE +Aliases: + +Required: False +Position: Named +Default value: CN=Computers +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NetBiosName +Domain Net Bios Name. +Applicable to Linked Clone and Instant Clone farms. + +```yaml +Type: String +Parameter Sets: LINKED_CLONE, INSTANT_CLONE +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DomainAdmin +Domain Administrator user name which will be used to join the domain. +Default value is null. +Applicable to Linked Clone and Instant Clone farms. + +```yaml +Type: String +Parameter Sets: LINKED_CLONE, INSTANT_CLONE +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ReusePreExistingAccounts +farmSpec.automatedfarmSpec.customizationSettings.reusePreExistingAccounts + +```yaml +Type: Boolean +Parameter Sets: LINKED_CLONE +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SysPrepName +The customization spec to use. +Applicable to Linked Clone farms. + +```yaml +Type: String +Parameter Sets: LINKED_CLONE +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PowerOffScriptName +Power off script. +ClonePrep can run a customization script on instant-clone machines before they are powered off. +Provide the path to the script on the parent virtual machine. +Applicable to Instant Clone farms. + +```yaml +Type: String +Parameter Sets: INSTANT_CLONE +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PowerOffScriptParameters +Power off script parameters. +Example: p1 p2 p3 +Applicable to Instant Clone farms. + +```yaml +Type: String +Parameter Sets: INSTANT_CLONE +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PostSynchronizationScriptName +Post synchronization script. +ClonePrep can run a customization script on instant-clone machines after they are created or recovered or a new image is pushed. +Provide the path to the script on the parent virtual machine. +Applicable to Instant Clone farms. + +```yaml +Type: String +Parameter Sets: INSTANT_CLONE +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PostSynchronizationScriptParameters +Post synchronization script parameters. +Example: p1 p2 p3 +Applicable to Instant Clone farms. + +```yaml +Type: String +Parameter Sets: INSTANT_CLONE +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaxSessionsType +farmSpec.automatedfarmSpec.rdsServerMaxSessionsData.maxSessionsType if LINKED_CLONE, INSTANT_CLONE + +```yaml +Type: String +Parameter Sets: LINKED_CLONE, INSTANT_CLONE +Aliases: + +Required: False +Position: Named +Default value: UNLIMITED +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaxSessions +farmSpec.automatedfarmSpec.rdsServerMaxSessionsData.maxSessionsType if LINKED_CLONE, INSTANT_CLONE + +```yaml +Type: Int32 +Parameter Sets: LINKED_CLONE, INSTANT_CLONE +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RdsServers +List of existing registered RDS server names to add into manual farm. +Applicable to Manual farms. + +```yaml +Type: String[] +Parameter Sets: MANUAL +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Spec +Path of the JSON specification file. + +```yaml +Type: String +Parameter Sets: JSON_FILE +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 farms 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 diff --git a/Modules/VMware.Hv.Helper/docs/New-HVGlobalEntitlement.md b/Modules/VMware.Hv.Helper/docs/New-HVGlobalEntitlement.md new file mode 100755 index 0000000..fdc88b2 --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/New-HVGlobalEntitlement.md @@ -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] [-Type] [[-Description] ] [[-Scope] ] + [[-Dedicated] ] [[-FromHome] ] [[-RequireHomeSite] ] + [[-MultipleSessionAutoClean] ] [[-Enabled] ] [[-SupportedDisplayProtocols] ] + [[-DefaultDisplayProtocol] ] [[-AllowUsersToChooseProtocol] ] + [[-AllowUsersToResetMachines] ] [[-EnableHTMLAccess] ] [[-HvServer] ] [-WhatIf] + [-Confirm] [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/New-HVHomeSite.md b/Modules/VMware.Hv.Helper/docs/New-HVHomeSite.md new file mode 100755 index 0000000..6b44ab1 --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/New-HVHomeSite.md @@ -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 -Site [-HvServer ] [] +``` + +### globalApplicationEntitlement +``` +New-HVHomeSite [-Group ] [-Site ] [-globalApplicationEntitlement ] [-HvServer ] + [] +``` + +### globalEntitlement +``` +New-HVHomeSite [-Group ] [-Site ] [-globalEntitlement ] [-HvServer ] + [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/New-HVManualApplication.md b/Modules/VMware.Hv.Helper/docs/New-HVManualApplication.md new file mode 100755 index 0000000..1c7a843 --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/New-HVManualApplication.md @@ -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 ] -Name [-DisplayName ] + [-Description ] -ExecutablePath [-Version ] [-Publisher ] + [-Enabled ] [-EnablePreLaunch ] [-ConnectionServerRestrictions ] + [-CategoryFolderName ] [-clientRestrictions ] [-ShortcutLocations ] + [-MultiSessionMode ] [-MaxMultiSessions ] [-StartFolder ] [-Args ] + -Farm [-AutoUpdateFileTypes ] [-AutoUpdateOtherFileTypes ] + [-GlobalApplicationEntitlement ] [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/New-HVPodFederation.md b/Modules/VMware.Hv.Helper/docs/New-HVPodFederation.md new file mode 100755 index 0000000..45751a7 --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/New-HVPodFederation.md @@ -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] ] [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/New-HVPool.md b/Modules/VMware.Hv.Helper/docs/New-HVPool.md new file mode 100755 index 0000000..055acba --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/New-HVPool.md @@ -0,0 +1,1830 @@ +--- +external help file: VMware.HV.Helper-help.xml +Module Name: VMware.HV.Helper +online version: +schema: 2.0.0 +--- + +# New-HVPool + +## SYNOPSIS +Creates new desktop pool. + +## SYNTAX + +### INSTANT_CLONE +``` +New-HVPool [-InstantClone] -PoolName [-PoolDisplayName ] [-Description ] + [-AccessGroup ] [-GlobalEntitlement ] -UserAssignment + [-AutomaticAssignment ] [-Enable ] [-ConnectionServerRestrictions ] + [-AutomaticLogoffPolicy ] [-AutomaticLogoffMinutes ] [-allowUsersToResetMachines ] + [-allowMultipleSessionsPerUser ] [-deleteOrRefreshMachineAfterLogoff ] + [-supportedDisplayProtocols ] [-defaultDisplayProtocol ] + [-allowUsersToChooseProtocol ] [-enableHTMLAccess ] [-renderer3D ] [-Quality ] + [-Throttling ] [-Vcenter ] -ParentVM -SnapshotVM -VmFolder + -HostOrCluster -ResourcePool [-datacenter ] -Datastores + [-StorageOvercommit ] [-UseVSAN ] [-UseSeparateDatastoresReplicaAndOSDisks ] + [-ReplicaDiskDatastore ] [-UseNativeSnapshots ] [-ReclaimVmDiskSpace ] + [-RedirectWindowsProfile ] [-Nics ] + [-EnableProvisioning ] [-StopProvisioningOnError ] [-TransparentPageSharingScope ] + -NamingMethod [-NamingPattern ] [-MaximumCount ] [-SpareCount ] + [-ProvisioningTime ] [-MinimumCount ] [-SpecificNames ] + [-StartInMaintenanceMode ] [-NumUnassignedMachinesKeptPoweredOn ] [-AdContainer ] + -NetBiosName [-DomainAdmin ] [-ReusePreExistingAccounts ] + [-PowerOffScriptName ] [-PowerOffScriptParameters ] [-PostSynchronizationScriptName ] + [-PostSynchronizationScriptParameters ] [-HvServer ] [-WhatIf] [-Confirm] [] +``` + +### LINKED_CLONE +``` +New-HVPool [-LinkedClone] -PoolName [-PoolDisplayName ] [-Description ] + [-AccessGroup ] [-GlobalEntitlement ] -UserAssignment + [-AutomaticAssignment ] [-Enable ] [-ConnectionServerRestrictions ] + [-PowerPolicy ] [-AutomaticLogoffPolicy ] [-AutomaticLogoffMinutes ] + [-allowUsersToResetMachines ] [-allowMultipleSessionsPerUser ] + [-deleteOrRefreshMachineAfterLogoff ] [-refreshOsDiskAfterLogoff ] + [-refreshPeriodDaysForReplicaOsDisk ] [-refreshThresholdPercentageForReplicaOsDisk ] + [-supportedDisplayProtocols ] [-defaultDisplayProtocol ] + [-allowUsersToChooseProtocol ] [-enableHTMLAccess ] [-renderer3D ] + [-enableGRIDvGPUs ] [-vRamSizeMB ] [-maxNumberOfMonitors ] + [-maxResolutionOfAnyOneMonitor ] [-Quality ] [-Throttling ] + [-overrideGlobalSetting ] [-enabled ] [-url ] [-Vcenter ] -ParentVM + -SnapshotVM -VmFolder -HostOrCluster -ResourcePool [-datacenter ] + -Datastores [-StorageOvercommit ] [-UseVSAN ] + [-UseSeparateDatastoresReplicaAndOSDisks ] [-ReplicaDiskDatastore ] + [-UseNativeSnapshots ] [-ReclaimVmDiskSpace ] [-ReclamationThresholdGB ] + [-RedirectWindowsProfile ] [-UseSeparateDatastoresPersistentAndOSDisks ] + [-PersistentDiskDatastores ] [-PersistentDiskStorageOvercommit ] [-DiskSizeMB ] + [-DiskDriveLetter ] [-redirectDisposableFiles ] [-NonPersistentDiskSizeMB ] + [-NonPersistentDiskDriveLetter ] [-UseViewStorageAccelerator ] + [-ViewComposerDiskTypes ] [-RegenerateViewStorageAcceleratorDays ] + [-BlackoutTimes ] [-Nics ] + [-EnableProvisioning ] [-StopProvisioningOnError ] [-TransparentPageSharingScope ] + -NamingMethod [-NamingPattern ] [-MinReady ] [-MaximumCount ] + [-SpareCount ] [-ProvisioningTime ] [-MinimumCount ] [-SpecificNames ] + [-StartInMaintenanceMode ] [-NumUnassignedMachinesKeptPoweredOn ] [-AdContainer ] + [-NetBiosName ] [-DomainAdmin ] -CustType [-ReusePreExistingAccounts ] + [-SysPrepName ] [-PowerOffScriptName ] [-PowerOffScriptParameters ] + [-PostSynchronizationScriptName ] [-PostSynchronizationScriptParameters ] [-HvServer ] + [-WhatIf] [-Confirm] [] +``` + +### FULL_CLONE +``` +New-HVPool [-FullClone] -PoolName [-PoolDisplayName ] [-Description ] + [-AccessGroup ] [-GlobalEntitlement ] -UserAssignment + [-AutomaticAssignment ] [-Enable ] [-ConnectionServerRestrictions ] + [-Quality ] [-Throttling ] [-Vcenter ] -Template -VmFolder + -HostOrCluster -ResourcePool [-datacenter ] -Datastores + [-StorageOvercommit ] [-UseVSAN ] [-Nics ] + [-EnableProvisioning ] [-StopProvisioningOnError ] [-TransparentPageSharingScope ] + -NamingMethod [-NamingPattern ] [-MaximumCount ] [-SpareCount ] + [-ProvisioningTime ] [-MinimumCount ] [-SpecificNames ] + [-StartInMaintenanceMode ] [-NumUnassignedMachinesKeptPoweredOn ] [-NetBiosName ] + -CustType [-SysPrepName ] [-DoNotPowerOnVMsAfterCreation ] [-HvServer ] + [-WhatIf] [-Confirm] [] +``` + +### MANUAL +``` +New-HVPool [-Manual] -PoolName [-PoolDisplayName ] [-Description ] + [-AccessGroup ] [-GlobalEntitlement ] -UserAssignment + [-AutomaticAssignment ] [-Enable ] [-ConnectionServerRestrictions ] + [-allowUsersToResetMachines ] [-supportedDisplayProtocols ] + [-defaultDisplayProtocol ] [-allowUsersToChooseProtocol ] [-enableHTMLAccess ] + [-Quality ] [-Throttling ] [-Vcenter ] [-TransparentPageSharingScope ] + -Source -VM [-HvServer ] [-WhatIf] [-Confirm] [] +``` + +### RDS +``` +New-HVPool [-Rds] -PoolName [-PoolDisplayName ] [-Description ] + [-AccessGroup ] [-GlobalEntitlement ] [-Enable ] + [-ConnectionServerRestrictions ] [-Farm ] [-HvServer ] [-WhatIf] [-Confirm] + [] +``` + +### JSON_FILE +``` +New-HVPool -Spec [-PoolName ] [-PoolDisplayName ] [-Description ] + [-AccessGroup ] [-GlobalEntitlement ] [-Enable ] + [-ConnectionServerRestrictions ] [-NamingPattern ] + [-NumUnassignedMachinesKeptPoweredOn ] [-VM ] [-HvServer ] [-WhatIf] [-Confirm] + [] +``` + +### CLONED_POOL +``` +New-HVPool -ClonePool -PoolName [-PoolDisplayName ] [-Description ] + [-AccessGroup ] [-GlobalEntitlement ] [-Enable ] + [-ConnectionServerRestrictions ] [-NamingMethod ] [-NamingPattern ] + [-SpecificNames ] [-VM ] [-Farm ] [-HvServer ] [-WhatIf] [-Confirm] + [] +``` + +## DESCRIPTION +Creates new desktop pool, the type and user assignment type would be +determined based on input parameters. + +## EXAMPLES + +### EXAMPLE 1 +``` +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 2 +``` +New-HVPool -Spec C:\VMWare\Specs\LinkedClone.json -Confirm:$false +``` + +Create new automated linked clone pool by using JSON spec file + +### EXAMPLE 3 +``` +Get-HVPool -PoolName 'vmwarepool' | New-HVPool -PoolName 'clonedPool' -NamingPattern 'clonelnk1'; +``` + +(OR) +$vmwarepool = Get-HVPool -PoolName 'vmwarepool'; New-HVPool -ClonePool $vmwarepool -PoolName 'clonedPool' -NamingPattern 'clonelnk1'; +Clones new pool by using existing pool configuration + +### EXAMPLE 4 +``` +New-HVPool -InstantClone -PoolName "InsPoolvmware" -PoolDisplayName "insPool" -Description "create instant pool" -UserAssignment FLOATING -ParentVM 'Agent_vmware' -SnapshotVM 'kb-hotfix' -VmFolder 'vmware' -HostOrCluster 'CS-1' -ResourcePool 'CS-1' -NamingMethod PATTERN -Datastores 'datastore1' -NamingPattern "inspool2" -NetBiosName 'adviewdev' -DomainAdmin root +``` + +Create new automated instant clone pool with naming method pattern + +### EXAMPLE 5 +``` +New-HVPool -FullClone -PoolName "FullClone" -PoolDisplayName "FullClonePra" -Description "create full clone" -UserAssignment DEDICATED -Template 'powerCLI-VM-TEMPLATE' -VmFolder 'vmware' -HostOrCluster 'CS-1' -ResourcePool 'CS-1' -Datastores 'datastore1' -NamingMethod PATTERN -NamingPattern 'FullCln1' -SysPrepName vmwarecust -CustType SYS_PREP -NetBiosName adviewdev -DomainAdmin root +``` + +Create new automated full clone pool with naming method pattern + +### EXAMPLE 6 +``` +New-HVPool -MANUAL -PoolName 'manualVMWare' -PoolDisplayName 'MNLPUL' -Description 'Manual pool creation' -UserAssignment FLOATING -Source VIRTUAL_CENTER -VM 'PowerCLIVM1', 'PowerCLIVM2' +``` + +Create new managed manual pool from virtual center managed VirtualMachines. + +### EXAMPLE 7 +``` +New-HVPool -MANUAL -PoolName 'unmangedVMWare' -PoolDisplayName 'unMngPl' -Description 'unmanaged Manual Pool creation' -UserAssignment FLOATING -Source UNMANAGED -VM 'myphysicalmachine.vmware.com' +``` + +Create new unmanaged manual pool from unmanaged VirtualMachines. + +### EXAMPLE 8 +``` +New-HVPool -spec 'C:\Json\InstantClone.json' -PoolName 'InsPool1'-NamingPattern 'INSPool-' +``` + +Creates new instant clone pool by reading few parameters from json and few parameters from command line. + +## PARAMETERS + +### -InstantClone +Switch to Create Instant Clone pool. + +```yaml +Type: SwitchParameter +Parameter Sets: INSTANT_CLONE +Aliases: + +Required: True +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LinkedClone +Switch to Create Linked Clone pool. + +```yaml +Type: SwitchParameter +Parameter Sets: LINKED_CLONE +Aliases: + +Required: True +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -FullClone +Switch to Create Full Clone pool. + +```yaml +Type: SwitchParameter +Parameter Sets: FULL_CLONE +Aliases: + +Required: True +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Manual +Switch to Create Manual Clone pool. + +```yaml +Type: SwitchParameter +Parameter Sets: MANUAL +Aliases: + +Required: True +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Rds +Switch to Create RDS pool. + +```yaml +Type: SwitchParameter +Parameter Sets: RDS +Aliases: + +Required: True +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Spec +Path of the JSON specification file. + +```yaml +Type: String +Parameter Sets: JSON_FILE +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClonePool +Existing pool info to clone a new pool. + +```yaml +Type: Object +Parameter Sets: CLONED_POOL +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -PoolName +Name of the pool. + +```yaml +Type: String +Parameter Sets: INSTANT_CLONE, LINKED_CLONE, FULL_CLONE, MANUAL, RDS, CLONED_POOL +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +```yaml +Type: String +Parameter Sets: JSON_FILE +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PoolDisplayName +Display name of pool. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: $poolName +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Description +Description of pool. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AccessGroup +View access group can organize the desktops in the pool. +Default Value is 'Root'. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: Root +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GlobalEntitlement +Description of pool. +Global entitlement to associate the pool. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserAssignment +User Assignment type of pool. +Set to DEDICATED for dedicated desktop pool. +Set to FLOATING for floating desktop pool. + +```yaml +Type: String +Parameter Sets: INSTANT_CLONE, LINKED_CLONE, FULL_CLONE, MANUAL +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AutomaticAssignment +Automatic assignment of a user the first time they access the machine. +Applicable to dedicated desktop pool. + +```yaml +Type: Boolean +Parameter Sets: INSTANT_CLONE, LINKED_CLONE, FULL_CLONE, MANUAL +Aliases: + +Required: False +Position: Named +Default value: True +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Enable +Set true to enable the pool otherwise set to false. + +```yaml +Type: Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: True +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ConnectionServerRestrictions +Connection server restrictions. +This is a list of tags that access to the desktop is restricted to. +No list means that the desktop can be accessed from any connection server. + +```yaml +Type: String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PowerPolicy +Power policy for the machines in the desktop after logoff. +This setting is only relevant for managed machines + +```yaml +Type: String +Parameter Sets: LINKED_CLONE +Aliases: + +Required: False +Position: Named +Default value: TAKE_NO_POWER_ACTION +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AutomaticLogoffPolicy +Automatically log-off policy after disconnect. +This property has a default value of "NEVER". + +```yaml +Type: String +Parameter Sets: INSTANT_CLONE, LINKED_CLONE +Aliases: + +Required: False +Position: Named +Default value: NEVER +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AutomaticLogoffMinutes +The timeout in minutes for automatic log-off after disconnect. +This property is required if automaticLogoffPolicy is set to "AFTER". + +```yaml +Type: Int32 +Parameter Sets: INSTANT_CLONE, LINKED_CLONE +Aliases: + +Required: False +Position: Named +Default value: 120 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allowUsersToResetMachines +Whether users are allowed to reset/restart their machines. + +```yaml +Type: Boolean +Parameter Sets: INSTANT_CLONE, LINKED_CLONE, MANUAL +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allowMultipleSessionsPerUser +Whether multiple sessions are allowed per user in case of Floating User Assignment. + +```yaml +Type: Boolean +Parameter Sets: INSTANT_CLONE, LINKED_CLONE +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -deleteOrRefreshMachineAfterLogoff +Whether machines are to be deleted or refreshed after logoff in case of Floating User Assignment. + +```yaml +Type: String +Parameter Sets: INSTANT_CLONE, LINKED_CLONE +Aliases: + +Required: False +Position: Named +Default value: NEVER +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -refreshOsDiskAfterLogoff +Whether and when to refresh the OS disks for dedicated-assignment, linked-clone machines. + +```yaml +Type: String +Parameter Sets: LINKED_CLONE +Aliases: + +Required: False +Position: Named +Default value: NEVER +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -refreshPeriodDaysForReplicaOsDisk +Regular interval at which to refresh the OS disk. + +```yaml +Type: Int32 +Parameter Sets: LINKED_CLONE +Aliases: + +Required: False +Position: Named +Default value: 120 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -refreshThresholdPercentageForReplicaOsDisk +With the 'AT_SIZE' option for refreshOsDiskAfterLogoff, the size of the linked clone's OS disk in the datastore is compared to its maximum allowable size. + +```yaml +Type: Int32 +Parameter Sets: LINKED_CLONE +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -supportedDisplayProtocols +The list of supported display protocols for the desktop. + +```yaml +Type: String[] +Parameter Sets: INSTANT_CLONE, LINKED_CLONE, MANUAL +Aliases: + +Required: False +Position: Named +Default value: @('RDP', 'PCOIP', 'BLAST') +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -defaultDisplayProtocol +The default display protocol for the desktop. +For a managed desktop, this will default to "PCOIP". +For an unmanaged desktop, this will default to "RDP". + +```yaml +Type: String +Parameter Sets: INSTANT_CLONE, LINKED_CLONE, MANUAL +Aliases: + +Required: False +Position: Named +Default value: PCOIP +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allowUsersToChooseProtocol +Whether the users can choose the protocol. + +```yaml +Type: Int32 +Parameter Sets: INSTANT_CLONE, LINKED_CLONE, MANUAL +Aliases: + +Required: False +Position: Named +Default value: True +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -enableHTMLAccess +HTML Access, enabled by VMware Blast technology, allows users to connect to View machines from Web browsers. + +```yaml +Type: Boolean +Parameter Sets: INSTANT_CLONE, LINKED_CLONE, MANUAL +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -renderer3D +Specify 3D rendering dependent types hardware, software, vsphere client etc. + +```yaml +Type: String +Parameter Sets: INSTANT_CLONE, LINKED_CLONE +Aliases: + +Required: False +Position: Named +Default value: DISABLED +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -enableGRIDvGPUs +Whether GRIDvGPUs enabled or not + +```yaml +Type: Boolean +Parameter Sets: LINKED_CLONE +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -vRamSizeMB +VRAM size for View managed 3D rendering. +More VRAM can improve 3D performance. + +```yaml +Type: Int32 +Parameter Sets: LINKED_CLONE +Aliases: + +Required: False +Position: Named +Default value: 96 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -maxNumberOfMonitors +The greater these values are, the more memory will be consumed on the associated ESX hosts + +```yaml +Type: Int32 +Parameter Sets: LINKED_CLONE +Aliases: + +Required: False +Position: Named +Default value: 2 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -maxResolutionOfAnyOneMonitor +The greater these values are, the more memory will be consumed on the associated ESX hosts. + +```yaml +Type: String +Parameter Sets: LINKED_CLONE +Aliases: + +Required: False +Position: Named +Default value: WUXGA +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Quality +This setting determines the image quality that the flash movie will render. +Lower quality results in less bandwidth usage. + +```yaml +Type: String +Parameter Sets: INSTANT_CLONE, LINKED_CLONE, FULL_CLONE, MANUAL +Aliases: + +Required: False +Position: Named +Default value: NO_CONTROL +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Throttling +This setting affects the frame rate of the flash movie. +If enabled, the frames per second will be reduced based on the aggressiveness level. + +```yaml +Type: String +Parameter Sets: INSTANT_CLONE, LINKED_CLONE, FULL_CLONE, MANUAL +Aliases: + +Required: False +Position: Named +Default value: DISABLED +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -overrideGlobalSetting +Mirage configuration specified here will be used for this Desktop + +```yaml +Type: Boolean +Parameter Sets: LINKED_CLONE +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -enabled +Whether a Mirage server is enabled. + +```yaml +Type: Boolean +Parameter Sets: LINKED_CLONE +Aliases: + +Required: False +Position: Named +Default value: True +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -url +The URL of the Mirage server. +This should be in the form "\<(DNS name)|(IPv4)|(IPv6)\>\<:(port)\>". +IPv6 addresses must be enclosed in square brackets. + +```yaml +Type: String +Parameter Sets: LINKED_CLONE +Aliases: + +Required: False +Position: Named +Default value: True +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Vcenter +Virtual Center server-address (IP or FQDN) where the pool virtual machines are located. +This should be same as provided to the Connection Server while adding the vCenter server. + +```yaml +Type: String +Parameter Sets: INSTANT_CLONE, LINKED_CLONE, FULL_CLONE, MANUAL +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Template +Virtual machine Template name to clone Virtual machines. +Applicable only to Full Clone pools. + +```yaml +Type: String +Parameter Sets: FULL_CLONE +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParentVM +Parent Virtual Machine to clone Virtual machines. +Applicable only to Linked Clone and Instant Clone pools. + +```yaml +Type: String +Parameter Sets: INSTANT_CLONE, LINKED_CLONE +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SnapshotVM +Base image VM for Linked Clone pool and current Image for Instant Clone Pool. + +```yaml +Type: String +Parameter Sets: INSTANT_CLONE, LINKED_CLONE +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VmFolder +VM folder to deploy the VMs to. +Applicable to Full, Linked, Instant Clone Pools. + +```yaml +Type: String +Parameter Sets: INSTANT_CLONE, LINKED_CLONE, FULL_CLONE +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -HostOrCluster +Host or cluster to deploy the VMs in. +Applicable to Full, Linked, Instant Clone Pools. + +```yaml +Type: String +Parameter Sets: INSTANT_CLONE, LINKED_CLONE, FULL_CLONE +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourcePool +Resource pool to deploy the VMs. +Applicable to Full, Linked, Instant Clone Pools. + +```yaml +Type: String +Parameter Sets: INSTANT_CLONE, LINKED_CLONE, FULL_CLONE +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -datacenter +desktopSpec.automatedDesktopSpec.virtualCenterProvisioningSettings.virtualCenterProvisioningData.datacenter if LINKED_CLONE, INSTANT_CLONE, FULL_CLONE + +```yaml +Type: String +Parameter Sets: INSTANT_CLONE, LINKED_CLONE, FULL_CLONE +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Datastores +Datastore names to store the VM +Applicable to Full, Linked, Instant Clone Pools. + +```yaml +Type: String[] +Parameter Sets: INSTANT_CLONE, LINKED_CLONE, FULL_CLONE +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StorageOvercommit +Storage overcommit determines how View places new VMs on the selected datastores. +Supported values are 'UNBOUNDED','AGGRESSIVE','MODERATE','CONSERVATIVE','NONE' and are case sensitive. + +```yaml +Type: String[] +Parameter Sets: INSTANT_CLONE, LINKED_CLONE, FULL_CLONE +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UseVSAN +Whether to use vSphere VSAN. +This is applicable for vSphere 5.5 or later. +Applicable to Full, Linked, Instant Clone Pools. + +```yaml +Type: Boolean +Parameter Sets: INSTANT_CLONE, LINKED_CLONE, FULL_CLONE +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UseSeparateDatastoresReplicaAndOSDisks +Whether to use separate datastores for replica and OS disks. + +```yaml +Type: Boolean +Parameter Sets: INSTANT_CLONE, LINKED_CLONE +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ReplicaDiskDatastore +Datastore to store replica disks for View Composer and Instant clone engine sourced machines. + +```yaml +Type: String +Parameter Sets: INSTANT_CLONE, LINKED_CLONE +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UseNativeSnapshots +Native NFS Snapshots is a hardware feature, specify whether to use or not + +```yaml +Type: Boolean +Parameter Sets: INSTANT_CLONE, LINKED_CLONE +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ReclaimVmDiskSpace +virtual machines can be configured to use a space efficient disk format that supports reclamation of unused disk space. + +```yaml +Type: Boolean +Parameter Sets: INSTANT_CLONE, LINKED_CLONE +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ReclamationThresholdGB +Initiate reclamation when unused space on VM exceeds the threshold. + +```yaml +Type: Int32 +Parameter Sets: LINKED_CLONE +Aliases: + +Required: False +Position: Named +Default value: 1 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RedirectWindowsProfile +Windows profiles will be redirected to persistent disks, which are not affected by View Composer operations such as refresh, recompose and rebalance. + +```yaml +Type: Boolean +Parameter Sets: INSTANT_CLONE, LINKED_CLONE +Aliases: + +Required: False +Position: Named +Default value: True +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UseSeparateDatastoresPersistentAndOSDisks +Whether to use separate datastores for persistent and OS disks. +This must be false if redirectWindowsProfile is false. + +```yaml +Type: Boolean +Parameter Sets: LINKED_CLONE +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PersistentDiskDatastores +Name of the Persistent disk datastore + +```yaml +Type: String[] +Parameter Sets: LINKED_CLONE +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PersistentDiskStorageOvercommit +Storage overcommit determines how view places new VMs on the selected datastores. +Supported values are 'UNBOUNDED','AGGRESSIVE','MODERATE','CONSERVATIVE','NONE' and are case sensitive. + +```yaml +Type: String[] +Parameter Sets: LINKED_CLONE +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DiskSizeMB +Size of the persistent disk in MB. + +```yaml +Type: Int32 +Parameter Sets: LINKED_CLONE +Aliases: + +Required: False +Position: Named +Default value: 2048 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DiskDriveLetter +Persistent disk drive letter. + +```yaml +Type: String +Parameter Sets: LINKED_CLONE +Aliases: + +Required: False +Position: Named +Default value: D +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -redirectDisposableFiles +Redirect disposable files to a non-persistent disk that will be deleted automatically when a user's session ends. + +```yaml +Type: Boolean +Parameter Sets: LINKED_CLONE +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NonPersistentDiskSizeMB +Size of the non persistent disk in MB. + +```yaml +Type: Int32 +Parameter Sets: LINKED_CLONE +Aliases: + +Required: False +Position: Named +Default value: 4096 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NonPersistentDiskDriveLetter +Non persistent disk drive letter. + +```yaml +Type: String +Parameter Sets: LINKED_CLONE +Aliases: + +Required: False +Position: Named +Default value: Auto +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UseViewStorageAccelerator +Whether to use View Storage Accelerator. + +```yaml +Type: Boolean +Parameter Sets: LINKED_CLONE +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ViewComposerDiskTypes +Disk types to enable for the View Storage Accelerator feature. + +```yaml +Type: String +Parameter Sets: LINKED_CLONE +Aliases: + +Required: False +Position: Named +Default value: OS_DISKS +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RegenerateViewStorageAcceleratorDays +How often to regenerate the View Storage Accelerator cache. + +```yaml +Type: Int32 +Parameter Sets: LINKED_CLONE +Aliases: + +Required: False +Position: Named +Default value: 7 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -BlackoutTimes +A list of blackout times. + +```yaml +Type: DesktopBlackoutTime[] +Parameter Sets: LINKED_CLONE +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Nics +desktopSpec.automatedDesktopSpec.virtualCenterProvisioningSettings.virtualCenterNetworkingSettings.nics + +```yaml +Type: DesktopNetworkInterfaceCardSettings[] +Parameter Sets: INSTANT_CLONE, LINKED_CLONE, FULL_CLONE +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -EnableProvisioning +desktopSpec.automatedDesktopSpec.virtualCenterProvisioningSettings.enableProvsioning if LINKED_CLONE, INSTANT_CLONE, FULL_CLONE + +```yaml +Type: Boolean +Parameter Sets: INSTANT_CLONE, LINKED_CLONE, FULL_CLONE +Aliases: + +Required: False +Position: Named +Default value: True +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StopProvisioningOnError +Set to true to stop provisioning of all VMs on error. +Applicable to Full, Linked, Instant Clone Pools. + +```yaml +Type: Boolean +Parameter Sets: INSTANT_CLONE, LINKED_CLONE, FULL_CLONE +Aliases: + +Required: False +Position: Named +Default value: True +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TransparentPageSharingScope +The transparent page sharing scope. +The default value is 'VM'. + +```yaml +Type: String +Parameter Sets: INSTANT_CLONE, LINKED_CLONE, FULL_CLONE, MANUAL +Aliases: + +Required: False +Position: Named +Default value: VM +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NamingMethod +Determines how the VMs in the desktop are named. +Set SPECIFIED to use specific name. +Set PATTERN to use naming pattern. +The default value is PATTERN. +For Instant Clone pool the value must be PATTERN. + +```yaml +Type: String +Parameter Sets: INSTANT_CLONE, LINKED_CLONE, FULL_CLONE +Aliases: + +Required: True +Position: Named +Default value: PATTERN +Accept pipeline input: False +Accept wildcard characters: False +``` + +```yaml +Type: String +Parameter Sets: CLONED_POOL +Aliases: + +Required: False +Position: Named +Default value: PATTERN +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NamingPattern +Virtual machines will be named according to the specified naming pattern. +Value would be considered only when $namingMethod = PATTERN. +The default value is poolName + '{n:fixed=4}'. + +```yaml +Type: String +Parameter Sets: INSTANT_CLONE, LINKED_CLONE, FULL_CLONE, JSON_FILE, CLONED_POOL +Aliases: + +Required: False +Position: Named +Default value: $poolName + '{n:fixed=4}' +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MinReady +Minimum number of ready (provisioned) machines during View Composer maintenance operations. +The default value is 0. +Applicable to Linked Clone Pools. + +```yaml +Type: Int32 +Parameter Sets: LINKED_CLONE +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaximumCount +Maximum number of machines in the pool. +The default value is 1. +Applicable to Full, Linked, Instant Clone Pools + +```yaml +Type: Int32 +Parameter Sets: INSTANT_CLONE, LINKED_CLONE, FULL_CLONE +Aliases: + +Required: False +Position: Named +Default value: 1 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SpareCount +Number of spare powered on machines in the pool. +The default value is 1. +Applicable to Full, Linked, Instant Clone Pools. + +```yaml +Type: Int32 +Parameter Sets: INSTANT_CLONE, LINKED_CLONE, FULL_CLONE +Aliases: + +Required: False +Position: Named +Default value: 1 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProvisioningTime +Determines when machines are provisioned. +Supported values are ON_DEMAND, UP_FRONT. +The default value is UP_FRONT. +Applicable to Full, Linked, Instant Clone Pools. + +```yaml +Type: String +Parameter Sets: INSTANT_CLONE, LINKED_CLONE, FULL_CLONE +Aliases: + +Required: False +Position: Named +Default value: UP_FRONT +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MinimumCount +The minimum number of machines to have provisioned if on demand provisioning is selected. +The default value is 0. +Applicable to Full, Linked, Instant Clone Pools. + +```yaml +Type: Int32 +Parameter Sets: INSTANT_CLONE, LINKED_CLONE, FULL_CLONE +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SpecificNames +Specified names of VMs in the pool. +The default value is \-1 +Applicable to Full, Linked and Cloned Pools. + +```yaml +Type: String[] +Parameter Sets: INSTANT_CLONE, LINKED_CLONE, FULL_CLONE, CLONED_POOL +Aliases: + +Required: False +Position: Named +Default value: $poolName + '-1' +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StartInMaintenanceMode +Set this to true to allow virtual machines to be customized manually before users can log +in and access them. +the default value is false +Applicable to Full, Linked, Instant Clone Pools. + +```yaml +Type: Boolean +Parameter Sets: INSTANT_CLONE, LINKED_CLONE, FULL_CLONE +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NumUnassignedMachinesKeptPoweredOn +Number of unassigned machines kept powered on. +value should be less than max number of vms in the pool. +The default value is 1. +Applicable to Full, Linked, Instant Clone Pools. +When JSON Spec file is used for pool creation, the value will be read from JSON spec. + +```yaml +Type: Int32 +Parameter Sets: INSTANT_CLONE, LINKED_CLONE, FULL_CLONE, JSON_FILE +Aliases: + +Required: False +Position: Named +Default value: 1 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AdContainer +This is the Active Directory container which the machines will be added to upon creation. +The default value is 'CN=Computers'. +Applicable to Instant Clone Pool. + +```yaml +Type: Object +Parameter Sets: INSTANT_CLONE, LINKED_CLONE +Aliases: + +Required: False +Position: Named +Default value: CN=Computers +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NetBiosName +Domain Net Bios Name. +Applicable to Full, Linked, Instant Clone Pools. + +```yaml +Type: String +Parameter Sets: INSTANT_CLONE +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +```yaml +Type: String +Parameter Sets: LINKED_CLONE, FULL_CLONE +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DomainAdmin +Domain Administrator user name which will be used to join the domain. +Default value is null. +Applicable to Full, Linked, Instant Clone Pools. + +```yaml +Type: String +Parameter Sets: INSTANT_CLONE, LINKED_CLONE +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CustType +Type of customization to use. +Supported values are 'CLONE_PREP','QUICK_PREP','SYS_PREP','NONE'. +Applicable to Full, Linked Clone Pools. + +```yaml +Type: String +Parameter Sets: LINKED_CLONE, FULL_CLONE +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ReusePreExistingAccounts +desktopSpec.automatedDesktopSpec.customizationSettings.reusePreExistingAccounts if LINKED_CLONE, INSTANT_CLONE + +```yaml +Type: Boolean +Parameter Sets: INSTANT_CLONE, LINKED_CLONE +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SysPrepName +The customization spec to use. +Applicable to Full, Linked Clone Pools. + +```yaml +Type: String +Parameter Sets: LINKED_CLONE, FULL_CLONE +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DoNotPowerOnVMsAfterCreation +desktopSpec.automatedDesktopSpec.customizationSettings.noCustomizationSettings.doNotPowerOnVMsAfterCreation if FULL_CLONE + +```yaml +Type: Boolean +Parameter Sets: FULL_CLONE +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PowerOffScriptName +Power off script. +ClonePrep/QuickPrep can run a customization script on instant/linked clone machines before they are powered off. +Provide the path to the script on the parent virtual machine. +Applicable to Linked, Instant Clone pools. + +```yaml +Type: String +Parameter Sets: INSTANT_CLONE, LINKED_CLONE +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PowerOffScriptParameters +Power off script parameters. +Example: p1 p2 p3 +Applicable to Linked, Instant Clone pools. + +```yaml +Type: String +Parameter Sets: INSTANT_CLONE, LINKED_CLONE +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PostSynchronizationScriptName +Post synchronization script. +ClonePrep/QuickPrep can run a customization script on instant/linked clone machines after they are created or recovered or a new image is pushed. +Provide the path to the script on the parent virtual machine. +Applicable to Linked, Instant Clone pools. + +```yaml +Type: String +Parameter Sets: INSTANT_CLONE, LINKED_CLONE +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PostSynchronizationScriptParameters +Post synchronization script parameters. +Example: p1 p2 p3 +Applicable to Linked, Instant Clone pools. + +```yaml +Type: String +Parameter Sets: INSTANT_CLONE, LINKED_CLONE +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Source +Source of the Virtual machines for manual pool. +Supported values are 'VIRTUAL_CENTER','UNMANAGED'. +Set VIRTUAL_CENTER for vCenter managed VMs. +Set UNMANAGED for Physical machines or VMs which are not vCenter managed VMs. +Applicable to Manual Pools. + +```yaml +Type: String +Parameter Sets: MANUAL +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VM +List of existing virtual machine names to add into manual pool. +Applicable to Manual Pools. + +```yaml +Type: String[] +Parameter Sets: MANUAL +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +```yaml +Type: String[] +Parameter Sets: JSON_FILE, CLONED_POOL +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Farm +Farm to create RDS pools +Applicable to RDS Pools. + +```yaml +Type: String +Parameter Sets: RDS, CLONED_POOL +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 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: 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 diff --git a/Modules/VMware.Hv.Helper/docs/New-HVPreInstalledApplication.md b/Modules/VMware.Hv.Helper/docs/New-HVPreInstalledApplication.md new file mode 100755 index 0000000..f16e44f --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/New-HVPreInstalledApplication.md @@ -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 [-ApplicationID ] [-DisplayName ] + -FarmName [-EnablePreLaunch ] [-ConnectionServerRestrictions ] + [-CategoryFolderName ] [-clientRestrictions ] [-HvServer ] [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/New-HVSite.md b/Modules/VMware.Hv.Helper/docs/New-HVSite.md new file mode 100755 index 0000000..d03f09a --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/New-HVSite.md @@ -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] [-description] [[-HvServer] ] [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Register-HVPod.md b/Modules/VMware.Hv.Helper/docs/Register-HVPod.md new file mode 100755 index 0000000..aec026e --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Register-HVPod.md @@ -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] [-ADUserName] [-ADpassword] + [[-HvServer] ] [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Remove-HVApplication.md b/Modules/VMware.Hv.Helper/docs/Remove-HVApplication.md new file mode 100755 index 0000000..0ffbff5 --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Remove-HVApplication.md @@ -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] [[-HvServer] ] [-WhatIf] [-Confirm] + [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Remove-HVApplicationIcon.md b/Modules/VMware.Hv.Helper/docs/Remove-HVApplicationIcon.md new file mode 100755 index 0000000..dd24741 --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Remove-HVApplicationIcon.md @@ -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] [[-HvServer] ] [-WhatIf] [-Confirm] + [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Remove-HVEntitlement.md b/Modules/VMware.Hv.Helper/docs/Remove-HVEntitlement.md new file mode 100755 index 0000000..a206522 --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Remove-HVEntitlement.md @@ -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] [-ResourceName] [[-Type] ] [[-ResourceType] ] + [[-HvServer] ] [-WhatIf] [-Confirm] [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Remove-HVFarm.md b/Modules/VMware.Hv.Helper/docs/Remove-HVFarm.md new file mode 100755 index 0000000..f0c1215 --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Remove-HVFarm.md @@ -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 [-HvServer ] [-WhatIf] [-Confirm] [] +``` + +### pipeline +``` +Remove-HVFarm -Farm [-HvServer ] [-WhatIf] [-Confirm] [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Remove-HVGlobalEntitlement.md b/Modules/VMware.Hv.Helper/docs/Remove-HVGlobalEntitlement.md new file mode 100755 index 0000000..f75dc71 --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Remove-HVGlobalEntitlement.md @@ -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 [-HvServer ] [-WhatIf] [-Confirm] [] +``` + +### pipeline +``` +Remove-HVGlobalEntitlement -GlobalEntitlement [-HvServer ] [-WhatIf] [-Confirm] + [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Remove-HVMachine.md b/Modules/VMware.Hv.Helper/docs/Remove-HVMachine.md new file mode 100755 index 0000000..e700875 --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Remove-HVMachine.md @@ -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] [-DeleteFromDisk] [[-HVServer] ] [-WhatIf] [-Confirm] + [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Remove-HVPodFederation.md b/Modules/VMware.Hv.Helper/docs/Remove-HVPodFederation.md new file mode 100755 index 0000000..a401fe9 --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Remove-HVPodFederation.md @@ -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] ] [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Remove-HVPool.md b/Modules/VMware.Hv.Helper/docs/Remove-HVPool.md new file mode 100755 index 0000000..c75ef63 --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Remove-HVPool.md @@ -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 [-TerminateSession] [-DeleteFromDisk] [-HvServer ] [-WhatIf] + [-Confirm] [] +``` + +### pipeline +``` +Remove-HVPool [-Pool ] [-TerminateSession] [-DeleteFromDisk] [-HvServer ] [-WhatIf] [-Confirm] + [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Remove-HVSite.md b/Modules/VMware.Hv.Helper/docs/Remove-HVSite.md new file mode 100755 index 0000000..dec2494 --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Remove-HVSite.md @@ -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] [[-HvServer] ] [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Reset-HVMachine.md b/Modules/VMware.Hv.Helper/docs/Reset-HVMachine.md new file mode 100755 index 0000000..d488735 --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Reset-HVMachine.md @@ -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] [[-HvServer] ] [-WhatIf] [-Confirm] [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Set-HVApplication.md b/Modules/VMware.Hv.Helper/docs/Set-HVApplication.md new file mode 100755 index 0000000..ec6b216 --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Set-HVApplication.md @@ -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 ] [-Name] [-DisplayName ] [-Description ] + [-ExecutablePath ] [-Version ] [-Publisher ] [-Enabled ] + [-EnablePreLaunch ] [-ConnectionServerRestrictions ] [-CategoryFolderName ] + [-clientRestrictions ] [-ShortcutLocations ] [-StartFolder ] [-Args ] + [-AutoUpdateFileTypes ] [-AutoUpdateOtherFileTypes ] + [-GlobalApplicationEntitlement ] [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Set-HVApplicationIcon.md b/Modules/VMware.Hv.Helper/docs/Set-HVApplicationIcon.md new file mode 100755 index 0000000..854ece7 --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Set-HVApplicationIcon.md @@ -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] [-IconPath] [[-HvServer] ] [-WhatIf] + [-Confirm] [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Set-HVEventDatabase.md b/Modules/VMware.Hv.Helper/docs/Set-HVEventDatabase.md new file mode 100755 index 0000000..aaf7334 --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Set-HVEventDatabase.md @@ -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] [[-DatabaseType] ] [[-DatabasePort] ] + [-DatabaseName] [[-TablePrefix] ] [-UserName] [-password] + [[-eventtime] ] [[-eventnewtime] ] [[-HvServer] ] [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Set-HVFarm.md b/Modules/VMware.Hv.Helper/docs/Set-HVFarm.md new file mode 100755 index 0000000..1ff858f --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Set-HVFarm.md @@ -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 [-Enable] [-Disable] [-Start] [-Stop] [-Key ] [-Value ] + [-Spec ] [-HvServer ] [-WhatIf] [-Confirm] [] +``` + +### pipeline +``` +Set-HVFarm [-Farm ] [-Enable] [-Disable] [-Start] [-Stop] [-Key ] [-Value ] + [-Spec ] [-HvServer ] [-WhatIf] [-Confirm] [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Set-HVGlobalEntitlement.md b/Modules/VMware.Hv.Helper/docs/Set-HVGlobalEntitlement.md new file mode 100755 index 0000000..99ec97b --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Set-HVGlobalEntitlement.md @@ -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 [-Key ] [-Value ] [-Spec ] [-Enable] + [-Disable] [-enableHTMLAccess ] [-HvServer ] [-WhatIf] [-Confirm] [] +``` + +### pipeline +``` +Set-HVGlobalEntitlement [-GlobalEntitlements ] [-Key ] [-Value ] [-Spec ] + [-Enable] [-Disable] [-enableHTMLAccess ] [-HvServer ] [-WhatIf] [-Confirm] + [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Set-HVGlobalSettings.md b/Modules/VMware.Hv.Helper/docs/Set-HVGlobalSettings.md new file mode 100755 index 0000000..63a7817 --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Set-HVGlobalSettings.md @@ -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] ] [[-Value] ] [[-Spec] ] + [[-clientMaxSessionTimePolicy] ] [[-clientMaxSessionTimeMinutes] ] + [[-clientIdleSessionTimeoutPolicy] ] [[-clientIdleSessionTimeoutMinutes] ] + [[-clientSessionTimeoutMinutes] ] [[-desktopSSOTimeoutPolicy] ] + [[-desktopSSOTimeoutMinutes] ] [[-applicationSSOTimeoutPolicy] ] + [[-applicationSSOTimeoutMinutes] ] [[-viewAPISessionTimeoutMinutes] ] + [[-preLoginMessage] ] [[-displayWarningBeforeForcedLogoff] ] + [[-forcedLogoffTimeoutMinutes] ] [[-forcedLogoffMessage] ] + [[-enableServerInSingleUserMode] ] [[-storeCALOnBroker] ] [[-storeCALOnClient] ] + [[-reauthSecureTunnelAfterInterruption] ] [[-messageSecurityMode] ] + [[-enableIPSecForSecurityServerPairing] ] [[-HvServer] ] [-WhatIf] [-Confirm] + [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Set-HVInstantCloneMaintenance.md b/Modules/VMware.Hv.Helper/docs/Set-HVInstantCloneMaintenance.md new file mode 100755 index 0000000..c168004 --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Set-HVInstantCloneMaintenance.md @@ -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] [-Enable] [-Disable] [-HvServer ] [-WhatIf] [-Confirm] + [] +``` + +## 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 \ -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 diff --git a/Modules/VMware.Hv.Helper/docs/Set-HVMachine.md b/Modules/VMware.Hv.Helper/docs/Set-HVMachine.md new file mode 100755 index 0000000..5a2d9f1 --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Set-HVMachine.md @@ -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 [-Maintenance ] [-Key ] [-Value ] [-User ] + [-HvServer ] [-WhatIf] [-Confirm] [] +``` + +### pipeline +``` +Set-HVMachine -Machine [-Maintenance ] [-Key ] [-Value ] [-User ] + [-HvServer ] [-WhatIf] [-Confirm] [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Set-HVPodFederation.md b/Modules/VMware.Hv.Helper/docs/Set-HVPodFederation.md new file mode 100755 index 0000000..57cf267 --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Set-HVPodFederation.md @@ -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] [[-HvServer] ] [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Set-HVPool.md b/Modules/VMware.Hv.Helper/docs/Set-HVPool.md new file mode 100755 index 0000000..98fb92f --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Set-HVPool.md @@ -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 [-Enable] [-Disable] [-Start] [-Stop] [-Key ] [-Value ] + [-Spec ] [-globalEntitlement ] [-ResourcePool ] [-clearGlobalEntitlement] + [-allowUsersToChooseProtocol ] [-enableHTMLAccess ] [-HvServer ] [-WhatIf] + [-Confirm] [] +``` + +### pipeline +``` +Set-HVPool [-Pool ] [-Enable] [-Disable] [-Start] [-Stop] [-Key ] [-Value ] + [-Spec ] [-globalEntitlement ] [-ResourcePool ] [-clearGlobalEntitlement] + [-allowUsersToChooseProtocol ] [-enableHTMLAccess ] [-HvServer ] [-WhatIf] + [-Confirm] [] +``` + +## 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 \ | + +===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 diff --git a/Modules/VMware.Hv.Helper/docs/Set-HVSite.md b/Modules/VMware.Hv.Helper/docs/Set-HVSite.md new file mode 100755 index 0000000..2783be4 --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Set-HVSite.md @@ -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] [-name] [-description] [[-HvServer] ] + [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Set-HVlicense.md b/Modules/VMware.Hv.Helper/docs/Set-HVlicense.md new file mode 100755 index 0000000..8683099 --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Set-HVlicense.md @@ -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] [[-HvServer] ] [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Start-HVFarm.md b/Modules/VMware.Hv.Helper/docs/Start-HVFarm.md new file mode 100755 index 0000000..4c8cfaf --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Start-HVFarm.md @@ -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 [-Recompose] [-StartTime ] -LogoffSetting + [-StopOnFirstError ] [-Servers ] -ParentVM -SnapshotVM + [-Vcenter ] [-HvServer ] [-WhatIf] [-Confirm] [] +``` + +### SCHEDULEMAINTENANCE +``` +Start-HVFarm -Farm [-ScheduleMaintenance] [-StartTime ] [-LogoffSetting ] + [-StopOnFirstError ] [-ParentVM ] [-SnapshotVM ] [-Vcenter ] + -MaintenanceMode [-MaintenanceStartTime ] [-MaintenancePeriod ] [-StartInt ] + [-EveryInt ] [-HvServer ] [-WhatIf] [-Confirm] [] +``` + +### CANCELMAINTENANCE +``` +Start-HVFarm -Farm [-CancelMaintenance] -MaintenanceMode [-HvServer ] [-WhatIf] + [-Confirm] [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Start-HVPool.md b/Modules/VMware.Hv.Helper/docs/Start-HVPool.md new file mode 100755 index 0000000..ebd1258 --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Start-HVPool.md @@ -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 [-Refresh] [-StartTime ] -LogoffSetting + [-StopOnFirstError ] [-Machines ] [-HvServer ] [-WhatIf] [-Confirm] + [] +``` + +### RECOMPOSE +``` +Start-HVPool -Pool [-Recompose] [-StartTime ] -LogoffSetting + [-StopOnFirstError ] [-Machines ] -ParentVM -SnapshotVM + [-Vcenter ] [-HvServer ] [-WhatIf] [-Confirm] [] +``` + +### REBALANCE +``` +Start-HVPool -Pool [-Rebalance] [-StartTime ] -LogoffSetting + [-StopOnFirstError ] [-Machines ] [-HvServer ] [-WhatIf] [-Confirm] + [] +``` + +### PUSH_IMAGE +``` +Start-HVPool -Pool [-SchedulePushImage] [-StartTime ] [-LogoffSetting ] + [-StopOnFirstError ] [-ParentVM ] [-SnapshotVM ] [-Vcenter ] + [-HvServer ] [-WhatIf] [-Confirm] [] +``` + +### CANCEL_PUSH_IMAGE +``` +Start-HVPool -Pool [-CancelPushImage] [-HvServer ] [-WhatIf] [-Confirm] [] +``` + +## 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 diff --git a/Modules/VMware.Hv.Helper/docs/Unregister-HVPod.md b/Modules/VMware.Hv.Helper/docs/Unregister-HVPod.md new file mode 100755 index 0000000..0c4bccc --- /dev/null +++ b/Modules/VMware.Hv.Helper/docs/Unregister-HVPod.md @@ -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] [[-force] ] [[-HvServer] ] [] +``` + +## 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 From b940759bbfc30ca9ee87abe951ff4cb7028263ae Mon Sep 17 00:00:00 2001 From: William Lam Date: Thu, 6 Feb 2020 13:00:55 -0800 Subject: [PATCH 11/21] Retrieve VCSA Password Policy --- .../VCSAPasswordPolicy.psm1 | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 Modules/VCSAPasswordPolicy/VCSAPasswordPolicy.psm1 diff --git a/Modules/VCSAPasswordPolicy/VCSAPasswordPolicy.psm1 b/Modules/VCSAPasswordPolicy/VCSAPasswordPolicy.psm1 new file mode 100644 index 0000000..55963ca --- /dev/null +++ b/Modules/VCSAPasswordPolicy/VCSAPasswordPolicy.psm1 @@ -0,0 +1,39 @@ +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" + } +} \ No newline at end of file From a70e3242827752d1af344c4adef3eee1dffcb14d Mon Sep 17 00:00:00 2001 From: William Lam Date: Sat, 8 Feb 2020 06:44:01 -0800 Subject: [PATCH 12/21] VyOS Automation --- Modules/VyOS/VyOS.psm1 | 271 +++++++++++++++++++++++++++++++++++++ Modules/VyOS/vyos.template | 64 +++++++++ 2 files changed, 335 insertions(+) create mode 100644 Modules/VyOS/VyOS.psm1 create mode 100644 Modules/VyOS/vyos.template diff --git a/Modules/VyOS/VyOS.psm1 b/Modules/VyOS/VyOS.psm1 new file mode 100644 index 0000000..31fbc0d --- /dev/null +++ b/Modules/VyOS/VyOS.psm1 @@ -0,0 +1,271 @@ +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-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 WAN Interface (eth0) + .PARAMETER ManagementGateway + The Gateway Addrss of the WAN 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.155/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, + [Switch]$Troubleshoot + ) + + # Login to console and install VyOS before starting configuration + if(-Not $Troubleshoot) { + 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 "configure" -ReturnCarriage $true + Start-Sleep -Seconds 1 + } + + 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 + } + } + } + +} \ No newline at end of file diff --git a/Modules/VyOS/vyos.template b/Modules/VyOS/vyos.template new file mode 100644 index 0000000..df42ad8 --- /dev/null +++ b/Modules/VyOS/vyos.template @@ -0,0 +1,64 @@ +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 + From 5d570cb0dfcddbb938b9d8feec5cc655cacbde7f Mon Sep 17 00:00:00 2001 From: William Lam Date: Sat, 8 Feb 2020 06:44:01 -0800 Subject: [PATCH 13/21] VyOS Automation Signed-off-by: William Lam --- Modules/VyOS/VyOS.psm1 | 271 +++++++++++++++++++++++++++++++++++++ Modules/VyOS/vyos.template | 64 +++++++++ 2 files changed, 335 insertions(+) create mode 100644 Modules/VyOS/VyOS.psm1 create mode 100644 Modules/VyOS/vyos.template diff --git a/Modules/VyOS/VyOS.psm1 b/Modules/VyOS/VyOS.psm1 new file mode 100644 index 0000000..31fbc0d --- /dev/null +++ b/Modules/VyOS/VyOS.psm1 @@ -0,0 +1,271 @@ +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-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 WAN Interface (eth0) + .PARAMETER ManagementGateway + The Gateway Addrss of the WAN 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.155/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, + [Switch]$Troubleshoot + ) + + # Login to console and install VyOS before starting configuration + if(-Not $Troubleshoot) { + 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 "configure" -ReturnCarriage $true + Start-Sleep -Seconds 1 + } + + 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 + } + } + } + +} \ No newline at end of file diff --git a/Modules/VyOS/vyos.template b/Modules/VyOS/vyos.template new file mode 100644 index 0000000..df42ad8 --- /dev/null +++ b/Modules/VyOS/vyos.template @@ -0,0 +1,64 @@ +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 + From 41f6194fdb49e465cec4b6e2255625c0d24929a9 Mon Sep 17 00:00:00 2001 From: William Lam Date: Sun, 9 Feb 2020 08:08:01 -0800 Subject: [PATCH 14/21] Updated VyOS Module --- Modules/VyOS/VyOS.psm1 | 123 +++++++++++++++++++++++++++---------- Modules/VyOS/vyos.template | 4 +- 2 files changed, 94 insertions(+), 33 deletions(-) diff --git a/Modules/VyOS/VyOS.psm1 b/Modules/VyOS/VyOS.psm1 index 31fbc0d..4c1c952 100644 --- a/Modules/VyOS/VyOS.psm1 +++ b/Modules/VyOS/VyOS.psm1 @@ -136,6 +136,62 @@ Function Set-VMKeystrokes { $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 @@ -154,9 +210,9 @@ Function New-VyOSConfiguration { .PARAMETER ConfigFile The path to VyOS configuration file .PARAMETER ManagementAddress - The IP Address of the WAN Interface (eth0) + The IP Address of the OUTSIDE Interface (eth0) .PARAMETER ManagementGateway - The Gateway Addrss of the WAN Interface (eth0) + The Gateway Addrss of the OUTSIDE Interface (eth0) .PARAMETER ManagementDNSDomain The DNS Domain on the WAN network .PARAMETER ManagementDNSServer @@ -164,7 +220,7 @@ Function New-VyOSConfiguration { .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.155/24 -ManagementGateway 192.168.30.1 -ManagementDNSDomain primp-industries.com -ManagementDNSServer 192.168.30.2 -ManagementJumpHostIP 192.168.30.199 -ManagementPassword VMware1! + 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, @@ -174,38 +230,12 @@ Function New-VyOSConfiguration { [Parameter(Mandatory=$true)][String]$ManagementDNSDomain, [Parameter(Mandatory=$true)][String]$ManagementDNSServer, [Parameter(Mandatory=$true)][String]$ManagementJumpHostIP, - [Parameter(Mandatory=$true)][String]$ManagementPassword, - [Switch]$Troubleshoot + [Parameter(Mandatory=$true)][String]$ManagementPassword ) # Login to console and install VyOS before starting configuration - if(-Not $Troubleshoot) { - 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 "configure" -ReturnCarriage $true - Start-Sleep -Seconds 1 - } + 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]')) { @@ -268,4 +298,33 @@ Function New-VyOSConfiguration { } } + <# + # 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 + #> } \ No newline at end of file diff --git a/Modules/VyOS/vyos.template b/Modules/VyOS/vyos.template index df42ad8..023ec46 100644 --- a/Modules/VyOS/vyos.template +++ b/Modules/VyOS/vyos.template @@ -1,3 +1,5 @@ +configure + set service ssh port 22 set interfaces ethernet eth0 address '[MANAGEMENT_ADDRESS]' @@ -61,4 +63,4 @@ set nat source rule 40 translation address masquerade commit save - +exit \ No newline at end of file From e45aa0171dd868cd79b4b66b88baf32fd9dcb8f2 Mon Sep 17 00:00:00 2001 From: bfett20 <59446956+bfett20@users.noreply.github.com> Date: Mon, 24 Feb 2020 06:24:44 -0600 Subject: [PATCH 15/21] Create stale.yml --- .github/workflows/stale.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/stale.yml diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 0000000..7bbc050 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,19 @@ +name: Mark stale issues and pull requests + +on: + schedule: + - cron: "0 0 * * *" + +jobs: + stale: + + runs-on: ubuntu-latest + + steps: + - uses: actions/stale@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-issue-message: 'Stale issue message' + stale-pr-message: 'Stale pull request message' + stale-issue-label: 'no-issue-activity' + stale-pr-label: 'no-pr-activity' From 233c220dd67be91bb9aa812532f3ee7da3fa8797 Mon Sep 17 00:00:00 2001 From: bfett20 <59446956+bfett20@users.noreply.github.com> Date: Mon, 24 Feb 2020 06:30:39 -0600 Subject: [PATCH 16/21] Update VMware.Hv.Helper Added "clearGlobalEntitlement" switch to Set-HVApplication --- Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1 b/Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1 index 89e3dfc..180f916 100644 --- a/Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1 +++ b/Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1 @@ -12683,6 +12683,9 @@ param ( [Parameter(Mandatory = $False)] [String]$GlobalApplicationEntitlement = $null + + [Parameter(Mandatory = $false)] + [switch]$clearGlobalEntitlement ) begin { $services = Get-ViewAPIService -HvServer $HvServer @@ -12762,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) From 926260096f7b8a9e3b26a51f49fd495f1f6b7e57 Mon Sep 17 00:00:00 2001 From: bfett20 <59446956+bfett20@users.noreply.github.com> Date: Mon, 24 Feb 2020 06:40:29 -0600 Subject: [PATCH 17/21] Delete stale.yml --- .github/workflows/stale.yml | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 .github/workflows/stale.yml diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml deleted file mode 100644 index 7bbc050..0000000 --- a/.github/workflows/stale.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Mark stale issues and pull requests - -on: - schedule: - - cron: "0 0 * * *" - -jobs: - stale: - - runs-on: ubuntu-latest - - steps: - - uses: actions/stale@v1 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - stale-issue-message: 'Stale issue message' - stale-pr-message: 'Stale pull request message' - stale-issue-label: 'no-issue-activity' - stale-pr-label: 'no-pr-activity' From aa8d5e3c261625cdd4bf536088671d7074177cd2 Mon Sep 17 00:00:00 2001 From: William Lam Date: Fri, 28 Feb 2020 08:51:45 -0800 Subject: [PATCH 18/21] List VCSA Identity Source --- .../VCSAIdentitySource.psm1 | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Modules/VCSAIdentitySource/VCSAIdentitySource.psm1 diff --git a/Modules/VCSAIdentitySource/VCSAIdentitySource.psm1 b/Modules/VCSAIdentitySource/VCSAIdentitySource.psm1 new file mode 100644 index 0000000..596cab1 --- /dev/null +++ b/Modules/VCSAIdentitySource/VCSAIdentitySource.psm1 @@ -0,0 +1,28 @@ +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" + } +} \ No newline at end of file From f3c549a8671644e1fa513076dba998ba994f0007 Mon Sep 17 00:00:00 2001 From: William Lam Date: Fri, 28 Feb 2020 10:34:01 -0800 Subject: [PATCH 19/21] Consolidated VCSA functions into VCSA Module --- .../VCSA.psm1} | 29 +++++++++++++++++++ .../VCSAIdentitySource.psm1 | 28 ------------------ 2 files changed, 29 insertions(+), 28 deletions(-) rename Modules/{VCSAPasswordPolicy/VCSAPasswordPolicy.psm1 => VCSA/VCSA.psm1} (64%) delete mode 100644 Modules/VCSAIdentitySource/VCSAIdentitySource.psm1 diff --git a/Modules/VCSAPasswordPolicy/VCSAPasswordPolicy.psm1 b/Modules/VCSA/VCSA.psm1 similarity index 64% rename from Modules/VCSAPasswordPolicy/VCSAPasswordPolicy.psm1 rename to Modules/VCSA/VCSA.psm1 index 55963ca..a0bac0e 100644 --- a/Modules/VCSAPasswordPolicy/VCSAPasswordPolicy.psm1 +++ b/Modules/VCSA/VCSA.psm1 @@ -36,4 +36,33 @@ Function Get-VCSAPasswordPolicy { } 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" + } } \ No newline at end of file diff --git a/Modules/VCSAIdentitySource/VCSAIdentitySource.psm1 b/Modules/VCSAIdentitySource/VCSAIdentitySource.psm1 deleted file mode 100644 index 596cab1..0000000 --- a/Modules/VCSAIdentitySource/VCSAIdentitySource.psm1 +++ /dev/null @@ -1,28 +0,0 @@ -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" - } -} \ No newline at end of file From 3cf69178d5a5ef27123232b00eaea28fbe15d933 Mon Sep 17 00:00:00 2001 From: William Lam Date: Thu, 5 Mar 2020 10:12:36 -0800 Subject: [PATCH 20/21] Support Disconnected NSX-T Segments for {New,Set}-NSXTSegment --- Modules/VMware.VMC.NSXT/VMware.VMC.NSXT.psm1 | 115 ++++++++++++++++++- 1 file changed, 112 insertions(+), 3 deletions(-) diff --git a/Modules/VMware.VMC.NSXT/VMware.VMC.NSXT.psm1 b/Modules/VMware.VMC.NSXT/VMware.VMC.NSXT.psm1 index 42be532..649efe2 100644 --- a/Modules/VMware.VMC.NSXT/VMware.VMC.NSXT.psm1 +++ b/Modules/VMware.VMC.NSXT/VMware.VMC.NSXT.psm1 @@ -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 From c5c836d3d6028cc08ffe5f51ce10589288a478e0 Mon Sep 17 00:00:00 2001 From: Kyle Ruddy Date: Fri, 6 Mar 2020 11:48:31 -0500 Subject: [PATCH 21/21] Update VMware.HV.Helper.psm1 Updated per Issue #357 --- Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1 b/Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1 index 180f916..8ff7cbe 100644 --- a/Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1 +++ b/Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1 @@ -12682,7 +12682,7 @@ param ( [Boolean]$AutoUpdateOtherFileTypes = $True, [Parameter(Mandatory = $False)] - [String]$GlobalApplicationEntitlement = $null + [String]$GlobalApplicationEntitlement = $null, [Parameter(Mandatory = $false)] [switch]$clearGlobalEntitlement