Upgrading your VMFS datastores with PowerCLI
PowerShell – Robert van den Nieuwendijk's Blog
by Robert van den Nieuwendijk
3y ago
With the release of VMware vSphere 5.0 a new version of the VMFS datastores was released also: VMFS-5. This new VMFS-5 version has a lot of advantages over the old VMFS-3 version (see for information about the new features Cormac Hogan’s post vSphere 5.0 Storage Features Part 1 – VMFS-5). You can upgrade your VMFS-3 datastores to VMFS-5 while VM’s on the datastores keep running. In this post I will show you the vSphere PowerCLI Upgrade-VmfsDatastore function that will do the upgrade for you. The Upgrade-VmfsDatastore function The Upgrade-VmfsDatastore function is a PowerShell advanced function ..read more
Visit website
PowerCLI Get-VICommand function error repaired
PowerShell – Robert van den Nieuwendijk's Blog
by Robert van den Nieuwendijk
3y ago
On my PC (Windows 8 Pro, Windows PowerShell 3 and VMware vSphere PowerCLI 5.1 Release 2) there is a very annoying problem with the Get-VICommand function. If I use this function without specifying the name of a cmdlet to search for, then I get an “Object reference not set to an instance of an object” error message: PowerCLI C:\users\robert> Get-VICommand get-command : Object reference not set to an instance of an object. At C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\Scripts\Initialize-PowerCLIEnvironment.ps1:68 char:3 + get-command -pssnapin VMware.* -Name $Name ..read more
Visit website
Get VMware vCenter Scheduled Tasks with PowerCLI
PowerShell – Robert van den Nieuwendijk's Blog
by Robert van den Nieuwendijk
3y ago
VMware vSphere PowerCLI is missing cmdlets to work with VMware vCenter Scheduled Tasks. In a series of blog posts I will show you some PowerShell advanced functions that you can use to work with vCenter Scheduled Tasks. The first function is Get-VCScheduledTask. You can use this function to retrieve one or more scheduled tasks from your vCenter Server. The Get-VCScheduledTask function function Get-VCScheduledTask { <# .SYNOPSIS Retrieves the scheduled tasks on a vCenter Server. .DESCRIPTION Retrieves the scheduled tasks on a vCenter Server. .PARAMETER Name Specify the ..read more
Visit website
Use PowerCLI to consolidate snapshots in vSphere 5
PowerShell – Robert van den Nieuwendijk's Blog
by Robert van den Nieuwendijk
3y ago
In vSphere 5 a virtual machine can have a “Virtual machine disks consolidation is needed” Configuration Issue warning in the Summary tab. How can you use PowerCLI to see which virtual machines have this warning? And how can you automate the consolidation of the virtual machine’s disks? List virtual machines that need disks consolidation The PowerCLI command in listing 1 will return all the virtual machines that need disk consolidation. Get-VM | Where-Object {$_.Extensiondata.Runtime.ConsolidationNeeded} Listing 1. PowerCLI command to list all virtual machines that need disk consolidation. Co ..read more
Visit website
1st Dutch PowerShell User Group (DuPSUG) meeting
PowerShell – Robert van den Nieuwendijk's Blog
by Robert van den Nieuwendijk
3y ago
Friday, November 23, 2012 the first Dutch PowerShell User group (DuPSUG) meeting will be held in Eindhoven, The Netherlands. Speakers are: Microsoft Scripting Guy Ed Wilson, PowerShell MVP Richard Siddaway, Bert Wolters, Stefan Stranger and Jeff Wouters. Session topics are: Using Windows PowerShell 3.0 to manage the remote Windows 8 workstation PowerShell and WMI What’s new in PowerShell 3.0 Protect your PowerShell scripts with version control From command, to script, to function, to advanced function, to tool More information can be found at: 1st DuPSUG meeting ..read more
Visit website
PowerShell 3.0 is available for download
PowerShell – Robert van den Nieuwendijk's Blog
by Robert van den Nieuwendijk
3y ago
Since September 4th 2012 is PowerShell 3.0 available for download. PowerShell 3.0 is included in the Windows Management Framework 3.0 that contains also WMI and WinRM. It can be installed on Windows 7 SP1, Windows Server 2008 R2 SP1 and Windows Server 2008 SP2. Windows Management Framework 3.0 requires Microsoft .NET Framework 4.0. PowerShell 3.0 is a standard component of Windows 8 and Windows Server 2012. New features Windows PowerShell 3.0 Some of the new features in Windows PowerShell 3.0 include: Workflow Windows PowerShell Workflow lets IT Pros and developers apply t ..read more
Visit website
How to list all the PowerCLI ESXCLI commands
PowerShell – Robert van den Nieuwendijk's Blog
by Robert van den Nieuwendijk
3y ago
Last week there was a question in the VMware VMTN Communities VMware vSphere PowerCLI forum from Papires who asked how you can convert the ESXCLI command ‘esxcli storage vmfs snapshot mount -l “DATASTORE”‘ into a PowerCLI command. I had not done very much with ESXCLI in PowerCLI, but I knew that it was something like ‘$esxcli.storage.vmfs.snapshot.mount’. However I was struggling with the ‘-l “DATASTORE”‘ part. There is not much documentation available about the ESXCLI commands in PowerCLI. And also a search in Google did not help me very much. Finally I found the right answer using the PowerS ..read more
Visit website
New book – Learning PowerCLI – Second Edition
PowerShell – Robert van den Nieuwendijk's Blog
by Robert van den Nieuwendijk
3y ago
Today, my new book Learning PowerCLI – Second Edition was published by Packt. Learning PowerCLI, Second Edition will learn you to leverage the power of PowerCLI to automate your VMware vSphere environment with ease. Starting with an introduction to the basics of PowerCLI, the book will teach you how to manage your vSphere and vCloud infrastructure from the command line. To help you manage a vSphere host overall, you will learn how to manage vSphere ESXi hosts, and deploy and upgrade ESXi hosts using Image Builder and Auto Deploy. The upcoming chapters will not only teach you how to create data ..read more
Visit website
Running PowerShell in a Docker container on VMware Photon OS
PowerShell – Robert van den Nieuwendijk's Blog
by Robert van den Nieuwendijk
3y ago
A few days ago Microsoft provided PowerShell as an open source project on GitHub, available on Windows, Linux and macOS! The first open source release is PowerShell 6.0 Alpha. In this blog post, I will show you how to run the new PowerShell version in a Docker container on VMware Photon OS. To get VMware Photon OS running, you can download it from https://vmware.github.io/photon/. I downloaded the Photon OS, Version 1.0 — OVA with virtual hardware v11 and imported into my vSphere environment. If you use the vSphere client, click on File | Deploy OVF Template... to import the OVA file. During t ..read more
Visit website
New VMware fling: Onyx for the Web Client
PowerShell – Robert van den Nieuwendijk's Blog
by Robert van den Nieuwendijk
3y ago
VMware Onyx has been a very popular fling for many years. You can use Onyx to create PowerCLI code by performing actions in the VMware vSphere client. The created PowerCLI code does exactly what you did in the client. The PowerCLI code can easily be adapted to your own needs. Unfortunately Onyx was not available for the vSphere Web Client. This was a pitty because since vSphere 5.1, new features were not built into the vSphere client. So you could not use Onyx to create PowerCLI for the new vSphere features. I am very happy that VMware now has released a new fling: Onyx for the Web Client. Ins ..read more
Visit website

Follow PowerShell – Robert van den Nieuwendijk's Blog on FeedSpot

Continue with Google
Continue with Apple
OR