Difference between revisions of "Create a new ad forest, Microsoft Article"
(Created page with "Reference - https://blogs.technet.microsoft.com/heyscriptingguy/2013/01/03/use-powershell-to-deploy-a-new-active-directory-forest/") |
|||
(9 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | Reference - https://blogs.technet.microsoft.com/heyscriptingguy/2013/01/03/use-powershell-to-deploy-a-new-active-directory-forest/ | + | Reference - https://blogs.technet.microsoft.com/heyscriptingguy/2013/01/03/use-powershell-to-deploy-a-new-active-directory-forest/<br> |
+ | '''Configure the dns server using Powershell:'''<br> | ||
+ | Set-DNSClientServerAddress -interfaceIndex 12 -ServerAddresses ("192.168.0.1","8.8.8.8")<br> | ||
+ | Set-DnsClientServerAddress -InterfaceAlias “Wired Ethernet Connection” -ServerAddresses 192.168.0.1, 192.168.0.2 ?? <br> | ||
+ | '''Change ip address:'''<br> | ||
+ | New-NetIPAddress –InterfaceAlias “Ethernet” –IPAddress “192.168.0.33” –PrefixLength 24 -DefaultGateway 192.168.0.1 - no good<br> | ||
+ | '''Get adapter details:'''<br> | ||
+ | Get-Netadapter<br> | ||
+ | '''Removing ip addresses:'''<br> | ||
+ | https://docs.microsoft.com/en-us/powershell/module/nettcpip/remove-netipaddress?view=win10-ps<br> | ||
+ | <br> | ||
+ | '''Getting the ip address:'''<br> | ||
+ | Get-Netipaddress -interfaceindex 12 | select Ipaddress<br> | ||
+ | <br> | ||
+ | '''An example of getting the current ip address:'''<br> | ||
+ | $ipaddress = $(ipconfig | where {$_ -match 'IPv4.+\s(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})' } | out-null; $Matches[1])<br> |
Latest revision as of 18:12, 10 December 2017
Reference - https://blogs.technet.microsoft.com/heyscriptingguy/2013/01/03/use-powershell-to-deploy-a-new-active-directory-forest/
Configure the dns server using Powershell:
Set-DNSClientServerAddress -interfaceIndex 12 -ServerAddresses ("192.168.0.1","8.8.8.8")
Set-DnsClientServerAddress -InterfaceAlias “Wired Ethernet Connection” -ServerAddresses 192.168.0.1, 192.168.0.2 ??
Change ip address:
New-NetIPAddress –InterfaceAlias “Ethernet” –IPAddress “192.168.0.33” –PrefixLength 24 -DefaultGateway 192.168.0.1 - no good
Get adapter details:
Get-Netadapter
Removing ip addresses:
https://docs.microsoft.com/en-us/powershell/module/nettcpip/remove-netipaddress?view=win10-ps
Getting the ip address:
Get-Netipaddress -interfaceindex 12 | select Ipaddress
An example of getting the current ip address:
$ipaddress = $(ipconfig | where {$_ -match 'IPv4.+\s(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})' } | out-null; $Matches[1])