6.2
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
- 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
VMware, Inc. 45
Chapter 3 Using View PowerCLI
Return a list of active persistent user data disks for the virtual machine vm01.
Get-ProfileDisk -VMname vm01
Reset the virtual machines for the desktop pool dtpool-05.
Get-Pool -pool_id dtpool-05 | Get-DesktopVM | Send-VMReset
Reset the virtual machine for the desktop pool with the display name dtp1.
Get-Pool -displayName dtp1 | Get-DesktopVM | Send-VMReset
Displaying Information About Physical Computers
Return information about the computer at a specified IP address.
Get-DesktopPhysicalMachine -hostname myhost01
Updating the Ownership of Machines
Update the ownership of the virtual machine vm04 to the user usr1.
Update-UserOwnership -machine_id (Get-DesktopVM -Name "vm04").machine_id
-sid (Get-User -name usr1).sid
Remove the ownership of a virtual machine.
Remove-UserOwnership -machine_id (Get-DesktopVM -Name "vm22").machine_id
Displaying Information About Events
Display the views that are available for reporting events.
Get-EventReportList
Display configuration change events that have occurred since the specified date.
Get-EventReport -viewName config_changes -startDate (Get-Date -Year 2011 -Month 5 -Day 20 -Hour 0
-Minute 0 -Second 0)
Display user events that occurred between two specified dates.
Get-EventReport -viewName user_events -startDate (Get-Date -Year 2011 -Month 12 -Day 1 -Hour 0
-Minute 0 -Second 0) -endDate (Get-Date -Year 2011 -Month 12 -Day 2 -Hour 0 -Minute 0 -Second 0)
Display user events for the last 24 hours.
Get-EventReport -viewName user_events -startDate ((Get-Date).AddDays(-1))
Display user events for the current year.
Get-EventReport -viewName user_events -startDate (Get-Date -Day 01 -Month 01 -Hour 0 -Minute 0
-Second 0)
Managing the Global Configuration of View
Display the global configuration settings.
Get-GlobalSetting
Set the session timeout to 30 minutes.
Update-GlobalSetting -SessionTimeout 1800
NOTE The -SessionTimeout value is measured in seconds. In View Administrator, the Session timeout value
is measured in minutes. If View PowerCLI generates a value that is less than 60 seconds, View Administrator
rounds down, resulting in a value of 0. To set a session timeout in View PowerCLI, specify a
-SessionTimeout
value of 60 (one minute) or greater.
N
OTE View Agent must be running on the computers.