-
How to disable Virtual Machine Generation Identifier (VM Generation ID) on Domain Controller on Hyper-V 2012
What is VM GenerationID identifier? Very simple description of the VM Generation ID is that Generation ID is a protection of your Active Directory against restore of a checkpoint (snapshot) of a virtualized Domain Controller (DC). As you can imagine if you restore a checkpoint of a DC (you do not restore a backup, you…
-
Convert object in PowerShell (for example [PsCustomObject]) into hash table source code
I needed a simple and reusable PowerShell code to convert any object into hash table that can be copy and pasted as source code. I wrote this: $outputItem = ‘@{‘ $MyCustomObject.PSObject.Properties.Name | Where-Object -FilterScript { $_ -ne ‘ComputerName’ } | ForEach-Object -Process ` { if ($interfaceItemIpConfigurationItem.$_ -is [bool]) { $valueItem = ‘${0}’ -f $MyCustomObject.$_.ToString().ToLower() }…