PeetersOnline.NL

  1. Find LUN ID’s in VMware with Powershell - Determining the LUN ID for a specific LUN in your VMware Infrastructure used to be simple. It was listed as one of the properties of the datastore you selected in the VI Client. Nowadays, more often than not, I dont see the LUN ID in the vSphere Client. Instead, I see some sort of identifier [...] No related posts.
  2. Fix DCOM Event 10005 with Powershell - Do you get these events in your system log? The service cannot be started, either because it is disabled or because it has no enabled devices associated with it. attempting to start the service ntmssvc with arguments “-Service” in order to run the server: {D61A27C6-8F53-11D0-BFA0-00A024151983} Symantec explains this is caused by disabling the Removable Storage [...] No related posts.
  3. Report vSphere Alarms with Powershell - Wow, vSphere vCenter Server has a lot of new alarms! Great for monitoring your environment. But a pain when it comes to documenting it. Thank God VMware for the PowerCLI! Just a few lines of code can do the documentation for you. Here’s how: # Report vSphere Alarms # by Hugo Peeters # www.peetersonline.nl   [...] No related posts.
  4. Add Vmx Path to VI Client using Powershell - The following script is a request from David Gontie, who was kind enough to comment on a previous post. He’d like to add the location of his vm’s to a custom field. This is especially handy if you store all the files for a vm in a single datastore. Here you go David: ############################## # Script [...] No related posts.
  5. Set VMware Snapshot Location with Powershell - Snapshots are m*th3rfcukers. If you’re not careful, they will mass-murder your vms. Yet they allow you to time-travel! You want to use them, but how to prevent a massacre? Here’s how: relocate the delta files. When you create a snapshot, the current state of the vm is preserved by leaving the disk files alone. All changes [...] No related posts.
  6. User Confirmation in Powershell - Built-in cmdlets usually offer the -Confirm parameter whenever you need user confirmation. When writing your own scripts, you might want to ask the eventual user of the script for confirmation yourself. This handy little function (store it in your profile!) allows you to ask for confirmation whenever, where-ever. (Try not to bug your users too [...] No related posts.
  7. Create a vSwitch Port Overview with Powershell - WARNING: VMware vmotion does not check wether there are sufficient ports available on the virtual switch on the destination host. Migrating a vm to a host with insufficient ports will cause the vmotion to complete without warnings, yet the virtual NIC will be disconnected! This issue is descripbed in this KB article. The solution to [...] No related posts.
  8. Examine VMware CPU Ready Times with Powershell - When your (VMware) consolidation ratios are becoming high, it might be smart to keep an eye on your vm’s CPU Ready Times. Unfortunately, by default, the VI Client will only show realtime ready time statistics. Plus you’d have to look at each vm individually. Thank God VMware for the PowerCLI! Read this document for more [...] No related posts.
  9. Managing Scheduled Tasks Remotely Using Powershell - The following Powershell functions allow you to manage querying, creating and removing scheduled tasks on one or more computers remotely. The functions use schtasks.exe, which is included in Windows. Unlike the Win32_ScheduledJob WMI class, the schtasks.exe commandline tool will show manually created tasks, as well as script-created ones. The examples show some, but not all [...] No related posts.
  10. Increment PowerGUI Xml Version with Powershell - If you are using PowerGUI (which you should) and some of your collaegues do too, you might want to use a central configuration. Whenever you want to update the central configuration xml file, you need to increment the version number in order to push this change out to your collaegues. The following function increments the [...] No related posts.
Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Twitthis

About the Author

My name is Bobby Shea and I am an Infrastructure Practice Team Lead for EMC Application Consulting. When I am not working I enjoy riding my motorcycle with my wife, spending time with my family, watching NHL Hockey and exploring new technology.