|
| |
.ListIPMask
Description
- Lists all IP Subnet Masks of the local machine as "nnn.nnn.nnn.nnn", "nnn.nnn.nnn.nnn", etc., one per line.
Syntax
At the Command Prompt
|
C:\>. ListIPMask |
|
C:\>%.ListIPMask% |
|
C:\>FOR /F
%A IN ('%.eListIPMask%') DO @ECHO:%A |
In a Script
|
%.ListIPMask% |
|
FOR /F %%A IN ('%.eListIPMask%')
DO @ECHO:%%A |
Parameters and Switches
Errorlevels and Output Variables
|
Display to
STDOUT |
|
Value of
#IPMask |
|
Error
Level |
|
Description of Result |
|
255.255.255.0
255.255.0.0 |
|
n/a |
|
n/a |
|
All IP Subnet Masks displayed to
STDOUT. |
Examples, Notes and Instructions
NT
2K
XP
K3 |
C:\GuardPost>. ListIPMask
255.255.255.0
255.255.0.0
C:\GuardPost>%.ListIPMask%
255.255.255.0
255.255.0.0
C:\GuardPost>FOR
/F %A IN ('%.eListIPMask%') DO @ECHO:%A
255.255.255.0
255.255.0.0 |
- To separate into individual octets, use
FOR /F "tokens=1-4 delims=." %%A IN ('%.eListIPMask%')
DO @(
ECHO:Octet1=%%A
ECHO:Octet2=%%B
ECHO:Octet3=%%C
ECHO:Octet4=%%D
)
Related .Mount/\Commands, #Constants,
$Functions, :Procedures
|
Resource |
|
Short Description |
|
.GetIPMask |
|
Displays the current Subnet Mask as nnn.nnn.nnn.nnn, or none or multi) -AND- updates #IPMask |
|
.ListIPAddr |
|
Lists one or more IP Addresses as nnn.nnn.nnn.nnn or returns nothing |
|
.ListIPGateway |
|
Lists one or more Default Gateway Addresses as nnn.nnn.nnn.nnn or returns nothing |
|
.ListMac |
|
Lists one or more MACs (Hardware Addresses) as xx-xx-xx-xx-xx-xx or returns nothing |
|
.ListNic |
|
Lists one or more NIC "Description" text(s) from "IPConfig /all" as "text" or returns nothing |
|
#IPAddr |
|
IP Address in nnn.nnn.nnn.nnn format |
|
#IPGateway |
|
IP Default Gateway in nnn.nnn.nnn.nnn format |
|
#mac |
|
Hardware (MAC) address xx-xx-xx-xx-xx-xx format |
|
#nic |
|
NIC description text from "IPConfig /all" |
|
K
E
Y |
Common Commands |
INTERNAL |
External |
/SWITCH |
Parameter |
Help text |
AddonTool |
|
Mounted Commands |
.Mount/\Command |
CmdShorthand |
#Constant |
$FUNCTION |
:Procedure |
!GuardNote |
|
Operating Systems |
NT/2K/XP/K3 |
NT Only |
NT/2K |
2K Only |
2K/XP |
XP Only |
XP/K3 |
K3 Only |
2K/XP/K3 |
|