snippets:winsrv2012:start
Dies ist eine alte Version des Dokuments!
Inhaltsverzeichnis
Windows Server 2012
Set static IP
New-NetIPAddress -IPAddress 10.0.0.2 -InterfaceAlias "Ethernet" -DefaultGateway 10.0.0.1 -AddressFamily IPv4 -PrefixLength 24
Install Active Directory Domain Services (AD DS) and DNS and create a new domain in a new forest
Install-WindowsFeature AD-Domain-Services
Install-ADDSForest -DomainName dc-test.sample.com
Create a DNS Reverse Lookup Zone
Add-DnsServerPrimaryZone 0.0.10.in-addr.arpa -ZoneFile 0.0.10.in-addr.arpa.dns
Create a new user account in Active Directory
New-ADUser -SamAccountName User1 -AccountPassword (read-host "Set user password" -assecurestring) -name "User1" -enabled $true -PasswordNeverExpires $true -ChangePasswordAtLogon $false
Add-ADPrincipalGroupMembership -Identity "CN=User1,CN=Users,DC=dc-test,DC=sample,DC=com" -MemberOf "CN=Enterprise Admins,CN=Users,DC=dc-test,DC=sample,DC=com","CN=Domain Admins,CN=Users,DC=dc-test,DC=sample,DC=com"
Install DHCP role
Install-WindowsFeature –Name DHCP
Bind DHCP to interface
Set-DhcpServerv4Binding -BindingState $true -InterfaceAlias “Local Area Connection”
Authorize DHCP server in AD
Add-DhcpServerInDC -DnsName “DhcpServer.DomainName.com”
Add DHCP scope
Add-DhcpServerv4Scope -Name "Friendly Name of Scope" -StartRange 10.10.10.1 -EndRange 10.10.10.254 -SubnetMask 255.255.255.0
Set DNS server through DHCP
Set-DhcpServerv4OptionValue -OptionId 6 -value 192.168.1.1
Remove AD DC role
Uninstall-ADDSDomainController -LastDomainControllerInDomain –RemoveApplicationPartitions -Force
Remove DHCP scope
Remove-DhcpServerv4Scope -ScopeId 10.10.10.0 -Force
snippets/winsrv2012/start.1366381410.txt.gz · Zuletzt geändert: (Externe Bearbeitung)
