Jume - My Virtualization Blog

My personal and professional virtualization blog. Everything about VMware, PowerCLI, Powershell, Agile, Scrum, VSAN and Cloud related.

Access VM console in a secured environment - part 1

​Accessing the VM console always requires a direct connection to the ESXi host running the VM. If you've got a user/insecure network and you firewalled your ESXi/vCenter servers, you cannot access the console without opening the port for that whole network (you never know who requires a connection to any of the hosts for that console). This ar...
Continue reading
  2015 Hits
  0 Comments
2015 Hits
0 Comments

PowerShell 7.0 GA

​Some great news came overnight. Microsoft has announced the release of PowerShell 7.0.0. After a couple of release candidates we now have 7.0.0! Awesome! But does PowerCLI work? Let's check that out!!! Something to note (from the original article): Which Microsoft products already support PowerShell 7? Any module that is already supporte...
Continue reading
  2073 Hits
  0 Comments
2073 Hits
0 Comments

Some short PowerShell tips #4

Tip 5:​Try a container! As a followup on tip 4, you can also try (and of course even run in production) PowerShell (and PowerCLI) in a container with for example Docker! This allows you to investigate if PowerShell is something for you. If you're a long time PowerCLI user, grab that container too!Links:Official ​PowerShell container: ...
Continue reading
  1359 Hits
  0 Comments
1359 Hits
0 Comments

Some short PowerShell tips #3

Tip 4: ​We left off with tip 3, using group-object. This tip is about the PowerShell version. Did you know every version of PowerShell gets lots of performance optimizations? So my tip for now: try out different PowerShell versions! At the time of writing, PowerShell 5.1 Desktop is installed on Windows 10, and the latest stable is 6.2.3 C...
Continue reading
  1359 Hits
  0 Comments
1359 Hits
0 Comments

Some short PowerShell tips #2

Tip 3: Are you using Where-Object or if/else/elseif in a loop to filter out or to process whatever you need? Consider using: Group-Object.​ PS H:\> Get-Help Group-ObjectNAME Group-ObjectSYNTAX Group-Object [[-Property] <Object[]>] [-NoElement] [-AsHashTable] [-AsString] [-InputObject <psobject>] [-Culture <...
Continue reading
  2300 Hits
  0 Comments
2300 Hits
0 Comments

Some short Powershell tips #1

Tip 1: If you're in a folder (using your file explorer), and want to open a Powershell box there (or command box also works), type 'powershell.exe' in its path and the new window opens at that location. If you run PowerShell Core, you can also use 'pwsh' or if you want a command box window, use 'cmd'.Tip 2: Last few days I've been creatin...
Continue reading
  1404 Hits
  1 Comment
1404 Hits
1 Comment

ForEach vs Select-Object -ExpandProperty

Quite often I see scripts which use a ForEach loop to expand an array in an array and display that as a list. There is nothing wrong with that, however, another method is using 'Select-Object' with the 'ExpandProperty' option.To illustrate, here is an example: 'I want to have a list with cluster and their datastores, but every datastore should be o...
Continue reading
  3398 Hits
  0 Comments
Tags:
3398 Hits
0 Comments