DSCResources/DSC_NetAdapterName/en-US/about_NetAdapterName.help.txt

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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
.NAME
    NetAdapterName
 
.DESCRIPTION
    This resource is used to rename a network interface that matches the search parameters passed in.
 
.PARAMETER NewName
    Key - String
    Specifies the new name of the network adapter.
 
.PARAMETER Name
    Write - String
    This is the name of the network adapter to find.
 
.PARAMETER PhysicalMediaType
    Write - String
    This is the media type of the network adapter to find.
 
.PARAMETER Status
    Write - String
    Allowed values: Up, Disconnected, Disabled
    This is the status of the network adapter to find.
 
.PARAMETER MacAddress
    Write - String
    This is the MAC address of the network adapter to find.
 
.PARAMETER InterfaceDescription
    Write - String
    This is the interface description of the network adapter to find.
 
.PARAMETER InterfaceIndex
    Write - UInt32
    This is the interface index of the network adapter to find.
 
.PARAMETER InterfaceGuid
    Write - String
    This is the interface GUID of the network adapter to find.
 
.PARAMETER DriverDescription
    Write - String
    This is the driver description of the network adapter.
 
.PARAMETER InterfaceNumber
    Write - UInt32
    This is the interface number of the network adapter if more than one are returned by the parameters.
 
.PARAMETER IgnoreMultipleMatchingAdapters
    Write - Boolean
    This switch will suppress an error occurring if more than one matching adapter matches the parameters passed.
 
.EXAMPLE 1
 
Rename three network adapters identified by MAC addresses to
Cluster, Management and SMB and then enable DHCP on them.
 
Configuration NetAdapterName_RenameNetAdapterMacAddress_Config
{
    Import-DSCResource -ModuleName NetworkingDsc
 
    Node localhost
    {
        NetAdapterName RenameNetAdapterCluster
        {
            NewName = 'Cluster'
            MacAddress = '9C-D2-1E-61-B5-DA'
        }
 
        NetIPInterface EnableDhcpClientCluster
        {
            InterfaceAlias = 'Cluster'
            AddressFamily = 'IPv4'
            Dhcp = 'Enabled'
        }
 
        NetAdapterName RenameNetAdapterManagement
        {
            NewName = 'Management'
            MacAddress = '9C-D2-1E-61-B5-DB'
        }
 
        NetIPInterface EnableDhcpClientManagement
        {
            InterfaceAlias = 'Management'
            AddressFamily = 'IPv4'
            Dhcp = 'Enabled'
        }
 
        NetAdapterName RenameNetAdapterSMB
        {
            NewName = 'SMB'
            MacAddress = '9C-D2-1E-61-B5-DC'
        }
 
        NetIPInterface EnableDhcpClientSMB
        {
            InterfaceAlias = 'SMB'
            AddressFamily = 'IPv4'
            Dhcp = 'Enabled'
        }
    }
}
 
.EXAMPLE 2
 
Rename the first three network adapters with Driver Description matching
'Hyper-V Virtual Ethernet Adapter' in consequtive order to Cluster, Management
and SMB and then enable DHCP on them.
 
Configuration NetAdapterName_RenameNetAdapterDriver_Config
{
    Import-DSCResource -ModuleName NetworkingDsc
 
    Node localhost
    {
        NetAdapterName RenameNetAdapterCluster
        {
            NewName = 'Cluster'
            DriverDescription = 'Hyper-V Virtual Ethernet Adapter'
            InterfaceNumber = 1
        }
 
        NetIPInterface EnableDhcpClientCluster
        {
            InterfaceAlias = 'Cluster'
            AddressFamily = 'IPv4'
            Dhcp = 'Enabled'
        }
 
        NetAdapterName RenameNetAdapterManagement
        {
            NewName = 'Management'
            DriverDescription = 'Hyper-V Virtual Ethernet Adapter'
            InterfaceNumber = 2
        }
 
        NetIPInterface EnableDhcpClientManagement
        {
            InterfaceAlias = 'Management'
            AddressFamily = 'IPv4'
            Dhcp = 'Enabled'
        }
 
        NetAdapterName RenameNetAdapterSMB
        {
            NewName = 'SMB'
            DriverDescription = 'Hyper-V Virtual Ethernet Adapter'
            InterfaceNumber = 3
        }
 
        NetIPInterface EnableDhcpClientSMB
        {
            InterfaceAlias = 'SMB'
            AddressFamily = 'IPv4'
            Dhcp = 'Enabled'
        }
    }
}