Good Contents Are Everywhere, But Here, We Deliver The Best of The Best.Please Hold on!
Data is Loading...
Your address will show here +12 34 56 78
PowerShell, Server, Windows
As published in my Technet Gallery Script Center here, you can get current timezones remotely via PowerShell with Get-Timezones. Get-Timezones is using WMI to communicate with your servers.

This will give you following output:

With Set-Timezone you can set timezones remotely. If you need to disable automatic daylight saving time you can add the additional parameter DSTOff.

This will give you following output:

To get a full list of all timezone IDs type “tzutil /l” and you will get following list:



Cluster, Server, Windows
The purpose of this article is to show how to adjust Windows Failover Cluster “Response to resource failure” policy.

If a Cluster Core Resource like File Share Witness or Disk Quorum is in a failing state and offline, the cluster runs into jeopardy and will fail once the active node gets rebooted as no vote can be set to the quorum. To avoid this you should decrease the value of time your cluster core resource attempts to restart. The lower the value the higher the amount of retries your resource has to restart itself.
To increase restart attempts for the Cluster Core Resource you need to adjust the “Response to resource failure” policy from one hour to 15 minutes.

So with a given period for restarts of 15 minutes, maximum restarts in the specified period of 1 and “If all the restart attempts fail, begin restarting again after the specified period of period” of 15 minutes. The resource will try restarting itself again every 15 minutes instead every hour until it’s brought back up online.

Server, Windows
If you’re searching for Windows Server Licensing and Activation Details of your Windows machine you can use following statements

which will give you following output

If you’re searching for some other details like your client machine ID (CMID) you can use following statement

which will give you following output

Both commands work for KMS and Non-KMS clients. It’s always good to have an opportunity to retrieve details like

  • License Status
  • Volume Activation Expiration
  • Client Machine ID (CMID)
  • KMS machine IP address
  • KMS machine extended PID
  • Activation interval
  • Renewal interval
  • Activation ID
  • Application ID
  • Extended PID
  • Produkt Key Channel Volume
  • Installation ID
  • Volume activation expiration
  • Remaining Windows rearm count
  • Reaming SKU rearm count

Hotfix, Patching, PowerShell, Server, Windows
I just wanted to share you a tiny snippet if you’re looking for a simple PowerShell liner to simply get a KB Hotfix installed. It also verifies if the KB is installed already.
Okay this is a small one for you guys but trust me I will wrap it for you into a big function if you want to use it with more than one server or even Credentials.



Server, Windows
Open PowerShell or Commmand Shell, enter following

This will open your device manager with the ability to show hidden devices. Click on View and select “Show hidden devices”.

Select your hidden device you need to remove, right click and select uninstall. That’s it!

In case you need to remove multiple orphan / hidden / ghosted devices like disks on Windows Failover Cluster Nodes you can use Ghostbuster for that. See my other article about Ghostbuster as well.

PowerShell, Server, Windows
Every System Administrator comes into a situation where you want to see who and how many users were logged on to your servers either via Remote Desktop or via script. This little function evaluates the System log with the help of Get-EventLog and delivers you the latest logon and logoff events for every user. 

I’ve left you the Invoke-Command commented if you want to use PowerShell Remoting (WinRM).

Please keep in mind, it evaluates every event, this means even if a user was doing actions remotely using a powershell script or just logged on, it will be displayed as well. If you want to distinguish between script logons you can easily have a look at the logon and logoff times. If a user account was only logged for some seconds … then this is an indicator for a remote script logon.

The script will give you following output:

While using following command you can also query this function to more than just one server:




PowerShell, Server, Windows
Have you ever wondered if there’s an opportunity to easily create a GUI out of every PowerShell Cmdlet?
In many cases this can be very useful for example if your Cmdlet hs too many parameters to list or just to see what’s it offering on Common parameters as well.

Just use the Show-Command cmdlet with any PowerShell cmdlet to bring up a GUI interface.
Let’s try this with the Get-Service Cmdlet and see what’s happening!

You will have three options for executing your command: Run, Copy (for the clipboard), or Cancel.


Network, PowerShell, Server, Windows
In this case we’re going to use the method GetHostAddresses of the Dns class of the Sytem.Net namespace.
For PowerShell 2.0 you can use following Windows PowerShell One Liners:

Name to IP Address (DNS Forward)

IP Address to Name (DNS Reverse)

As of PowerShell 3.0 you can use the method GetHostEntry() for both Forward and Reverse: As of PowerShell 4.0 you can use the Cmdlet Resolve-DnsName as well as for both Forward and Reverse: