4.6
Table Of Contents
- VMware 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 VMware 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 Terminal Servers
- Obtaining Information About Users and Groups from Active Directory
- Managing Desktop Entitlements
- Managing Local Desktops
- 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 VMware View
- Managing View Licenses
- Examples of Using View PowerCLI for Enhanced Functionality
- 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
- Index
VMware, Inc. 43
Chapter 3 Using View PowerCLI
ReturninformationaboutthevirtualmachinesthataremanagedbythesamevCenterServerthatprovisions
thedesktoppooldtpool‐1.
Get-ViewVC -pool_id dtpool-1 | Get-DesktopVM
ReturninformationaboutallvirtualmachinesthataremanagedbythevCenterServerthatisconfiguredon
theservervc01.mydom.int.
Get-ViewVC -serverName vc01.mydom.int | Get-DesktopVM
Returnalistofactivepersistentuserdatadisksforthevirtualmachinevm01.
Get-ProfileDisk -VMname vm01
Resetthevirtualmachinesforthedesktoppooldtpool‐05.
Get-Pool -pool_id dtpool-05 | Get-DesktopVM | Send-VMReset
Resetthevirtualmachineforthedesktoppoolwiththedisplaynamedtp1.
Get-Pool -displayName dtp1 | Get-DesktopVM | Send-VMReset
Displaying Information About Physical Computers
ReturninformationaboutthecomputerataspecifiedIPaddress.
Get-DesktopPhysicalMachine -hostname myhost01
Updating the Ownership of Machines
Updatetheownershipofthevirtualmachinevm04totheuserusr1.
Update-UserOwnership -machine_id (Get-DesktopVM -Name "vm04").machine_id
-sid (Get-User -name usr1).sid
Removetheownershipofavirtualmachine.
Remove-UserOwnership -machine_id (Get-DesktopVM -Name "vm22").machine_id
Displaying Information About Events
Displaytheviewsthatareavailableforreportingevents.
Get-EventReportList
Displayconfigurationchangeeventsthathaveoccurredsincethespecifieddate.
Get-EventReport -viewName config_changes -startDate (Get-Date -Year 2011 -Month 5 -Day 20 -Hour 0
-Minute 0 -Second 0)
Displayusereventsthatoccurredbetweentwospecifieddates.
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)
Displayusereventsforthelast24hours.
Get-EventReport -viewName user_events -startDate ((Get-Date).AddDays(-1))
Displayusereventsforthecurrentyear.
Get-EventReport -viewName user_events -startDate (Get-Date -Day 01 -Month 01 -Hour 0 -Minute 0
-Second 0)
Managing the Global Configuration of VMware View
Displaytheglobalconfigurationsettings.
Get-GlobalSetting
NOTEViewAgentmustberunningonthecomputers.