株式会社ヴァンデミックシステム

Blog

<スポンサーリンク>

scconfigなんていらねえ!(いるけど)
ADもインストールしちゃう

# IPアドレス設定
New-NetIPAddress -InterfaceIndex (Get-NetAdapter).IfIndex -IPAddress "192.168.11.231" -AddressFamily IPv4 -PrefixLength 24 -DefaultGateway "192.168.11.1"

# DNS設定
Set-DnsClientServerAddress -InterfaceIndex (Get-NetAdapter).IfIndex -ServerAddresses "192.168.11.1"

# IPアドレス確認
Get-NetIPAddress

# リモートからの実行を許可
Enable-PSRemoting -Force

# サーバ名変更
Rename-Computer -NewName SERVERCOREADDS -Force -Restart

# ここからリモート接続
$user = 'administrator'
$password = ConvertTo-SecureString -AsPlainText '!QAZxsw2' -Force
$Credential = New-Object System.Management.Automation.PsCredential($user, $password)
Enter-PSSession -ComputerName 192.168.11.231 -Credential $Credential

# ActiveDirectoryインストール
Install-WindowsFeature AD-Domain-Services,GPMC -IncludeManagementTools

$pass = ConvertTo-SecureString -AsPlainText "!QAZxsw2" -Force
Install-ADDSForest -DomainName vamdemic.co.local -ForestMode Default -DomainMode Default -InstallDns:$true -CreateDnsDelegation:$false -DomainNetbiosName VAMDEMIC -DatabasePath C:\Windows\NTDS -LogPath C:\windows\NTDS -SysvolPath C:\windows\sysvol -NoRebootOnCompletion:$false -Force:$true -SafeModeAdministratorPassword $pass

Import-Module ActiveDirectory
Get-Service -Name ADWS | Restart-Service  -Force
Get-ADDoamin

<スポンサーリンク>

コメントを残す

Allowed tags:  you may use these HTML tags and attributes: <a href="">, <strong>, <em>, <h1>, <h2>, <h3>
Please note:  all comments go through moderation.

*

日本語が含まれない投稿は無視されますのでご注意ください。(スパム対策)