Integration
Table Of Contents
- View Integration
- Contents
- Introduction
- Integrating with the Event Database
- Using View PowerCLI
- Introduction to View PowerCLI
- View PowerCLI Cmdlets
- View Administrator, View PowerCLI Cmdlet, and vdmadmin Operations
- View PowerCLI Cmdlet Parameters
- Examples of Using View PowerCLI Cmdlets
- Displaying Information About a View Connection Server Instance
- Updating the Configuration of a View Connection Server Instance
- Managing the Configuration of vCenter Servers in View
- Managing Desktop Pools
- Creating and Updating Automatically Provisioned Desktop Pools
- Creating and Updating Linked-Clone Desktop Pools
- Creating and Updating Manually Provisioned Desktop Pools
- Creating Manual Unmanaged Desktop Pools
- Creating and Updating Desktops Provisioned by RDS Hosts
- Obtaining Information About Users and Groups from Active Directory
- Managing Desktop Entitlements
- Managing Remote Sessions
- Managing Virtual Machines
- Displaying Information About Physical Computers
- Updating the Ownership of Machines
- Displaying Information About Events
- Managing the Global Configuration of View
- Managing View Licenses
- Examples of Using View PowerCLI for Enhanced Functionality
- Assign Multiple Network Labels to a Desktop Pool
- Customizing LDAP Data
- Integrating with SCOM
- View Management Packs
- Name a View Connection Server Group
- Import the View MPs
- View Discovery Script
- Run the Discovery Script
- Display Discovered Objects
- Display Managed Objects
- Views and Monitors
- Enable a Proxy Agent on a Server
- Display Performance Data
- Display Information About an Alert
- Restart a Service
- Exclude a Domain from Connectivity Monitoring
- Close Alerts
- Class and Relationship Definitions
- Examining PCoIP Session Statistics
- Dynamically Setting Desktop Policies with Start Session Scripts
- Index
View Integration
50 VMware, Inc.
$dsType = $Datastore.GetType().Name
$rpType = $ResourcePool.GetType().Name
if(-not ($dsType.Contains("Datastore")) ){
Write-Error "The Datastore provided is not a Datastore object."
break
}
if(-not ($rpType.Contains("ResourcePool")) ){
Write-Error "The Resource Pool provided is not a ResourcePool object."
break
}
$ClusterPath = VVGetPath(Get-Inventory -Id $ResourcePool.ParentId)
$path = $ClusterPath + "/" + $Datastore.Name
$path
}
}
Adding and Removing Datastores
Define a PowerShell function to add a datastore to an automatic pool.
# AddDatastoreToAutomaticPool
# Parameters
# $Pool Pool ID of pool to be updated.
# $Datastore Full path to datastore to be added.
function AddDatastoreToAutomaticPool
{ param ($Pool, $Datastore)
$PoolSettings = (Get-Pool -pool_id $Pool)
$datastores = $PoolSettings.datastorePaths + ";$Datastore"
Update-AutomaticPool -pool_id $Pool -datastorePaths $datastores
}
Define a PowerShell function to remove a datastore from an automatic pool.
# RemoveDatastoreFromAutomaticPool
# Parameters
# $Pool Pool ID of pool to be updated.
# $Datastore Full path to datastore to be removed.
function RemoveDatastoreFromAutomaticPool
{ param ($Pool, $Datastore)
$PoolSettings = (Get-Pool -pool_id $Pool)
$currentdatastores = $PoolSettings.datastorePaths
$datastores = ""
foreach ($path in $currentdatastores.split(";")){
if(-not ($path -eq $Datastore)){
$datastores = $datastores + "$path;"
}
}
Update-AutomaticPool -pool_id $Pool -datastorePaths $datastores
}
Define a PowerShell function to add a datastore to a linked-clone pool.
# AddDatastoreToLinkedClonePool
# Parameters
# $Pool Pool ID of pool to be updated.
# $Datastore Full path to datastore to be added.
function AddDatastoreToLinkedClonePool
{ param ($Pool, $Datastore)
$PoolSettings = (Get-Pool -pool_id $Pool)
$datastores = $PoolSettings.datastoreSpecs + ";$Datastore"
Update-AutomaticLinkedClonePool -pool_id $Pool -datastoreSpecs $datastores
}
Define a PowerShell function to remove a datastore from a linked-clone pool.