How to remove Restricted User warning after MSSQL database restore
You may get Restricted User warning after a database restore if source database is MSSQL Server 2005. You can remove that warning by this SQL query: ALTER DATABASE Your_Database SET SINGLE_USER WITH...
View ArticleHow to disable “Restrict each user to a single session” on Windows Server 2012?
You can disable “Restrict each user to a single session” on Windows Server 2008 by using “Remote Desktop Session Host Configuration”. But that tool is not available on Windows Server 2012. So we should...
View ArticleHow to reset Windows Administrator password?
Boot into command prompt with Windows Server 2008 R2 DVD. 1 2 3 4 C:\ cd windows\system32 ren utilman.exe utilman.exe.bak copy cmd.exe utilman.exe Change windows password by using Utilman (Windows Key...
View ArticleHow to get list of virtual machines with passthrough disks via PowerShell
In this sample script, I use SCVMM 2012 to get virtual machine list. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 $Servers = Get-Content C:\Servers.txt foreach ($Server in $Servers) {...
View ArticlePatching a list of servers with PsExec
First, you need to install PSTools on your server. Copy psexec.exe and pskill.exe into C:\ directory. http://technet.microsoft.com/tr-tr/sysinternals/bb896649 After that you can patch servers like...
View ArticleHow to find parent Hyper-V hostname of virtual machine
You can get parent Hyper-V hostname in virtual machine with this registery key: HKLM\SOFTWARE\Microsoft\Virtual Machine\Guest\Parameters You can also see other parameters like: HostName...
View ArticleExporting HP ProLiant Integrated Management Logs with PowerShell
You can export HP’s IML logs via PowerShell. Execute PowerShell console with Administrative privileges and run: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 $Hostname =...
View ArticleGetting VM information from Hyper-V 2012 via PowerShell
You can get your VMs list, Hyper-V hostname, clustername and csv paths like this: 1 2 3 4 5 6 7 8 9 10 11 $VMs = Get-VM foreach ($VM in $VMs) { $VMName = $VM.Name $VMHostname = $VM.ComputerName...
View ArticleGetting hardware information of AD computers via PowerShell
This is an example to show you how to get hardware information of AD clients via PowerShell. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 $Servers = Get-ADComputer -Filter {Name -like "C*"} Foreach ($Server in...
View ArticleGetting Hyper-V VMs list which has virtual HBA via PowerShell
You can use this script to get virtual machines which has Virtual HBA support. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 $Servers = Get-Content C:\hosts.txt foreach ($Server in $Servers) { $VMs = Get-VM...
View ArticleChecking IP addresses of list of Server Names
You can check ip addresses of server names like this: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 $Servers = Get-Content C:\Servers.txt foreach ($Server in $Servers) { $IPAddress =...
View ArticleFailover Cluster Manager – An error occurred to display cluster information
You may get this error when you try to open Failover Cluster Manager (Windows Server 2012): Failover Cluster Manager failed while managing one or more cluster. The error was ‘An error occurred trying...
View ArticleSearch VM in Hyper-V Hosts via PowerShell
You can search a VM name in your Hyper-V host list like this: $VMName = "Server Name" $Servers = Get-Content C:\servers.txt foreach ($Server in $Servers) { $VMs = Get-WMIObject -Class...
View Article3Par – Allocating Storage for the Windows Server 2012
If you use HP 3PAR OS 3.1.1 MU2 (and only MU2) with Windows Server 2012, you need to run following command for both NTFS and REFS filesystem types. After that you will be able to do quick format on...
View ArticleChecking HP ProLiant Smart Array SAS/SATA Controller Driver for Windows...
If you have “HP ProLiant Smart Array SAS/SATA Controller Driver for Windows Server 2012 x64 Edition (HPCISSS2.SYS) Version 62.26.0.64″, then you need to downgrade it to version 62.24.2.64. Otherwise...
View ArticleStopping SCCM 2007 agent on Windows Server 2012 hosts to avoid WMI lock issues
As you may know, if you have SCCM 2007 agent on your Windows Server 2012, then you may see some problems with WMI. That issue blocks all WMI communication, Remote Desktop Services and Cluster...
View ArticleGetting Passthrough Disk counts and total sizes of all virtual machines in...
You can get all passthrough disks and total disk counts like this: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 $Servers = Get-Content C:\Servers2.txt foreach ($Server...
View ArticleHyper-V Server 2012 Host CPU monitoring with PowerShell
This will give you host and guest CPU usage on your Hyper-V host. 1 2 3 4 5 6 7 $ClusterNode = "Host01" While ($True) { $ChildCPU = ((Get-Counter -ComputerName $ClusterNode -Counter "\Hyper-V...
View ArticleGetting Hyper-V Failover Clusters List via PowerShell
You can get Cluster names from your Hyper-V host list with following PowerShell script: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 # Prepare Cluster Array $ClusterArray = New-Object...
View ArticleGetting Distinguished Names of your AD joined Servers
You can get DNs of your servers with following PowerShell script: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 $DomainServers = Get-ADComputer -Filter * $ChildDomainServers =...
View Article