Wintel Commands

 

Introduction
PowerShell Get FSMO List
Dig on Windows
cURL on Windows

Introduction

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 @8.8.8.8 dc.ads.linkedin.com +noall +answer
; <<>> DiG 9.10.4-P2 <<>> @8.8.8.8 dc.ads.linkedin.com +noall +answer
 ; (1 server found)
 ;; global options: +cmd
 dc.ads.linkedin.com. 3443 IN CNAME data-collector-linkedin-prod-1517996000.us-west-2.elb.amazonaws.com.
 data-collector-linkedin-prod-1517996000.us-west-2.elb.amazonaws.com. 49 IN A 54.214.29.160
 data-collector-linkedin-prod-1517996000.us-west-2.elb.amazonaws.com. 49 IN A 54.244.118.198
 data-collector-linkedin-prod-1517996000.us-west-2.elb.amazonaws.com. 49 IN A 54.244.90.67
 data-collector-linkedin-prod-1517996000.us-west-2.elb.amazonaws.com. 49 IN A 54.244.225.250

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

C:\Windows\system32>curl publicip.tech
72.171.101.145
Advertisment ad adsense adlogger