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

Delete Failed DC from AD

Caution: Using the Ntdsutil utility incorrectly may result in partial or complete loss of Active Directory functionality.   At the command line, type "Ntdsutil" and press ENTER. type "metadata cleanup" and press Enter.  type "connections" and press Enter. type "connect to server <servername>", where <servername> is the domain controller (any functional domain controller in the same domain) Press Enter. Type "quit" and press Enter Type "select operation target" and press Enter Type "list domains" and press Enter (lists all domains in the forest with a number associated with each) Type "select domain <number>", where <number> is the number corresponding to the domain. Press Enter. Type "list sites" and press Enter. Type "select site <number>", where <number> refers to the number of the site, Press Enter. Type "list servers in site" and press Enter. (list all servers in that site with a corresponding number) Type "select server <number>" and press Enter, <number> refers to the domain controller to be removed. Type "quit" and press Enter (Metadata...
Read More

Demoting a DC

Admin Credentials Move all FSMO roles the logged-on user should be a member of the Enterprise Administrators group.  This is required to transfer Schema master or Domain naming master roles. The rest of the operations can be done with a user who is a member of the Domain Administrators group. The most important things to look out for are the following components that are either running or registered against the system: Global Catalog FSMO Roles Bridgehead server General server checks You have enterprise admin credentials Global Catalog To check what servers are functioning as a Domain Controller in your domain, type the following command: dsquery server -domain #DomainName# | dsget server -isgc -dnsname replace #DomainName# with the domain of the DC that you are demoting If you have more than just the DC that you are preparing the demote, then you have nothing else to do as the DCPROMO steps will remove it automatically. If you don’t have any more, follow MS article 296882 to make another DC a...
Read More

Install MS Security Essentials on Server 2012 R2

Microsoft does not fully support this as if you try to install it normally it gives the below error: Your version of the Windows operating system is not supported by this program. Error code 0x8004FF04   Download a copy of MSE from Microsoft: http://windows.microsoft.com/en-us/windows/security-essentials-all-versions Right Click on the mseinstall.exe Click on Properties. Click on the Compatibility tab. Check Run this program in compatibility mode for Select From the drop down menu Windows 7. Open a Command Prompt as Administrator. Navigate to your Downloads folder or where the installer is located example: cd C:\temp mseinstall /disableoslimit and follow the installer prompts ...
Read More

Windows Right-Click ‘Edit’ to Launch Paint.NET Instead of MS Paint

launch the Windows Registry Editor by searching for “regedit” from the Start Menu or Start Screen Computer\HKEY_CLASSES_ROOT\SystemFileAssociations\image\shell\edit\command Right click on the (Default) key and choose Modify Change “%systemroot%\system32\mspaint.exe” to "C:\Program Files\paint.net\PaintDotNet.exe" No need to reboot or log off and back in....
Read More

System administrator does not allow the use of saved credentials to log on the remote computer

1. Go to the Local Group Policy Editor as: Start -> Run -> gpedit.msc 2. From Local Computer Policy , go to the following location: Computer Configuration -> Administrative Templates -> System -> Credentials Delegation. 3. Enable the following settings and add server as” TERMSRV/*” without a quotation  by clicking the option “Show..” from add servers to the list as shown in the below screenshots: Allow delegating default credentials with NTLM-only server authentication. Allow delegating default credentials. Allow delegating saved credentials. Allow delegating saved credentials with NTLM-only server authentication. 4. Now all you need to update/refresh the policy, which you can do by type “gpupdate/force” from command prompt (open in administrator mode) as:...
Read More

Permanent Custom Folder Icon

Make a new folder on the desktop Open notepad and copy and paste this: [.ShellClassInfo] ConfirmFileOp=0 IconFile=Folder.ico IconIndex=0 Save as desktop.ini inside the folder you are changing Put a icon in the folder and name it: Folder.ico Then open Command Prompt and type: attrib +s C:\Users\YOUR USER NAME\Desktop\FOLDER YOU ARE CHANGING Press enter Close Command Prompt This only works if you move and paste the folder not if you copy and paste.  ...
Read More