Skip to content

Instantly share code, notes, and snippets.

@ScriptingPro
ScriptingPro / powershell-promote-domain-controller.ps1
Last active February 1, 2017 05:32
Install Domain Controller Windows Server 2012 R2 Powershell
<#
@scriptingpro
Using powershell to promote a new domain controller
This will Install a new RODC
Todo:
parameterize SafeModeAdministratorPassword (DSRM password)
#>
#First add the Active Directory Domain Services feature to your server
@ScriptingPro
ScriptingPro / check-iis-version.ps1
Created October 27, 2016 20:19
Check IIS Version with Powershell
<#
one-liner to quickly determine IIS version information from a Powershell prompt
#>
Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\InetStp' | select InstallPath, VersionString, @{n="ProductVersion";e={(Get-ItemProperty ($_.InstallPath + "\w3wp.exe")).VersionInfo.ProductVersion}}