Skip to content

Commit 963e8ad

Browse files
committed
Ping Sweep and Reverse lookup example tools with powershell
1 parent 37b19b5 commit 963e8ad

File tree

4 files changed

+18
-0
lines changed

4 files changed

+18
-0
lines changed

Blog/PowerShell/Get-FSMO.ps1

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# From Scripting Guys Blog
2+
# https://blogs.technet.microsoft.com/heyscriptingguy/2014/11/28/powertip-use-powershell-to-get-list-of-fsmo-role-holders/
3+
Get-ADDomain | Select-Object InfrastructureMaster, RIDMaster, PDCEmulator
4+
Get-ADForest | Select-Object DomainNamingMaster, SchemaMaster
5+
Get-ADDomainController -Filter * |
6+
Select-Object Name, Domain, Forest, OperationMasterRoles |
7+
Where-Object {$_.OperationMasterRoles} |
8+
Format-Table -AutoSize
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#Paolo Frigo, ScriptingLibrary.com
2+
#Ping sweep and reverse lookup together
3+
(1..254) | % {$ip="10.0.40.$_"; Write-output "$IP $(test-connection -computername "$ip" -quiet -count 1) $( Resolve-DnsName $ip -ErrorAction Ignore |select -exp NameHost ) "}

Blog/PowerShell/PingSweepExample.ps1

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#Paolo Frigo, scriptinglibrary.com
2+
#Ping Sweep
3+
(1..254) | % {$ip="10.0.40.$_"; Write-output "$IP $(test-connection -computername "$ip" -quiet -count 1)"}
+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
#Paolo Frigo, ScriptingLibrary.com
3+
#Reverse Lookup
4+
(1..254) | % {$ip="10.0.40.$_"; Write-output "$IP $( Resolve-DnsName $ip -ErrorAction Ignore |select -exp NameHost ) "}

0 commit comments

Comments
 (0)