Tip of the Day: Windows PowerShell Show-Command

Today’s Tip…

Are you are new to PowerShell and don’t find it easy to go through help every time to prepare a cmdlet?

Show-command <cmdlet> can be used until we get used to writing cmdlets easily by providing GUI to enter input parameters for the cmdlet and then let you copy it. For example, check the install-addsforest cmdlet created using show-command install-addsforest.

clip_image001

After I enter all input parameters, I have below cmdlet ready for execution:

Install-ADDSForest -DomainName Contoso.Local -CreateDnsDelegation -DatabasePath D:\ADData\NTDS -DnsDelegationCredential .\Administrator -DomainMode Win2003 -DomainNetbiosName Contoso12 -ForestMode Win2003 -InstallDns -LogPath D:\ADData\Logs -NoRebootOnCompletion -SysvolPath D:\SYSVOL