The solution was two-fold.
Windows 7 printers appeared as one
My primary problem was I didn't realize that in Windows 7, if you install multiple printers that use the same driver and are installed on the same port (e.g. the same IP address), they will appear as one in the Devices and Printers window.
Because I wasn't aware of this behavior change, when I saw only one printer in my VDI's Devices and Printers window, I incorrectly assumed that the rest of the ThinPrint printers I assigned were not working.
Since I will be using just a few universal print drivers that are installed in my Windows 7 template, with many printers sharing a single driver, I searched for a way to force Windows 7 to display a unique icon for every printer regardless if they share common drivers or IP addresses.
The solution to this problem is a registry change that can be deployed via Group Policy.
- Group Policy Management > Computer Configuration > Preferences > Windows Settings > Registry > New Registry Item
- Action: Update
- Hive: HKEY_LOCAL_MACHINE
- Key Path: SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace{2227a280-3aea-1069-a2de-08002b30309d}
- Value name: Default enabled/checked
- Value type: REG_SZ
- Value data: Printers
Apply this policy to the Active Directory OU that contains your VMware View desktop pools and those machines will have a Printers folder added to their desktop that contains the ThinPrint-assigned printers, using an individual icon for each printer.
For more information about this issue, please see these to articles:
How to assign network printers to Active Directory groups
The method of using the OEM version of ThinPrint that comes with VMware View to assign location-aware printers to Active Directory group is to use their Group Policy plugin. Please see the VMware View Administrators Guide for instructions on how to install this AD plugin/addon.
- Group Policy Management Editor > Computer Configuration > Policies > Software Settings > AutoConnect Map Additional Printers for VMware View > Configure AutoConnect Map Additional Printers
- User/Group Column: \domain\PTR-MH-4S-R450-HP-LJ3005 (e.g. \example\Domain Users)
- Printer Name: HP LaserJet (e.g. any name you want)
- Printer Driver: HP Universal Printing PCL 6 (found via Print Management > All Drivers)
- IP Port/ThinPrint Port: IP_172.22.1.1 (the printer's IP address)
By creating a one-to-one relationship between Active Directory Groups and each network printer, we will instead simply add users or group to each printer group instead of creating a very large ThinPrint table with many rows.
My location-specific printer group naming convention is PTR-BUILDING-FLOOR+DIRECTION-ROOM-MAKE-MODEL (e.g. PTR-MainHospital-Floor4South-Room450-HewlettPackard-LaserJet3005).
Just query the VM with get-vm and add | Select UsedSpaceGB
.
For example, you could type:
get-vm | Select Name, UsedSpaceGB, ProvisionedSpaceGB
Best Answer
/See edit below
You cannot. PowerCLI just lets you do things that you can do through the vSphere GUI, like add/remove drives, power on/off guests, migrate machines, etc. Read the docs, that's a really good thing to do before coming to a technical forum with a question. If you read over the list of cmdlets included in PowerCLI, you'd see this for yourself.
PowerCLI does not get you any hooks into the guest machines themselves. If you have left yourself no remote-management options because you disabled admin$ and WMI on the guests, you're stuck doing everything manually.
VMware != magic. You still have to administer the guest machines using the same methods you'd use on physical machines.
/edit - OK, good catch for finding invoke-vmscript. So, my answer above is not quite accurate.