Windows Archives - Sebastian Gräf
206
archive,category,category-windows,category-206,cookies-not-set,ajax_fade,page_not_loaded,,side_area_uncovered_from_content,qode-theme-ver-15.0,qode-theme-bridge,wpb-js-composer js-comp-ver-5.4.7,vc_responsive
 

Windows

You can do everything with PowerShell, yes as well locking your workstation with one simple function call. The function uses the API by importing the user32.dll and is being invoked to lock the workstation. Thanks to Mike Pfeiffer from TechNet for this simple but useful...

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. [code language="powershell"] Function Get-Timezones { <# .SYNOPSIS Retrieves timezones of local or remote computers via WMI. .DESCRIPTION Retrieves timezones of local or remote computers via WMI. .PARAMETER ComputerName A...

If you're searching for Windows Server Licensing and Activation Details of your Windows machine you can use following statements [code language="powershell"] slmgr.vbs -dlv [/code] 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 [code language="powershell"] slmgr.vbs -dli [/code] which...

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. [code language="powershell"] $SourceFolder = "C:\Software" $KB = "KB2999226" if (-not (Get-Hotfix -Id $KB)) { Start-Process -FilePath "wusa.exe"...

Open PowerShell or Commmand Shell, enter following [code language="powershell"] set devmgr_show_nonpresent_devices=1 devmgmt.msc [/code] 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...

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...

While using SQL AlwaysOn in connection with a third node on a different location as a DR solution, the third node is needed only in case there is a real Disaster Recovery. For this purpose in most cases a manual intervention/failover is needed and you...