4.5
Table Of Contents
- VMware View Integration Guide
- 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
- 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
ReturninformationaboutallvirtualmachinesthataremanagedbythevCenterServerthatisconfiguredon
theservervc01.mydom.int.
Get-ViewVC -serverName vc01.mydom.int | Get-DesktopVM
Returninformationaboutthevirtualmachinesthatareconfiguredasmanualdesktoppools,andwhichare
managedbyvCenterServersthatareconfiguredonserversintheDNSdomainmycorp.com.
Get-ViewVC -serverName *.mycorp.com -DesktopType Manual | 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
Updatetheownershipofthevirtualmachinevm04.
Update-UserOwenership -machine_id vm04 -sid S-1-5-21-7623811015-3361044348-030300820-1013
Removetheownershipofavirtualmachine.
Remove-UserOwenership -machine_id vm22
Displaying Information About Events
Displaytheviewsthatareavailableforreportingevents.
Get-EventReportList
Displayconfigurationchangeeventsthathaveoccurredsincethespecifieddate.
Get-EventReport -viewName config_changes -startDate 2011-05-20:00:00:00
Displayusereventsthatoccurredbetweentwospecifieddates.
Get-EventReport -viewName user_events -startDate 2011-12-01:00:00:00 -endDate 2011-12-02:00:00:00
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
Setthesessiontimeoutto30minutes.
Update-GlobalSetting -SessionTimeout 30
NOTEViewAgentmustberunningonthecomputers.