Wintel Commands


PowerShell Get FSMO List
Dig on Windows
cURL on Windows


This Wintel Commands dedicated page is meant to play the role of a central source and will be continually updated. Most of the commands will use the Powershell language.

If you’d like to help please use the contact page and send me a message.

PowerShell: Get List of FSMO Role Holders

Get-ADDomain | Select-Object InfrastructureMaster, RIDMaster, PDCEmulator
Get-ADForest | Select-Object DomainNamingMaster, SchemaMaster
Get-ADDomainController -Filter * | Select-Object Name, Domain, Forest, OperationMasterRoles | Where-Object {$_.OperationMasterRoles} | Format-Table -AutoSize

Dig Command on Windows

Don’t you feel like something is missing when you come from working on Linux for a while then switch back to Windows? These tips will make your command prompt feel a little more like the Bash shell:

Dig – you can still use dig on Windows and it’s extremely easy. Simply visit the Internet Systems Consortium’s site and download the latest stable version of Bind for your architecture of Windows (usually x64). Run the install but only install the Tools. This will install the executable for dig at this location C:\Program Files\ISC BIND 9\bin\dig.exe. Now all you have to do is point your environmental variables to look at that directory. You can download the script here or just copy and paste the two lines below:

$CurrentValue = [Environment]::GetEnvironmentVariable(“Path”, “Machine”)
[Environment]::SetEnvironmentVariable(“Path”, $CurrentValue + “;C:\Program Files\ISC BIND 9\bin”, “Machine”)

After you’ve completed those steps you can run dig queries once you’ve opened a new command window:

C:\Windows\system32>dig @ +noall +answer
; <<>> DiG 9.10.4-P2 <<>> @ +noall +answer
 ; (1 server found)
 ;; global options: +cmd 3443 IN CNAME 49 IN A 49 IN A 49 IN A 49 IN A

cURL Command on Windows

You can download it here or use this direct link then throw it in your Windows directory. Test it out by querying your public IP address

Advertisment ad adsense adlogger