PowerShell Archives - Sebastian Gräf
108
archive,category,category-powershell,category-108,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
 

PowerShell

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

If you need a script which outputs you the overall VMCore amount per region, there you go.This is a snippet from a RunBook which iterates also through each subscription before, so you would get all amount of used cores per subscription as well as per region.I...

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.[crayon-5b4e41ff508e6462839774/]This will give you following output:With Set-Timezone you can set timezones remotely. If you need to disable automatic daylight saving time...

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

[vc_row][vc_column][md_text md_text_title1="" md_text_title_separator="no"]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...

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)[crayon-5b4e41ff51533905335139/]IP Address to Name (DNS Reverse)[crayon-5b4e41ff5153b793884269/]As of PowerShell 3.0 you can use the method...