You have a server named Server1 that runs a Server Core installation of Windows Server 2012.
Server1 is configured to obtain an IPv4 address by using DHCP.
You need to configure the IPv4 settings of the network connection on Server1 as follows:
IP address: 10.1.1.1
Subnet mask: 255.255.240.0
Default gateway: 10.1.1.254
What should you run?
A.
Set-NetlPInterface
B.
netcfg.exe
C.
New-NetlPAddress
D.
msconfig.exe
Explanation:
Set-NetIPInterface
Modifies IP interface properties.
The Set-NetIPInterfacecmdlet modifies IP interface properties such as is DHCP, IPv6 neighbor discovery
settings, router settings and Wake on LAN (WoL) settings.
C
I agree it’s C, with set-netipinterface you can’t modify the gateway, ipaddress and subnets.
You can modify IP Address / Subnet Mask / Gateway with Set-NetIPInterface
https://technet.microsoft.com/en-us/library/ee649158(v=ws.10).aspx
Answer A. is correct in case DHCP is assigning DNS which will remain configured, all the other settings will change.
Answer C. will remove all of the DHCP settings, the new configuration does not have DNS settings.
You can also do this with netsh.exe
http://technet.microsoft.com/en-us/library/hh826150.aspx
C
I think the answer is correct. Don’t you need to disable dhcp first before using Set-NetIPInterface then run New-NetIPAddress to set the IP address?
The real question is can you configure IP address from DHCP to Static using New-NetIPAddress?
I agree with Grant, here is the answer to my question above
Detailed Description
The New-NetIPAddress cmdlet creates and configures an IP address. To create a specific IP address object, specify either an IPv4 address or an IPv6 address, and an interface index or interface alias. We recommend that you define the prefix length, also known as a subnet mask, and a default gateway.
If you run this cmdlet to add an IP address to an interface on which DHCP is already enabled, then DHCP is automatically disabled.
http://technet.microsoft.com/en-us/library/hh826150.aspx
Answer is C
New-NetlPAddress
Applies To: Windows Server 2012
Creates an IP address and the configuration properties of that IP address.
Detailed Description:
The New-NetIPAddress cmdlet creates IP address and the configuration properties of that IP address. To create a specific IP address object, the required parameters include an IP address (IPv4 or IPv6) and an interface (InterfaceIndex or InterfaceAlias). It is also recommended to define the prefix length, also known as a subnet mask, and default gateway.
If DHCP is enabled on the interface to which this cmdlet is configured to, then DHCP will automatically be disabled.
Note: The DefaultGateway parameter sets a route to make the new IP address reachable. The Remove-NetIPAddress cmdlet will also remove this route provided the DefaultGateway parameter.
Parameters:
-AddressFamily
Specifies an IP address family. This property is automatically generated if unspecified. The acceptable values for this parameter are:
— IPv4: IPv4 Address information.
— IPv6: IPv6 address information.
-IPAddress
Creates a specific IPv4 or IPv6 address.
EXAMPLE 1
This command adds a new IPv4 address to the network interface at index 12. The subnet mask is determined by the PrefixLength parameter. In this example, the PrefixLength of 24 is equivalent to a subnet mask of 255.255.255.0. When you add an IPv4 address, the address specified for the Default Gateway must be in the same subnet as the IPv4 address you add.
PS C:\> New-NetIPAddress –InterfaceIndex 12 –IPAddress 192.168.0.1 -PrefixLength 24 -DefaultGateway 192.168.0.5
This command removes the IPv4 address. To remove the IPv4 address, use the Remove-NetIPAddress cmdlet.
PS C:\> Remove-NetIPAddress –IPAddress 192.168.0.1 -DefaultGateway 192.168.0.5
The answer is “A”, as the question is for Modifying the existing ip configuration. “C” is for creating new ip address
http://www.thomasmaurer.ch/2012/04/replace-netsh-with-windows-powershell-basic-network-cmdlets/
New-NetIPAddress
Use this command to create a new IP address and bind it to a network adapter. You cannot use this command to change an IP address.
Set-NetIPAddress
This command changes the configuration of an IP address.
A
C
http://www.tecknowledgebase.com/38/exam-70-410-installing-and-configuring-windows-server-2012-powershell-commands/
C
Explanation:
The New-NetIPAddress cmdlet creates and configures an IP address. To create a specific IP address object, specify either an IPv4 address or an IPv6 address, and an interface index or interface alias. We recommend that you define the prefix length, also known as a subnet mask, and a default gateway.
If you run this cmdlet to add an IP address to an interface on which DHCP is already enabled, then DHCP is automatically disabled.
PS C:\> New-NetIPAddress –InterfaceIndex 12 –IPAddress 192.168.0.1 -PrefixLength 24 -DefaultGateway 192.168.0.5
In my .VCE the answer is “NETSH”
You can also do this with netsh.exe
However there is no netsh.exe here to choose!
Should be C.New-NetlPAddress (as we need to CONFIGURE)
Set-NetlPInterface: Modifies IP address configuration properties of an EXISTING IP address (the question didn’t mention IP already existed)
“Server1 is configured to obtain an IPv4 address by using DHCP”
so IP exist already on server
Answer A in my opinion
Netsh.exe
Set-NetlPInterface: Modifies IP interface properties(like metrics, enable/disable dhcp, enable forwarding and advertising on the ISATAP tunneling interface, Wake On LAN (WOL) settings…)
Set-NetIPAddress (not in avaible answer): add an ip configuration. From https://technet.microsoft.com/en-us/library/hh826151%28v=wps.630%29.aspx:
“..The Set-NetIPAddress cmdlet modifies IP address configuration properties of an existing IP address.
To create an IPv4 address or IPv6 address, use the New-NetIPAddress cmdlet…
Example 1: Modify an IP address
This command adds the IP address 192.168.0.1 to the interface located at index 12.
The PrefixLength parameter may also be specified as part of the Set-NetIPAddress cmdlet.
Windows PowerShell
PS C:\> Set-NetIPAddress –InterfaceIndex 12 –IPAddress 192.168.0.1
PS C:\> Set-NetIPAddress –InterfaceIndex 12 –IPAddress 192.168.0.1 –PrefixLength 24….”
So, New-NetIPAddress I think is the right answer
Karl, Chapeau!
Si. La correcta es New-NetlPAddress. Pero ,¿por qué en las respuestas dice que es Set-NetlPInterface?
Los test de esta web confunden más que ayudan.