Category Archives: Uncategorized

Powershell get-member fun

Ok, as a newbie to Powerhsell it still amazes me how clever it is, whilst i was writing my recent report script which takes the results of various commands and outputs them to a word document for a report I was stuck with the properties of one of the objects.

I had been trying to translate some of the documented vbscript’s from the msdn site and use the same features as there wasnt much documentation for doing this in powershell at the moment on the web, I really got stuck finding the properties so i experimeted with get-member, check this out…

$msWord = New-Object -Com Word.Application

Which creates a new word com object

$msword | get-member

Didnt expect this to do anything as how would powershell know the properties of a com object but wait, look what i recieved….

TypeName: System.__ComObject#{00020970-0000-0000-c000-000000000046}

Name MemberType Definition
—- ———- ———-
Activate Method void Activate ()
AddAddress Method void AddAddress (SAFEARRAY(st…
AutomaticChange Method void AutomaticChange ()
BuildKeyCode Method int BuildKeyCode (WdKey, Vari…
CentimetersToPoints Method float CentimetersToPoints (fl…
ChangeFileOpenDirectory Method void ChangeFileOpenDirectory …
CheckGrammar Method bool CheckGrammar (string)
CheckSpelling Method bool CheckSpelling (string, V…
CleanString Method string CleanString (string)
DDEExecute Method void DDEExecute (int, string)
DDEInitiate Method int DDEInitiate (string, string)
DDEPoke Method void DDEPoke (int, string, st…
DDERequest Method string DDERequest (int, string)
DDETerminate Method void DDETerminate (int)
DDETerminateAll Method void DDETerminateAll ()
DefaultWebOptions Method DefaultWebOptions DefaultWebO…
DiscussionSupport Method void DiscussionSupport (Varia…
GetAddress Method string GetAddress (Variant, V…
GetDefaultTheme Method string GetDefaultTheme (WdDoc…
GetSpellingSuggestions Method SpellingSuggestions GetSpelli…
GoBack Method void GoBack ()
GoForward Method void GoForward ()
Help Method void Help (Variant)
HelpTool Method void HelpTool ()
InchesToPoints Method float InchesToPoints (float)
Keyboard Method int Keyboard (int)
KeyboardBidi Method void KeyboardBidi ()
KeyboardLatin Method void KeyboardLatin ()
KeyString Method string KeyString (int, Variant)
LinesToPoints Method float LinesToPoints (float)
ListCommands Method void ListCommands (bool)
LookupNameProperties Method void LookupNameProperties (st…
MillimetersToPoints Method float MillimetersToPoints (fl…
MountVolume Method short MountVolume (string, st…
Move Method void Move (int, int)
NewWindow Method Window NewWindow ()
NextLetter Method void NextLetter ()
OnTime Method void OnTime (Variant, string,…
OrganizerCopy Method void OrganizerCopy (string, s…
OrganizerDelete Method void OrganizerDelete (string,…
OrganizerRename Method void OrganizerRename (string,…
PicasToPoints Method float PicasToPoints (float)
PixelsToPoints Method float PixelsToPoints (float, …
PointsToCentimeters Method float PointsToCentimeters (fl…
PointsToInches Method float PointsToInches (float)
PointsToLines Method float PointsToLines (float)
PointsToMillimeters Method float PointsToMillimeters (fl…
PointsToPicas Method float PointsToPicas (float)
PointsToPixels Method float PointsToPixels (float, …
PrintOut Method void PrintOut (Variant, Varia…
PrintOutOld Method void PrintOutOld (Variant, Va…
ProductCode Method string ProductCode ()
Quit Method void Quit (Variant, Variant, …
Repeat Method bool Repeat (Variant)
ResetIgnoreAll Method void ResetIgnoreAll ()
Resize Method void Resize (int, int)
Run Method Variant Run (string, Variant,…
RunOld Method void RunOld (string)
ScreenRefresh Method void ScreenRefresh ()
SendFax Method void SendFax ()
SetDefaultTheme Method void SetDefaultTheme (string,…
ShowClipboard Method void ShowClipboard ()
ShowMe Method void ShowMe ()
SubstituteFont Method void SubstituteFont (string, …
ToggleKeyboard Method void ToggleKeyboard ()
FindKey ParameterizedProperty KeyBinding FindKey (int, Vari…
International ParameterizedProperty Variant International (WdInte…
IsObjectValid ParameterizedProperty bool IsObjectValid (IDispatch…
KeysBoundTo ParameterizedProperty KeysBoundTo KeysBoundTo (WdKe…
SynonymInfo ParameterizedProperty SynonymInfo SynonymInfo (stri…
ActiveDocument Property Document ActiveDocument () {g…
ActivePrinter Property string ActivePrinter () {get}…
ActiveWindow Property Window ActiveWindow () {get}
AddIns Property AddIns AddIns () {get}
AnswerWizard Property AnswerWizard AnswerWizard () …
Application Property Application Application () {g…
Assistant Property Assistant Assistant () {get}
AutoCaptions Property AutoCaptions AutoCaptions () …
AutoCorrect Property AutoCorrect AutoCorrect () {g…
BackgroundPrintingStatus Property int BackgroundPrintingStatus …
BackgroundSavingStatus Property int BackgroundSavingStatus ()…
BrowseExtraFileTypes Property string BrowseExtraFileTypes (…
Browser Property Browser Browser () {get}
Build Property string Build () {get}
CapsLock Property bool CapsLock () {get}
Caption Property string Caption () {get} {set}
CaptionLabels Property CaptionLabels CaptionLabels (…
CheckLanguage Property bool CheckLanguage () {get} {…
COMAddIns Property COMAddIns COMAddIns () {get}
CommandBars Property CommandBars CommandBars () {g…
Creator Property int Creator () {get}
CustomDictionaries Property Dictionaries CustomDictionari…
CustomizationContext Property IDispatch CustomizationContex…
DefaultSaveFormat Property string DefaultSaveFormat () {…
DefaultTableSeparator Property string DefaultTableSeparator …
Dialogs Property Dialogs Dialogs () {get}
DisplayAlerts Property WdAlertLevel DisplayAlerts ()…
DisplayAutoCompleteTips Property bool DisplayAutoCompleteTips …
DisplayRecentFiles Property bool DisplayRecentFiles () {g…
DisplayScreenTips Property bool DisplayScreenTips () {ge…
DisplayScrollBars Property bool DisplayScrollBars () {ge…
DisplayStatusBar Property bool DisplayStatusBar () {get…
Documents Property Documents Documents () {get}
Dummy1 Property bool Dummy1 () {get}
EmailOptions Property EmailOptions EmailOptions () …
EnableCancelKey Property WdEnableCancelKey EnableCance…
FeatureInstall Property MsoFeatureInstall FeatureInst…
FileConverters Property FileConverters FileConverters…
FileSearch Property FileSearch FileSearch () {get}
FocusInMailHeader Property bool FocusInMailHeader () {get}
FontNames Property FontNames FontNames () {get}
HangulHanjaDictionaries Property HangulHanjaConversionDictiona…
Height Property int Height () {get} {set}
KeyBindings Property KeyBindings KeyBindings () {g…
LandscapeFontNames Property FontNames LandscapeFontNames …
Language Property MsoLanguageID Language () {get}
Languages Property Languages Languages () {get}
LanguageSettings Property LanguageSettings LanguageSett…
Left Property int Left () {get} {set}
ListGalleries Property ListGalleries ListGalleries (…
MacroContainer Property IDispatch MacroContainer () {…
MailingLabel Property MailingLabel MailingLabel () …
MailMessage Property MailMessage MailMessage () {g…
MailSystem Property WdMailSystem MailSystem () {g…
MAPIAvailable Property bool MAPIAvailable () {get}
MathCoprocessorAvailable Property bool MathCoprocessorAvailable…
MouseAvailable Property bool MouseAvailable () {get}
Name Property string Name () {get}
NormalTemplate Property Template NormalTemplate () {g…
NumLock Property bool NumLock () {get}
Options Property Options Options () {get}
Parent Property IDispatch Parent () {get}
Path Property string Path () {get}
PathSeparator Property string PathSeparator () {get}
PortraitFontNames Property FontNames PortraitFontNames (…
PrintPreview Property bool PrintPreview () {get} {s…
RecentFiles Property RecentFiles RecentFiles () {g…
ScreenUpdating Property bool ScreenUpdating () {get} …
Selection Property Selection Selection () {get}
ShowVisualBasicEditor Property bool ShowVisualBasicEditor ()…
SpecialMode Property bool SpecialMode () {get}
StartupPath Property string StartupPath () {get} {…
StatusBar Property {get} {set}
System Property System System () {get}
Tasks Property Tasks Tasks () {get}
Templates Property Templates Templates () {get}
Top Property int Top () {get} {set}
UsableHeight Property int UsableHeight () {get}
UsableWidth Property int UsableWidth () {get}
UserAddress Property string UserAddress () {get} {…
UserControl Property bool UserControl () {get}
UserInitials Property string UserInitials () {get} …
UserName Property string UserName () {get} {set}
VBE Property VBE VBE () {get}
Version Property string Version () {get}
Visible Property bool Visible () {get} {set}
Width Property int Width () {get} {set}
Windows Property Windows Windows () {get}
WindowState Property WdWindowState WindowState () …
WordBasic Property IDispatch WordBasic () {get}

AMAZING! I could then find the property I wanted and send it the syntax i needed, how cool !

VIOPS – Virtual Infrastructure Operations

VMware are piloting a new extension to the VMware communities called VIOPS – short for Virtual Infrastructure Operations.

The VMware VI OPS portal is a community-based repository for prescriptive, proven, and actionable guidance for operationalizing VMware in your IT organization. Proven practices provided by VMware and industry experts covering a wide range of operational topics are available in an easy to search, consistent format so finding the information you need is quick and easy.

The pilot site is at http://vpp-dev-1.vmware.com

They are going live with this soon, with the launch due at VMworld.

Already there is some great content and once launched I can only see this getting better.

ESX 3.5 Update 2 now available

VMware just released Update 2 for ESX(i) 3.5 and some new patches.

So what’s new?

  • Windows Server 2008 support – Windows Server 2008 (Standard, Enterprise, and Datacenter editions) is supported as a guest operating system. With VMware’s memory overcommit technology and the reliability of ESX, virtual machine density can be maximized with this new guest operating system to achieve the highest degree of ROI. Guest operating system customizations and Microsoft Cluster Server (MSCS) are not supported with Windows Server 2008.
  • Enhanced VMotion Compatibility – Enhanced VMotion compatibility (EVC) simplifies VMotion compatibility issues across CPU generations by automatically configuring server CPUs with Intel FlexMigration or AMD-V Extended Migration technologies to be compatible with older servers. Once EVC is enabled for a cluster in the VirtualCenter inventory, all hosts in that cluster are configured to ensure CPU compatibility for VMotion. VirtualCenter will not permit the addition of hosts which cannot be automatically configured to be compatible with those already in the EVC cluster.
  • Storage VMotion – Storage VMotion from a FC/iSCSI datastore to another FC/iSCSI datastore is supported. This support is extended on ESX/ESXi 3.5 Update 1 as well.
  • VSS quiescing support – When creating quiesced snapshot of Windows Server 2003 guests, both filesystem and application quiescing are supported. With Windows Server 2008 guests, only filesystem quiescing is supported. For more information, see the Virtual Machine Backup Guide and the VMware Consolidated Backup 1.5 Release Notes.
  • Hot Virtual Extend Support – The ability to extend a virtual disk while virtual machines are running is provided. Hot extend is supported for vmfs flat virtual disks without snapshots opened in persistent mode.
  • 192 vCPUs per host – VMware now supports increasing the maximum number of vCPUs per host 192 given that the maximum number of Virtual Machines per host is 170 and that no more than 3 virtual floppy devices or virtual CDROM devices are configured on the host at any given time. This support is extended on ESX 3.5 Update 1 as well.

Hardware additions:

  • 8Gb Fiber Channel HBAs – Support is available for 8Gb fiber channel HBAs. See the I/O Compatibility Guide for ESX Server 3.5 and ESX Server 3i for details.
  • SAS arrays – more configurations are supported.  See the Storage/SAN Compatibility Guide for ESX Server 3.5 and ESX Server 3i for details.
  • 10 GbE iSCSI initiator – iSCSI over a 10GbE interface is supported. This support is extended on ESX Server 3.5 Update 1, ESX Server version 3.5 Update 1 Embedded and ESX Server version 3.5 Update 1 Installable as well.
  • 10 GbE NFS support – NFS over a 10GbE interface is supported.
  • IBM System x3950 M2 – x3950 M2 in a 4-chassis configuration is supported, complete with hardware management capabilities through multi-node Intelligent Platform Management Interface (IPMI) driver and provider. Systems with up to 32 cores are fully supported.  Systems with more than 32 cores are supported experimentally.
  • IPMI OEM extension support – Execution of IPMI OEM extension commands is supported.
  • System health monitoring through CIM providers – More Common Information Model (CIM) providers are added for enhanced hardware monitoring, including storage management providers provided by QLogic and Emulex.  LSI MegaRAID providers are also included and are supported experimentally.
  • CIM SMASH/Server Management API – The VMware CIM SMASH/Server Management API provides an interface for developers building CIM-compliant applications to monitor and manage the health of systems.  CIM SMASH is now a fully supported interface on ESX Server 3.5 and VMware ESX Server 3i.
  • Display of system health information – More system health information is displayed in VI Client for both ESX Server 3.5 and VMware ESX Server 3i.
  • Remote CLI – Remote Command Line Interface (CLI) is now supported on ESX Server 3.5 as well as ESX Server 3i. See the Remote Command-Line Interface Installation and Reference Guide for more information.
  • VMware High Availability – VirtualCenter 2.5 update 2 adds full support for monitoring individual virtual machine failures based on VMware tools heartbeats. This release also extends support for clusters containing mixed combinations of ESX and ESXi hosts, and minimizes previous configuration dependencies on DNS.
  • VirtualCenter Alarms – VirtualCenter 2.5 Update 2 extends support for alarms on the overall health of the server by considering the health of each of the individual system components such as memory and power supplies. Alarms can now be configured to trigger when host health degrades.
  • Guided Consolidation – now provides administrators with the ability to filter the list of discovered systems by computer name, IP address, domain name or analyzing status. Administrators can also choose to explicitly add physical hosts for analysis, without waiting for systems to be auto-discovered by the Consolidation wizard. Systems can be manually added for analysis by specifying either a hostname or IP address. Multiple hostnames or IP addresses, separated by comma or semi-colon delimiters, may also be specified for analysis. Systems can also be manually added for analysis by specifying an IP address range or by importing a file containing a list of hostnames or IP addresses that need to be analyzed for consolidation. Guided Consolidation also allows administrators to override the provided recommendations and manually invoke the conversion wizard.
  • Live Cloning – VirtualCenter 2.5 Update 2 provides the ability of creating a clone of a powered-on virtual machine without any downtime to the running virtual machine. Therefore, administrators are no longer required to power off a virtual machine in order to create a clone of it.
  • Single Sign-On – You can now automatically authenticate to VirtualCenter using your current Windows domain login credentials on the local workstation, as long as the credentials are valid on the VirtualCenter server. This capability also supports logging in to Windows using Certificates and Smartcards. It can be used with the VI Client or the VI Remote CLI to ensure that scripts written using the VI Toolkits can take advantage of the Windows credentials of your current session to automatically connect to VirtualCenter.

Download updates now:

ESX 3.5 Update 2
ESXi 3.5 installable Update 2

VirtualCenter 2.5 Update 2

VMware Consolidated Backup 1.5

[Original Source – Yellow Bricks]