Create windows admin account via bat file

open notepad Paste the following @echo off net user Username Password /add /comment:"Admin" /passwordchg:NO wmic useraccount where "name='Username'" set passwordexpires=FALSE net localgroup "Administrators" Username /add PAUSE   Replace Username with the username you want to use Replace Password with the password you want to use...
Read More

hyper-v Enable processor compatibility

Enabling this feature manually on each vm, via settings processor > expand > Compatibility > tick Migrate to a physical computer with a different processor version   View current status of all vm's on a host. PS C:\WINDOWS\system32> Get-VM | get-VMProcessor VMName Count CompatibilityForMigrationEnabled CompatibilityForOlderOperatingSystemsEnabled ------ ----- -------------------------------- -------------------------------------------- Activation-Test 1 False False AzureADConnect2 1 False False AzureBackup1 2 False False exchange 4 False False Proxy1 1 False False RDSHost (rdvh1) 1 False False SCCM (WSUS) 2 False False Steam-Cache 2 False False SYSDeploy 2 False False TesVMG1 1 False False TesVMG2 1 True False vd1-H0 1 False False vd1-H1 1 True False w10IotE 1 False False Windows10-vdi-m 1 False False Windows10-vdi-v1 1 False False Update all vm's on host (only updates vms that are powered off.) PS C:\WINDOWS\system32> Get-VM | set-VMProcessor -CompatibilityForMigrationEnabled $true   After (only updates VMs that are powered off) PS C:\WINDOWS\system32> Get-VM | get-VMProcessor VMName Count CompatibilityForMigrationEnabled CompatibilityForOlderOperatingSystemsEnabled ------ ----- -------------------------------- -------------------------------------------- Activation-Test 1 True False AzureADConnect2 1 False False AzureBackup1 2 False False exchange 4 True False Proxy1 1 True False RDSHost (rdvh1) 1 False False SCCM (WSUS) 2 False False Steam-Cache 2 True False SYSDeploy 2 True False TesVMG1 1 True False TesVMG2...
Read More

Unpin all items from windows 10 start menu

WARNING - This will removal all items from the start menu. You will need to re-pin any that you would like back. This is Recommend if you are logging in to the first time. Open Powershell ISE And do a new script and enter the following: (New-Object -Com Shell.Application). NameSpace('shell:::{4234d49b-0245-4df3-b780-3893943456e1}'). Items() | %{ $_.Verbs() } | ?{$_.Name -match 'Un.*pin from Start'} | %{$_.DoIt()}   Then run the script (press F5)  ...
Read More

VM kept a recovery checkpoint

Not sure why this occurred however I was planning to add a new drive to a vm, however could not add the new drive. Thinking back to an issue with a VM at work, on my VM exchange I tried to edit an existing drive on the VM and it mentions checkpoints exist. In poweshell I did get-vmsnapshot Exchange it mentioned it was a recovery checkpoint The command I used to remove it was get-vmsnapshot exchange | remove-vmsnapshot Below is a screenshot of the CMD/Powershell window ...
Read More

Move windows update save location using mklink

Stop the Windows Update service, Remote access connection manager Certificate propagation Move the “SoftwareDistribution” folder to the desired drive. Now there will be no folder named "SoftwareDistribution" in the path "%systemdrive%\Windows". Now open the command prompt in “Administrator” mode (Type “cmd” in start menu search box and press ctrl+shift+enter) Change to “Windows” directory by issuing the command “cd %systemdrive%\Windows" Now use the command "mklink" to create a junction point to the “SoftwareDistribution” folder, that you moved to a different drive. The command is “mklink /J SoftwareDistribution d:\softwareDistribution” d:\softwareDistribution is the new destination reboot then check for updates...
Read More

Upgrade Server 2016 Evaluation to Full

If you try to change the product key with a retail key it would give the prompt "This edition cannot be upgraded" You can get the current version of the os by opening command prompt as admin and enter DISM /online /Get-CurrentEdition To get the list of editions it can be upgraded to DISM /online /Get-TargetEditions To upgrade Standard eval to Standard full use the generic product key within this command dism /online /set-edition:ServerStandard /productkey:WC2BQ-8NRM3-FDDYY-2BFGV-KHKQY /accepteula To upgrade Standard eval to Datacenter full or Datacenter eval to Datacenter full DISM /online /Set-Edition:ServerDatacenter /ProductKey:CB7KF-BWN84-R7R2Y-793K2-8XDDG /AcceptEula Once done restart your computer.(it can take a while to come back up as it will mention adding features Once logged in run this command winver.exe...
Read More