PowerShell_Cheat_Sheet.pdf
PowerShell_Cheat_Sheet.pdf
This study source was downloaded by 100000800085370 from CourseHero.com on 09-24-2024 21:53:23 GMT -05:00
Configuring Server Core Configure IP Address New-NetIPAddress -IPAddress 10.10.10.73 -InterfaceAlias
"Ethernet" -DefaultGateway 10.10.10.1 -PrefixLength 24
Configure DNS address Set-DnsClientServerAddress -InterfaceAlias "Ethernet" -
ServerAddresses 10.10.10.70, 10.10.10.1
Join Computer to Add-Computer -DomainName nuggetlab.com
Domain
Active Directory Domain Installing Active Install-WindowsFeature –name AD-Domain-Services
Controller Installation Directory Binaries (See http://cbt.gg/TgXz7S for arguments)
This study source was downloaded by 100000800085370 from CourseHero.com on 09-24-2024 21:53:23 GMT -05:00
Group Policy: Windows Firewall Settings Enable Windows Firewall: Set-NetFirewallProfile
Firewall New Firewall Rule: New-NetFirewallRule
Modify Existing Firewall Rule: Set-NetFirewallRule
IPv6 Advertise IPv6 on set-NetIPInterface -InterfaceAlias "Ethernet 2" -
interface AddressFamily IPv6 -Advertising Enabled
This study source was downloaded by 100000800085370 from CourseHero.com on 09-24-2024 21:53:23 GMT -05:00
The following is sample script that I use to install a domain controller on a GUI Win-12 server. Note that PS scripts are disabled by default and can
be enabled by following instructions here: http://cbt.gg/RQ7azX. General-purpose PowerShell scripts end in “.PS1” Further details about the
specific ADDSDeployment module can be found here: http://cbt.gg/Rbp9DB.
To install AD on a Core installation, much of the script would be the same, but this article explains some additional items you might need:
http://cbt.gg/MfHtet.
Before installing the DC, you will have to install Active Directory Domain Services by running:
Install-windowsfeature -name AD-Domain-Services
Begin Script:
#
# Windows PowerShell script for AD DS Deployment
#
Import-Module ADDSDeployment
Install-ADDSDomainController `
-NoGlobalCatalog:$false `
-CreateDnsDelegation:$false `
-Credential (Get-Credential) `
-CriticalReplicationOnly:$false `
-DatabasePath "C:\Windows\NTDS" `
-DomainName "nuggetlab.com" `
-InstallDns:$true `
-LogPath "C:\Windows\NTDS" `
-NoRebootOnCompletion:$false `
-SiteName "Default-First-Site-Name" `
-SysvolPath "C:\Windows\SYSVOL" `
-Force:$true
This study source was downloaded by 100000800085370 from CourseHero.com on 09-24-2024 21:53:23 GMT -05:00
This study source was downloaded by 100000800085370 from CourseHero.com on 09-24-2024 21:53:23 GMT -05:00
Powered by TCPDF (www.tcpdf.org)