aboutsummaryrefslogtreecommitdiff
path: root/docs/Recon/Resolve-IPAddress.md
blob: 744c764bf9c98517883ebfd0ec6ae471bf36a16b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Resolve-IPAddress

## SYNOPSIS
Resolves a given hostename to its associated IPv4 address.

Author: Will Schroeder (@harmj0y)  
License: BSD 3-Clause  
Required Dependencies: None

## SYNTAX

```
Resolve-IPAddress [[-ComputerName] <String[]>]
```

## DESCRIPTION
Resolves a given hostename to its associated IPv4 address using
\[Net.Dns\]::GetHostEntry().
If no hostname is provided, the default
is the IP address of the localhost.

## EXAMPLES

### -------------------------- EXAMPLE 1 --------------------------
```
Resolve-IPAddress -ComputerName SERVER
```

### -------------------------- EXAMPLE 2 --------------------------
```
@("SERVER1", "SERVER2") | Resolve-IPAddress
```

## PARAMETERS

### -ComputerName
{{Fill ComputerName Description}}

```yaml
Type: String[]
Parameter Sets: (All)
Aliases: HostName, dnshostname, name

Required: False
Position: 1
Default value: $Env:COMPUTERNAME
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
```

## INPUTS

### String

Accepts one or more IP address strings on the pipeline.

## OUTPUTS

### System.Management.Automation.PSCustomObject

A custom PSObject with the ComputerName and IPAddress.

## NOTES

## RELATED LINKS