January 29, 2020

PowerCLI enable CBT

PowerCLI enable CBT on VM’s where CBT is disabled


Problem: Some VM’s have CBT disabled.

Warning: Maybe CBT should not be enabled in your environment. There are pre-requisites and if unpatched hosts, potential bugs with CBT. Please be diligent in researching CBT (Change Block Tracking) first.

Solution: (note: bypasses any VM's with existing snapshots)



~~~
As always, good luck.
Please consider crypto tipping:
  

November 06, 2019

List VMWare VM's with attached ISO's

Problem: I need to find all VM’s with ISO’s attached to the virtual CD-Roms.

Prerequisite: VMWare PowerCLI for PowerShell

Solution:

$vCenter = "YOURVCENTERHOSTNAME"
Import-Module VMware.VimAutomation.Core | Out-Null
Connect-VIServer -Server $vCenter | Out-Null

#The actual working code to list attached ISO's
Get-VM | Get-CDDrive | Where-Object { $_.IsoPath -ne $null } | Select-Object Parent, IsoPath | Format-Table -auto

Disconnect-VIServer * -Confirm:$false -Force -ErrorAction SilentlyContinue

Good Luck!!!

& Thank you to Adil Arif & Brian Graf : http://www.enterprisedaddy.com/2016/04/powercli-find-iso-attached-virtual-machines/


Please consider crypto tipping:
  

October 30, 2019

Veeam PowerShell Enable Encryption on All Jobs

Scenario: Your Veeam Backups have not been set for Storage Encryption. You have a ton of Backup Jobs and Backup Copy Jobs. You have exactly one (1) Encryption Password created.

!!NOTICE!! Once you add even a single encryption password, please re-configure your Veeam “Configuration Backup” because adding a password is known to disable the Config backups!!!

Problem: Manually editing each and every jobs is tedious and time consuming, and possibly prone to error.

Solution Prerequisite: Veeam PowerShell API installed.

Solution: Veeam PowerShell Enable Encryption on all the jobs at once:

Add-PSSnapin VeeamPSSnapIn
Disconnect-VBRServer #disconnect any prior
Connect-VBRServer -server YOURVEEAMSERVER #[-user] -[password|credential] [-port 9392]

$encryptionkey = Get-VBREncryptionKey -Description "YOURENCRYPTIONPASSWORDHINT"

$jobs = ( Get-VBRJob | Sort-Object -Property Name ) #sort is not necessity 
$jobs | Set-VBRJobAdvancedStorageOptions -EnableEncryption $true -EncryptionKey $encryptionkey

Good Luck!


Please consider crypto tipping: