Enabling Nested Virtualization

A Hyper-V host running Windows Server 2016 or Windows 10 Anniversary Update. A Hyper-V VM running Windows Server 2016 or Windows 10 Anniversary Update. A Hyper-V VM with configuration version 8.0 or greater. An Intel processor with VT-x and EPT technology. Shutdown VM Open Powershell as admin and run this command on Hyper-V host "Set-VMProcessor -VMName <VMName> -ExposeVirtualizationExtensions $true When using Nested Virtualization you can not use dynamic memory. Set to VM to Static memory if it isn't already Start VM Install Hyper V role More info: https://docs.microsoft.com/en-gb/virtualization/hyper-v-on-windows/user-guide/nested-virtualization   Script that will prompt you to enter name of VM $Server = Read-Host -Prompt 'Input your server name' Set-VMProcessor -VMName $Server -ExposeVirtualizationExtensions $true...
Read More

Run Livedrive as a service

Log into the server or desktop with the account that you want to run the service as and setup LiveDrive as normally. In the config , set it so that it does not run at startup (On advanced tab) and exit the application. Download srvany.exe from the Microsoft Windows 2003 Resource Kit (http://www.microsoft.com/en-au/download/details.aspx?id=17657) After installing the Resource Kit (default in C:\Program Files (x86)\Windows Resource Kits\Tools), copy srvany.exe into the folder where LiveDrive is installed. Run CMD as admin, before entering the below edit to use the correct login details and if you want to change the name of the service sc create LiveDriveBackU displayName= "LiveDrive BackupUser Service" start= auto obj= "<domain>\<username>" password= "<password>" binPath= "C:\Program Files (x86)\Livedrive\srvany.exe" It will then give a message [SC] CreateService SUCCESS Open Regedit and go to "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LiveDriveBackU " LiveDriveBackU is the name of the service that was created Create a key under this service by right clicking on the service and doing new > key and call it Parameters within Parameters create...
Read More

Get Hyper-V VM IOPS statistics

First, you need to see if VM resource metering is enabled run PowerShell as admin on a hyper v host (or using remote powershell) Get-VM | Format-List Name,ResourceMeteringEnabled   To Enable Metering Enable-VMResourceMetering -VMName NameOfVM To Disable Metering Disable-VMResourceMetering -VMName NameOfVM If you want to enable this for all vm's on a host replace NameOfVM with *   Basic overview Use the below command (values only 0 if VM is off) Get-VM | Measure-VM This shows the columns: VMName, Avg CPU, Avg Ram, Max Ram, Min Ram, Total Disk, Network Inbound, Net Outbound Focus on IOPS Measure-VM -VMName NameOfVM | select VMName, @{Label='TotalIO';Expression = {$_.AggregatedDiskDataRead + $_.AggregatedDiskDataWritten}}, @{Label='%Read';Expression={"{0:P2}" -f ($_.AggregatedDiskDataRead/($_.AggregatedDiskDataRead + $_.AggregatedDiskDataWritten))}}, @{Label='%Write';Expression={"{0:P2}" -f ($_.AggregatedDiskDataWritten/($_.AggregatedDiskDataRead + $_.AggregatedDiskDataWritten))}}, @{Label='TotalIOPS';Expression = {"{0:N2}" -f (($_.AggregatedDiskDataRead + $_.AggregatedDiskDataWritten)/$_.MeteringDuration.Seconds)}} | ft    ...
Read More

Initiate Shadow Of Remote Connection From command line Server 2012 R2

Launch Command Prompt as Admin To get the session ID for users, use the "qwinsta" command To get connected use "mstsc.exe /shadow:sessionID /control /noConsentPrompt" If you do not include /noConsentPrompt the user will be prompted to click on that says "Your username is requested to connect your session remotely. Do you accept the request? Yes or No"...
Read More

Changing the Status of Windows Firewall via Powershell or Command Prompt

Turning Off Firewall Using PowerShell Run PowerShell as admin, execute the following command. This will turn off your firewall. Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False Turning On Firewall Using PowerShell Run PowerShell as admin, execute the following command. This will turn off your firewall. Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled True Turning Off Firewall Using Windows Command Prompt Run command prompt as admin, and execute the following command: netsh advfirewall set allprofiles state off Turning On Firewall Using Windows Command Prompt Run command prompt as admin, and execute the following command: netsh advfirewall set allprofiles state on...
Read More

Allow remote managment

Enable-NetFirewallRule -DisplayGroup “Remote Volume Management” Enable-NetFirewallRule -DisplayGroup “Windows Firewall Remote Management” Enable-NetFirewallRule -DisplayGroup “Remote Scheduled Tasks Management” Enable-NetFirewallRule -DisplayGroup “Remote Service Management” Enable-NetFirewallRule -DisplayGroup “Remote Event Log Management” Enable-NetFirewallRule -DisplayGroup “Windows Remote Management” ...
Read More