Merge branch 'DNS'
This commit is contained in:
commit
7781858590
@ -3,9 +3,6 @@
|
|||||||
|
|
||||||
# Script to install and configure a Fuckdows Server 2016 as a router
|
# Script to install and configure a Fuckdows Server 2016 as a router
|
||||||
# RTR-01 Only
|
# RTR-01 Only
|
||||||
# Script done
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
echo "Shamefully made by Alexandre Simao. Pardon-me M. Stallman"
|
echo "Shamefully made by Alexandre Simao. Pardon-me M. Stallman"
|
||||||
|
|
||||||
@ -54,7 +51,7 @@ netsh interface ip set address name="WAN" static 192.168.255.8 255.255.255.0
|
|||||||
### DNS Conf for all InterfaceAlias ###
|
### DNS Conf for all InterfaceAlias ###
|
||||||
|
|
||||||
echo "DNS conf"
|
echo "DNS conf"
|
||||||
foreach ($c in Get-NetAdapter) { write-host 'Setting DNS for' $c.interfaceName ; Set-DnsClientServerAddress -InterfaceIndex $c.interfaceindex -ServerAddresses ('9.9.9.9') }
|
foreach ($c in Get-NetAdapter) { write-host 'Setting DNS for' $c.interfaceName ; Set-DnsClientServerAddress -InterfaceIndex $c.interfaceindex -ServerAddresses ('192.168.8.1') }
|
||||||
|
|
||||||
# End of scriptlet
|
# End of scriptlet
|
||||||
|
|
||||||
@ -114,6 +111,9 @@ route add -p 0.0.0.0/0 192.168.255.254
|
|||||||
|
|
||||||
# End of scriptlet
|
# End of scriptlet
|
||||||
|
|
||||||
|
# Add BGINFO autostart
|
||||||
|
|
||||||
|
Copy-Item "c:\Program Files\BGINFO\bginfo.bat" "C:\Users\Administrateur\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup"
|
||||||
|
|
||||||
Read-Host "Finished???"
|
Read-Host "Finished???"
|
||||||
Restart-Computer
|
Restart-Computer
|
||||||
|
@ -43,15 +43,15 @@ echo "Done!"
|
|||||||
#WAN
|
#WAN
|
||||||
|
|
||||||
echo "IP conf via netsh for WAN"
|
echo "IP conf via netsh for WAN"
|
||||||
netsh interface ip set address name="WAN" static 192.168.255.128 255.255.255.0 192.168.255.254
|
netsh interface ip set address name="WAN" static 192.168.255.128 255.255.255.0
|
||||||
echo "Done!"
|
echo "Done!"
|
||||||
|
|
||||||
# END
|
# END
|
||||||
|
|
||||||
### DNS Conf for all InterfaceAlias
|
### DNS Conf for all InterfaceAlias
|
||||||
|
|
||||||
echo "Configuring Dns for 9.9.9.9 on all interfaces"
|
echo "Configuring Dns for 192.168.8.1 on all interfaces"
|
||||||
foreach ($c in Get-NetAdapter) { write-host 'Setting DNS for' $c.interfaceName ; Set-DnsClientServerAddress -InterfaceIndex $c.interfaceindex -ServerAddresses ('9.9.9.9') }
|
foreach ($c in Get-NetAdapter) { write-host 'Setting DNS for' $c.interfaceName ; Set-DnsClientServerAddress -InterfaceIndex $c.interfaceindex -ServerAddresses ('192.168.8.1') }
|
||||||
echo "Done!"
|
echo "Done!"
|
||||||
|
|
||||||
#End
|
#End
|
||||||
@ -106,5 +106,9 @@ route add -p 192.168.12.0/24 192.168.255.8
|
|||||||
route add -p 0.0.0.0/0 192.168.255.254
|
route add -p 0.0.0.0/0 192.168.255.254
|
||||||
echo "Done!"
|
echo "Done!"
|
||||||
|
|
||||||
|
# Add BGINFO autostart
|
||||||
|
|
||||||
|
Copy-Item "c:\Program Files\BGINFO\bginfo.bat" "C:\Users\Administrateur\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup"
|
||||||
|
|
||||||
Read-Host "Press enter to reboot"
|
Read-Host "Press enter to reboot"
|
||||||
Restart-Computer
|
Restart-Computer
|
||||||
|
@ -49,8 +49,8 @@ echo "Done!"
|
|||||||
|
|
||||||
### DNS Conf for all InterfaceAlias
|
### DNS Conf for all InterfaceAlias
|
||||||
|
|
||||||
echo "Setting 9.9.9.9 as default DNS on all interfaces"
|
echo "Setting 192.168.8.1 as default DNS on all interfaces"
|
||||||
foreach ($c in Get-NetAdapter) { write-host 'Setting DNS for' $c.interfaceName ; Set-DnsClientServerAddress -InterfaceIndex $c.interfaceindex -ServerAddresses ('9.9.9.9') }
|
foreach ($c in Get-NetAdapter) { write-host 'Setting DNS for' $c.interfaceName ; Set-DnsClientServerAddress -InterfaceIndex $c.interfaceindex -ServerAddresses ('192.168.8.1') }
|
||||||
echo "Done!"
|
echo "Done!"
|
||||||
|
|
||||||
#End
|
#End
|
||||||
@ -103,6 +103,10 @@ echo "Done!"
|
|||||||
echo "Renew DHCP Lease to be sure"
|
echo "Renew DHCP Lease to be sure"
|
||||||
ipconfig /renew
|
ipconfig /renew
|
||||||
|
|
||||||
|
# Add BGINFO autostart
|
||||||
|
|
||||||
|
Copy-Item "c:\Program Files\BGINFO\bginfo.bat" "C:\Users\Administrateur\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup"
|
||||||
|
|
||||||
#reboot
|
#reboot
|
||||||
|
|
||||||
Read-Host "Press enter to reboot"
|
Read-Host "Press enter to reboot"
|
||||||
|
@ -2,16 +2,16 @@
|
|||||||
# GPL v3
|
# GPL v3
|
||||||
|
|
||||||
# SRV-01 ONLY
|
# SRV-01 ONLY
|
||||||
# TODO : exclusion/attribution fields
|
# Microdown.local domain
|
||||||
# Rename interfaces
|
|
||||||
#
|
# TODO: Set Option 15
|
||||||
|
|
||||||
echo "Shamefully made by Alexandre Simao. Pardon-me M. Stallman"
|
echo "Shamefully made by Alexandre Simao. Pardon-me M. Stallman"
|
||||||
|
|
||||||
### Rename this piece of garbage
|
### Rename this piece of garbage
|
||||||
|
|
||||||
echo "Changing Computer's name"
|
echo "Changing Computer's name"
|
||||||
Rename-computer "SRV-1"
|
Rename-computer "SRV-01"
|
||||||
# End
|
# End
|
||||||
|
|
||||||
### Rename interfaces by parsing VM device name
|
### Rename interfaces by parsing VM device name
|
||||||
@ -112,13 +112,36 @@ route add -p 192.168.128.0/24 192.168.8.254
|
|||||||
route add -p 0.0.0.0/0 192.168.8.254
|
route add -p 0.0.0.0/0 192.168.8.254
|
||||||
# END
|
# END
|
||||||
|
|
||||||
### Change DHCP server options
|
|
||||||
|
|
||||||
echo "Adding DHCP server options"
|
echo "Adding DHCP server options"
|
||||||
Set-DhcpServerv4OptionValue -ScopeId 192.168.128.0 -Router 192.168.128.254
|
Set-DhcpServerv4OptionValue -ScopeId 192.168.128.0 -Router 192.168.128.254
|
||||||
Set-DhcpServerv4OptionValue -ScopeId 192.168.12.0 -Router 192.168.12.254
|
Set-DhcpServerv4OptionValue -ScopeId 192.168.12.0 -Router 192.168.12.254
|
||||||
Set-DhcpServerv4OptionValue -ScopeId 192.168.8.0 -Router 192.168.8.254
|
Set-DhcpServerv4OptionValue -ScopeId 192.168.8.0 -Router 192.168.8.254
|
||||||
Get-DhcpServerv4Scope | Set-DhcpServerv4OptionValue -DnsServer 192.168.8.1
|
Get-DhcpServerv4Scope | Set-DhcpServerv4OptionValue -DnsServer 192.168.8.1
|
||||||
|
=======
|
||||||
|
### Installing and configuring DNS role
|
||||||
|
|
||||||
|
|
||||||
|
# Install and configure DNS server
|
||||||
|
|
||||||
|
Install-WindowsFeature -Name DNS -IncludeManagementTools -includeallsubfeature
|
||||||
|
|
||||||
|
Add-DnsServerPrimaryZone -NetworkID 192.168.8.0/24 -ZoneFile “192.168.8.1.in-addr.arpa.dns” # Zone secondaire
|
||||||
|
Add-DnsServerPrimaryZone -Name "microdown.local" -ZoneFile "microdown.local.dns"
|
||||||
|
Add-DnsServerForwarder -IPAddress 9.9.9.9 -PassThru # Forward
|
||||||
|
|
||||||
|
Add-DnsServerResourceRecordA -Name "SRV-01" -ZoneName "microdown.local" -IPv4Address "192.168.8.1" -TimeToLive 01:00:00
|
||||||
|
Add-DnsServerResourceRecordA -Name "SRV-02" -ZoneName "microdown.local" -IPv4Address "192.168.8.2" -TimeToLive 01:00:00
|
||||||
|
Add-DnsServerResourceRecordA -Name "NAT" -ZoneName "microdown.local" -IPv4Address "192.168.255.254" -TimeToLive 01:00:00
|
||||||
|
|
||||||
|
Test-DnsServer -IPAddress 192.168.8.1 -ZoneName "www.darty.fr" #Test
|
||||||
|
|
||||||
|
# Add local DNS for all Hosts
|
||||||
|
|
||||||
|
echo "Add local DNS for all Hosts"
|
||||||
|
Get-DhcpServerv4Scope | Set-DhcpServerv4OptionValue -DnsServer 192.168.8.1
|
||||||
|
Get-DhcpServerv4Scope | Set-DhcpServerv4OptionValue -DnsServer 192.168.128.1
|
||||||
|
|
||||||
Read-Host "Finished?"
|
Read-Host "Finished?"
|
||||||
Restart-Computer
|
Restart-Computer
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
<<<<<<< HEAD
|
||||||
# Alexandre Simao
|
# Alexandre Simao
|
||||||
# GPL v3
|
# GPL v3
|
||||||
|
|
||||||
@ -122,3 +123,96 @@ Get-DhcpServerv4Scope | Set-DhcpServerv4OptionValue -DnsServer 192.168.8.1
|
|||||||
|
|
||||||
Read-Host "Finished?"
|
Read-Host "Finished?"
|
||||||
Restart-Computer
|
Restart-Computer
|
||||||
|
=======
|
||||||
|
# Alexandre Simao
|
||||||
|
# GPL v3
|
||||||
|
|
||||||
|
# SRV-01 ONLY
|
||||||
|
# Microdown.local domain
|
||||||
|
|
||||||
|
# TODO:
|
||||||
|
|
||||||
|
echo "Shamefully made by Alexandre Simao. Pardon-me M. Stallman"
|
||||||
|
|
||||||
|
### Rename this piece of garbage
|
||||||
|
|
||||||
|
echo "Changing Computer's name"
|
||||||
|
Rename-computer "SRV-03"
|
||||||
|
# End
|
||||||
|
|
||||||
|
### Rename interfaces by parsing VM device name
|
||||||
|
|
||||||
|
echo "Renaming adapters"
|
||||||
|
$adapts = Get-NetAdapter
|
||||||
|
foreach ($adapt in $adapts) {
|
||||||
|
$HVName = (Get-NetAdapterAdvancedProperty -name $adapt.name -DisplayName "Hyper-v Network Adapter Name").DisplayValue
|
||||||
|
Rename-Netadapter -name $adapt.name -NewName $HVName
|
||||||
|
}
|
||||||
|
#End
|
||||||
|
|
||||||
|
# Pausing to let things settle
|
||||||
|
|
||||||
|
echo "Sleeping 10s"
|
||||||
|
Sleep 10
|
||||||
|
|
||||||
|
### Général IP configure
|
||||||
|
# echo "IP configuration"
|
||||||
|
|
||||||
|
#Arc-SRV
|
||||||
|
|
||||||
|
netsh interface ip set address name="Bou-LAN" static 192.168.128.1 255.255.255.0 192.168.128.254
|
||||||
|
|
||||||
|
### DNS Conf for all InterfaceAlias ###
|
||||||
|
|
||||||
|
echo "DNS Conf"
|
||||||
|
foreach ($c in Get-NetAdapter) { write-host 'Setting DNS for' $c.interfaceName ; Set-DnsClientServerAddress -InterfaceIndex $c.interfaceindex -ServerAddresses ('192.168.8.1') }
|
||||||
|
|
||||||
|
### Setting connection as Private
|
||||||
|
|
||||||
|
echo "Setting connection as Private"
|
||||||
|
Set-NetConnectionProfile -NetworkCategory Private
|
||||||
|
|
||||||
|
### Change ZoneAlarm rule to accept incoming ICMP ipv4 probes
|
||||||
|
|
||||||
|
echo "Allowing ICMPv4 probes"
|
||||||
|
$Params = @{
|
||||||
|
"Name" = 'vm-monitoring-icmpv4'
|
||||||
|
"Action" = 'Allow'
|
||||||
|
}
|
||||||
|
|
||||||
|
Set-NetFirewallRule @Params
|
||||||
|
# END
|
||||||
|
|
||||||
|
### Add routes for RTR-01
|
||||||
|
|
||||||
|
echo "Add routes for RTR-01"
|
||||||
|
route add -p 192.168.12.0/24 192.168.128.254
|
||||||
|
route add -p 192.168.255.0/24 192.168.128.254
|
||||||
|
route add -p 0.0.0.0/0 192.168.128.254
|
||||||
|
# END
|
||||||
|
|
||||||
|
|
||||||
|
### Installing and configuring DNS role
|
||||||
|
|
||||||
|
|
||||||
|
# Install and configure DNS server
|
||||||
|
|
||||||
|
#Install-WindowsFeature -Name DNS -IncludeManagementTools -includeallsubfeature#
|
||||||
|
|
||||||
|
#Add-DnsServerPrimaryZone -NetworkID 192.168.8.0/24 -ZoneFile “192.168.8.1.in-addr.arpa.dns” # Zone secondaire
|
||||||
|
#Add-DnsServerPrimaryZone -Name "microdown.local" -ZoneFile "microdown.local.dns"
|
||||||
|
#Add-DnsServerForwarder -IPAddress 9.9.9.9 -PassThru # Forward
|
||||||
|
|
||||||
|
#Add-DnsServerResourceRecordA -Name "SRV-01" -ZoneName "microdown.local" -IPv4Address "192.168.8.1" -TimeToLive 01:00:00
|
||||||
|
#Add-DnsServerResourceRecordA -Name "SRV-02" -ZoneName "microdown.local" -IPv4Address "192.168.8.2" -TimeToLive 01:00:00
|
||||||
|
#Add-DnsServerResourceRecordA -Name "NAT" -ZoneName "microdown.local" -IPv4Address "192.168.255.254" -TimeToLive 01:00:00
|
||||||
|
|
||||||
|
#Test-DnsServer -IPAddress 192.168.8.1 -ZoneName "www.darty.fr" #Test
|
||||||
|
|
||||||
|
# Add BGINFO autostart
|
||||||
|
|
||||||
|
C:\Program Files\BGINFO\Bginfo64.exe mescouilles2.bgi /all /nolicprompt
|
||||||
|
|
||||||
|
Read-Host "Finished?"
|
||||||
|
Restart-Computer
|
||||||
|
>>>>>>> DNS
|
||||||
|
@ -11,9 +11,17 @@ echo "Adding and configuring CLI-01"
|
|||||||
cp D:\VHD\Base\Base_Client_dif.vhdx D:\VHD\CLI-01.vhdx
|
cp D:\VHD\Base\Base_Client_dif.vhdx D:\VHD\CLI-01.vhdx
|
||||||
|
|
||||||
Mount-VHD d:\VHD\CLI-01.vhdx
|
Mount-VHD d:\VHD\CLI-01.vhdx
|
||||||
|
<<<<<<< HEAD
|
||||||
Copy-Item d:\Scripts\Unattend\Fullunattend-Win10.xml -Destination f:\Windows\Panther\Unattend.xml
|
Copy-Item d:\Scripts\Unattend\Fullunattend-Win10.xml -Destination f:\Windows\Panther\Unattend.xml
|
||||||
|
=======
|
||||||
|
Copy-Item d:\Unattend\Fullunattend-Win10.xml -Destination f:\Windows\Panther\Unattend.xml
|
||||||
|
>>>>>>> DNS
|
||||||
#mkdir e:\Tools\Scripts
|
#mkdir e:\Tools\Scripts
|
||||||
#Copy-item d:\Scripts\Guests\CLI-01.ps1 E:\Tools\scripts
|
#Copy-item d:\Scripts\Guests\CLI-01.ps1 E:\Tools\scripts
|
||||||
|
mkdir "f:\Program Files\BGINFO"
|
||||||
|
Copy-Item d:\Soft\BGInfo_Deploiement\BGInfo.exe "f:\Program Files\BGINFO"
|
||||||
|
Copy-Item d:\Soft\BGInfo_Deploiement\mescouilles2.bgi "f:\Program Files\BGINFO"
|
||||||
|
Copy-Item D:\Soft\BGInfo_Deploiement\bginfox86.bat "f:\Users\AdminLocal\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup"
|
||||||
Dismount-VHD d:\VHD\CLI-01.vhdx
|
Dismount-VHD d:\VHD\CLI-01.vhdx
|
||||||
|
|
||||||
$vms = @{
|
$vms = @{
|
||||||
@ -39,9 +47,17 @@ echo "Adding and configuring CLI-03"
|
|||||||
cp D:\VHD\Base\Base_Client_dif.vhdx D:\VHD\CLI-03.vhdx
|
cp D:\VHD\Base\Base_Client_dif.vhdx D:\VHD\CLI-03.vhdx
|
||||||
|
|
||||||
Mount-VHD d:\VHD\CLI-03.vhdx
|
Mount-VHD d:\VHD\CLI-03.vhdx
|
||||||
|
<<<<<<< HEAD
|
||||||
Copy-Item d:\Scripts\Unattend\Fullunattend-Win10.xml -Destination f:\Windows\Panther\Unattend.xml
|
Copy-Item d:\Scripts\Unattend\Fullunattend-Win10.xml -Destination f:\Windows\Panther\Unattend.xml
|
||||||
|
=======
|
||||||
|
Copy-Item d:\Unattend\Fullunattend-Win10.xml -Destination f:\Windows\Panther\Unattend.xml
|
||||||
|
>>>>>>> DNS
|
||||||
#mkdir e:\Tools\Scripts
|
#mkdir e:\Tools\Scripts
|
||||||
#Copy-item d:\Scripts\Guests\CLI-03.ps1 E:\Tools\scripts
|
#Copy-item d:\Scripts\Guests\CLI-03.ps1 E:\Tools\scripts
|
||||||
|
mkdir "f:\Program Files\BGINFO"
|
||||||
|
Copy-Item d:\Soft\BGInfo_Deploiement\BGInfox86.exe "f:\Program Files\BGINFO"
|
||||||
|
Copy-Item d:\Soft\BGInfo_Deploiement\mescouilles2.bgi "f:\Program Files\BGINFO"
|
||||||
|
Copy-Item D:\Soft\BGInfo_Deploiement\bginfox86.bat "f:\Users\AdminLocal\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup"
|
||||||
Dismount-VHD d:\VHD\CLI-03.vhdx
|
Dismount-VHD d:\VHD\CLI-03.vhdx
|
||||||
|
|
||||||
$vms = @{
|
$vms = @{
|
||||||
|
@ -11,10 +11,20 @@ echo "Adding and configuring SRV-01"
|
|||||||
cp D:\VHD\Base\Base_SRV_diff.vhdx D:\VHD\SRV-01.vhdx
|
cp D:\VHD\Base\Base_SRV_diff.vhdx D:\VHD\SRV-01.vhdx
|
||||||
|
|
||||||
Mount-VHD d:\VHD\SRV-01.vhdx
|
Mount-VHD d:\VHD\SRV-01.vhdx
|
||||||
|
<<<<<<< HEAD
|
||||||
Copy-Item D:\Scripts\Unattend\FullUnattend-srv.xml -Destination e:\Windows\Panther\Unattend.xml
|
Copy-Item D:\Scripts\Unattend\FullUnattend-srv.xml -Destination e:\Windows\Panther\Unattend.xml
|
||||||
Copy-Item D:\Scripts\deploy.cmd -Destination e:\conf\deploy.cmd
|
Copy-Item D:\Scripts\deploy.cmd -Destination e:\conf\deploy.cmd
|
||||||
mkdir e:\Tools\Scripts
|
mkdir e:\Tools\Scripts
|
||||||
Copy-item d:\Scripts\Guests\SRV-01.ps1 E:\Tools\scripts\boot.ps1
|
Copy-item d:\Scripts\Guests\SRV-01.ps1 E:\Tools\scripts\boot.ps1
|
||||||
|
=======
|
||||||
|
Copy-Item d:\Unattend\server.xml -Destination e:\Windows\Panther\Unattend.xml
|
||||||
|
mkdir e:\Tools\Scripts
|
||||||
|
mkdir "e:\Program Files\BGINFO"
|
||||||
|
Copy-item d:\Scripts\Guests\SRV-01.ps1 E:\Tools\scripts\boot.ps1
|
||||||
|
Copy-Item D:\Soft\BGInfo_Deploiement\BGInfo64.exe "e:\Program Files\BGINFO\"
|
||||||
|
Copy-Item D:\Soft\BGInfo_Deploiement\mescouilles2.bgi "e:\Program Files\BGINFO\"
|
||||||
|
Copy-Item D:\Soft\BGInfo_Deploiement\bginfo.bat "e:\Program Files\BGINFO\"
|
||||||
|
>>>>>>> DNS
|
||||||
Dismount-VHD d:\VHD\SRV-01.vhdx
|
Dismount-VHD d:\VHD\SRV-01.vhdx
|
||||||
|
|
||||||
$vms = @{
|
$vms = @{
|
||||||
@ -39,12 +49,24 @@ Set-VMNetworkAdapter -VMName 'SRV-01' -Name "Arc-SRV" -DeviceNaming on
|
|||||||
echo "Adding and configuring SRV-03"
|
echo "Adding and configuring SRV-03"
|
||||||
cp D:\VHD\Base\Base_SRV_diff.vhdx D:\VHD\SRV-03.vhdx
|
cp D:\VHD\Base\Base_SRV_diff.vhdx D:\VHD\SRV-03.vhdx
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
Mount-VHD d:\VHD\SRV-03.vhdx |Get-Disk
|
Mount-VHD d:\VHD\SRV-03.vhdx |Get-Disk
|
||||||
Copy-Item D:\Scripts\Unattend\FullUnattend-srv.xml -Destination e:\Windows\Panther\Unattend.xml
|
Copy-Item D:\Scripts\Unattend\FullUnattend-srv.xml -Destination e:\Windows\Panther\Unattend.xml
|
||||||
Copy-Item D:\Scripts\deploy.cmd -Destination e:\conf\deploy.cmd
|
Copy-Item D:\Scripts\deploy.cmd -Destination e:\conf\deploy.cmd
|
||||||
mkdir e:\Tools\Scripts
|
mkdir e:\Tools\Scripts
|
||||||
#Copy-item d:\Scripts\Guests\SRV-03.ps1 E:\Tools\scripts\boot.ps1
|
#Copy-item d:\Scripts\Guests\SRV-03.ps1 E:\Tools\scripts\boot.ps1
|
||||||
Dismount-VHD d:\VHD\SRV-03.vhdx
|
Dismount-VHD d:\VHD\SRV-03.vhdx
|
||||||
|
=======
|
||||||
|
Mount-VHD d:\VHD\SRV-03.vhdx
|
||||||
|
Copy-Item d:\Unattend\server.xml -Destination e:\Windows\Panther\Unattend.xml
|
||||||
|
mkdir e:\Tools\Scripts
|
||||||
|
mkdir "e:\Program Files\BGINFO"
|
||||||
|
Copy-item d:\Scripts\Guests\SRV-03.ps1 E:\Tools\scripts\boot.ps1
|
||||||
|
Copy-Item D:\Soft\BGInfo_Deploiement\BGInfo64.exe "e:\Program Files\BGINFO\"
|
||||||
|
Copy-Item D:\Soft\BGInfo_Deploiement\mescouilles2.bgi "e:\Program Files\BGINFO\"
|
||||||
|
Copy-Item D:\Soft\BGInfo_Deploiement\bginfo.bat "e:\Program Files\BGINFO\"
|
||||||
|
Dismount-VHD d:\VHD\SRV-01.vhdx
|
||||||
|
>>>>>>> DNS
|
||||||
|
|
||||||
$vms = @{
|
$vms = @{
|
||||||
|
|
||||||
@ -53,15 +75,24 @@ $vms = @{
|
|||||||
MemoryStartupBytes = 1024Mb
|
MemoryStartupBytes = 1024Mb
|
||||||
VHDPath = "d:\VHD\SRV-03.vhdx"
|
VHDPath = "d:\VHD\SRV-03.vhdx"
|
||||||
SwitchName = "Bou-LAN"
|
SwitchName = "Bou-LAN"
|
||||||
|
<<<<<<< HEAD
|
||||||
}
|
}
|
||||||
|
=======
|
||||||
|
|
||||||
|
>>>>>>> DNS
|
||||||
|
|
||||||
New-VM @vms
|
New-VM @vms
|
||||||
Set-VMMemory SRV-03 -DynamicMemoryEnabled $true -MinimumBytes 512MB -StartupBytes 1024MB -MaximumBytes 2GB
|
Set-VMMemory SRV-03 -DynamicMemoryEnabled $true -MinimumBytes 512MB -StartupBytes 1024MB -MaximumBytes 2GB
|
||||||
Set-VM -Name SRV-03 -ProcessorCount 2
|
Set-VM -Name SRV-03 -ProcessorCount 2
|
||||||
|
|
||||||
echo "Configuring adapters"
|
echo "Configuring adapters"
|
||||||
|
<<<<<<< HEAD
|
||||||
Rename-VMNetworkAdapter -VMName 'SRV-03' -NewName 'Bou-LAN'
|
Rename-VMNetworkAdapter -VMName 'SRV-03' -NewName 'Bou-LAN'
|
||||||
Set-VMNetworkAdapter -VMName 'SRV-03' -Name "Bou-Lan" -DeviceNaming on
|
Set-VMNetworkAdapter -VMName 'SRV-03' -Name "Bou-Lan" -DeviceNaming on
|
||||||
|
=======
|
||||||
|
Rename-VMNetworkAdapter -VMName 'SRV-03' -NewName 'Arc-SRV'
|
||||||
|
Set-VMNetworkAdapter -VMName 'SRV-03' -Name "Arc-SRV" -DeviceNaming on
|
||||||
|
>>>>>>> DNS
|
||||||
|
|
||||||
### Adding and configuring RTR-01
|
### Adding and configuring RTR-01
|
||||||
|
|
||||||
@ -69,10 +100,20 @@ echo "Adding and configuring RTR-01"
|
|||||||
cp D:\VHD\Base\Base_SRV_diff.vhdx D:\VHD\RTR-01.vhdx
|
cp D:\VHD\Base\Base_SRV_diff.vhdx D:\VHD\RTR-01.vhdx
|
||||||
|
|
||||||
Mount-VHD d:\VHD\RTR-01.vhdx
|
Mount-VHD d:\VHD\RTR-01.vhdx
|
||||||
|
<<<<<<< HEAD
|
||||||
Copy-Item D:\Scripts\Unattend\FullUnattend-srv.xml -Destination e:\Windows\Panther\Unattend.xml
|
Copy-Item D:\Scripts\Unattend\FullUnattend-srv.xml -Destination e:\Windows\Panther\Unattend.xml
|
||||||
Copy-Item D:\Scripts\deploy.cmd -Destination e:\conf\deploy.cmd
|
Copy-Item D:\Scripts\deploy.cmd -Destination e:\conf\deploy.cmd
|
||||||
mkdir e:\Tools\Scripts
|
mkdir e:\Tools\Scripts
|
||||||
Copy-item d:\Scripts\Guests\RTR-01.ps1 E:\Tools\scripts\boot.ps1
|
Copy-item d:\Scripts\Guests\RTR-01.ps1 E:\Tools\scripts\boot.ps1
|
||||||
|
=======
|
||||||
|
Copy-Item d:\Unattend\server.xml -Destination e:\Windows\Panther\Unattend.xml
|
||||||
|
mkdir e:\Tools\Scripts
|
||||||
|
mkdir "e:\Program Files\BGINFO"
|
||||||
|
Copy-item d:\Scripts\Guests\RTR-01.ps1 E:\Tools\scripts\boot.ps1
|
||||||
|
Copy-Item D:\Soft\BGInfo_Deploiement\BGInfo64.exe "e:\Program Files\BGINFO\"
|
||||||
|
Copy-Item D:\Soft\BGInfo_Deploiement\mescouilles2.bgi "e:\Program Files\BGINFO\"
|
||||||
|
Copy-Item D:\Soft\BGInfo_Deploiement\bginfo.bat "e:\Program Files\BGINFO\"
|
||||||
|
>>>>>>> DNS
|
||||||
Dismount-VHD d:\VHD\RTR-01.vhdx
|
Dismount-VHD d:\VHD\RTR-01.vhdx
|
||||||
|
|
||||||
$vms = @{
|
$vms = @{
|
||||||
@ -102,10 +143,20 @@ echo "Adding and configuring RTR-02"
|
|||||||
cp D:\VHD\Base\Base_SRV_diff.vhdx D:\VHD\RTR-02.vhdx
|
cp D:\VHD\Base\Base_SRV_diff.vhdx D:\VHD\RTR-02.vhdx
|
||||||
|
|
||||||
Mount-VHD d:\VHD\RTR-02.vhdx
|
Mount-VHD d:\VHD\RTR-02.vhdx
|
||||||
|
<<<<<<< HEAD
|
||||||
Copy-Item D:\Scripts\Unattend\FullUnattend-srv.xml -Destination e:\Windows\Panther\Unattend.xml
|
Copy-Item D:\Scripts\Unattend\FullUnattend-srv.xml -Destination e:\Windows\Panther\Unattend.xml
|
||||||
Copy-Item D:\Scripts\deploy.cmd -Destination e:\conf\deploy.cmd
|
Copy-Item D:\Scripts\deploy.cmd -Destination e:\conf\deploy.cmd
|
||||||
mkdir e:\Tools\Scripts
|
mkdir e:\Tools\Scripts
|
||||||
Copy-item D:\scripts\Guests\RTR-02.ps1 E:\Tools\scripts\boot.ps1
|
Copy-item D:\scripts\Guests\RTR-02.ps1 E:\Tools\scripts\boot.ps1
|
||||||
|
=======
|
||||||
|
Copy-Item d:\Unattend\server.xml -Destination e:\Windows\Panther\Unattend.xml
|
||||||
|
mkdir e:\Tools\Scripts
|
||||||
|
mkdir "e:\Program Files\BGINFO"
|
||||||
|
Copy-item D:\scripts\Guests\RTR-02.ps1 E:\Tools\scripts\boot.ps1
|
||||||
|
Copy-Item D:\Soft\BGInfo_Deploiement\BGInfo64.exe "e:\Program Files\BGINFO\"
|
||||||
|
Copy-Item D:\Soft\BGInfo_Deploiement\mescouilles2.bgi "e:\Program Files\BGINFO\"
|
||||||
|
Copy-Item D:\Soft\BGInfo_Deploiement\bginfo.bat "e:\Program Files\BGINFO\"
|
||||||
|
>>>>>>> DNS
|
||||||
Dismount-VHD d:\VHD\RTR-02.vhdx
|
Dismount-VHD d:\VHD\RTR-02.vhdx
|
||||||
|
|
||||||
$vms = @{
|
$vms = @{
|
||||||
@ -135,10 +186,20 @@ echo "Adding and configuring RTR-03"
|
|||||||
cp D:\VHD\Base\Base_SRV_diff.vhdx D:\VHD\RTR-03.vhdx
|
cp D:\VHD\Base\Base_SRV_diff.vhdx D:\VHD\RTR-03.vhdx
|
||||||
|
|
||||||
Mount-VHD d:\VHD\RTR-03.vhdx
|
Mount-VHD d:\VHD\RTR-03.vhdx
|
||||||
|
<<<<<<< HEAD
|
||||||
Copy-Item D:\Scripts\Unattend\FullUnattend-srv.xml -Destination e:\Windows\Panther\Unattend.xml
|
Copy-Item D:\Scripts\Unattend\FullUnattend-srv.xml -Destination e:\Windows\Panther\Unattend.xml
|
||||||
Copy-Item D:\Scripts\deploy.cmd -Destination e:\conf\deploy.cmd
|
Copy-Item D:\Scripts\deploy.cmd -Destination e:\conf\deploy.cmd
|
||||||
mkdir e:\Tools\Scripts
|
mkdir e:\Tools\Scripts
|
||||||
Copy-item d:\Scripts\Guests\RTR-03.ps1 E:\Tools\scripts\boot.ps1
|
Copy-item d:\Scripts\Guests\RTR-03.ps1 E:\Tools\scripts\boot.ps1
|
||||||
|
=======
|
||||||
|
Copy-Item d:\Unattend\server.xml -Destination e:\Windows\Panther\Unattend.xml
|
||||||
|
mkdir e:\Tools\Scripts
|
||||||
|
mkdir "e:\Program Files\BGINFO"
|
||||||
|
Copy-item d:\Scripts\Guests\RTR-03.ps1 E:\Tools\scripts\boot.ps1
|
||||||
|
Copy-Item D:\Soft\BGInfo_Deploiement\BGInfo64.exe "e:\Program Files\BGINFO\"
|
||||||
|
Copy-Item D:\Soft\BGInfo_Deploiement\mescouilles2.bgi "e:\Program Files\BGINFO\"
|
||||||
|
Copy-Item D:\Soft\BGInfo_Deploiement\bginfo.bat "e:\Program Files\BGINFO\"
|
||||||
|
>>>>>>> DNS
|
||||||
Dismount-VHD d:\VHD\RTR-03.vhdx
|
Dismount-VHD d:\VHD\RTR-03.vhdx
|
||||||
|
|
||||||
$vms = @{
|
$vms = @{
|
||||||
@ -167,6 +228,10 @@ Start-VM -Name RTR*
|
|||||||
### Sleeping 30s
|
### Sleeping 30s
|
||||||
|
|
||||||
echo "Sleeping 30"
|
echo "Sleeping 30"
|
||||||
|
<<<<<<< HEAD
|
||||||
Sleep 130
|
Sleep 130
|
||||||
|
=======
|
||||||
|
Sleep 30
|
||||||
|
>>>>>>> DNS
|
||||||
|
|
||||||
Start-VM -Name SRV*
|
Start-VM -Name SRV*
|
||||||
|
17
Memo.ps1
17
Memo.ps1
@ -1,4 +1,12 @@
|
|||||||
#$VMNetAdap = Get-VMNetworkAdapter -VMName RTR-01|ft -Property Switchname,Macaddress -HideTableHeaders
|
### What to include?
|
||||||
|
|
||||||
|
BGINFO inside diff disk
|
||||||
|
|
||||||
|
### TODO
|
||||||
|
|
||||||
|
Fucking BGINFO
|
||||||
|
|
||||||
|
#$VMNetAdap = Get-VMNetworkAdapter -VMName RTR-01|ft -Property Switchname,Macaddress -HideTableHeaders
|
||||||
Get-VMNetworkAdapter -VMName RTR-01|Format-Table -Property Switchname,Macaddress -HideTableHeaders |Export-Csv D:\scripts\Guests\MACS\test.csv -NoTypeInformation
|
Get-VMNetworkAdapter -VMName RTR-01|Format-Table -Property Switchname,Macaddress -HideTableHeaders |Export-Csv D:\scripts\Guests\MACS\test.csv -NoTypeInformation
|
||||||
#echo $VMNETADAP | out-file -FilePath D:\scripts\Guests\MACS\temp.txt
|
#echo $VMNETADAP | out-file -FilePath D:\scripts\Guests\MACS\temp.txt
|
||||||
|
|
||||||
@ -15,10 +23,6 @@ $adapter | New-NetIPAddress `
|
|||||||
-PrefixLength $MaskBits `
|
-PrefixLength $MaskBits `
|
||||||
-DefaultGateway $Gateway
|
-DefaultGateway $Gateway
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$IP = "10.10.10.10"
|
$IP = "10.10.10.10"
|
||||||
$MaskBits = 24 # This means subnet mask = 255.255.255.0
|
$MaskBits = 24 # This means subnet mask = 255.255.255.0
|
||||||
$Gateway = "10.10.10.1"
|
$Gateway = "10.10.10.1"
|
||||||
@ -53,3 +57,6 @@ foreach ($adapt in $adapts) {
|
|||||||
$HWName = (Get-NetAdapterAdvancedProperty -name $adapt.name -DisplayName "Hyper-v Network Adapter Name").DisplayValue
|
$HWName = (Get-NetAdapterAdvancedProperty -name $adapt.name -DisplayName "Hyper-v Network Adapter Name").DisplayValue
|
||||||
Rename-Netadapter -name $adapt.name -NewName $HWName
|
Rename-Netadapter -name $adapt.name -NewName $HWName
|
||||||
}
|
}
|
||||||
|
|
||||||
|
### Set DNS Server on client
|
||||||
|
Set-DnsClientServerAddress -InterfaceIndex 7 -ServerAddresses ("10.152.0.6", "10.152.0.7")
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
<<<<<<< HEAD
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<unattend xmlns="urn:schemas-microsoft-com:unattend">
|
<unattend xmlns="urn:schemas-microsoft-com:unattend">
|
||||||
<settings pass="specialize">
|
<settings pass="specialize">
|
||||||
@ -64,3 +65,71 @@
|
|||||||
</settings>
|
</settings>
|
||||||
<cpi:offlineImage cpi:source="catalog:c:/users/maintenance/documents/clg/install_windows server 2008 r2 serverstandard.clg" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
|
<cpi:offlineImage cpi:source="catalog:c:/users/maintenance/documents/clg/install_windows server 2008 r2 serverstandard.clg" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
|
||||||
</unattend>
|
</unattend>
|
||||||
|
=======
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<unattend xmlns="urn:schemas-microsoft-com:unattend">
|
||||||
|
<settings pass="specialize">
|
||||||
|
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<ComputerName>*</ComputerName>
|
||||||
|
<RegisteredOrganization>Aston Ecole</RegisteredOrganization>
|
||||||
|
<RegisteredOwner>Aston Ecole</RegisteredOwner>
|
||||||
|
<ShowWindowsLive>false</ShowWindowsLive>
|
||||||
|
</component>
|
||||||
|
</settings>
|
||||||
|
<settings pass="oobeSystem">
|
||||||
|
<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<InputLocale>fr-fr</InputLocale>
|
||||||
|
<SystemLocale>en-us</SystemLocale>
|
||||||
|
<UILanguage>en-us</UILanguage>
|
||||||
|
<UserLocale>en-us</UserLocale>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<RegisteredOrganization>Aston Ecole</RegisteredOrganization>
|
||||||
|
<RegisteredOwner>Aston Ecole</RegisteredOwner>
|
||||||
|
<UserAccounts>
|
||||||
|
<AdministratorPassword>
|
||||||
|
<Value>Pa$$w0rd</Value>
|
||||||
|
<PlainText>True</PlainText>
|
||||||
|
</AdministratorPassword>
|
||||||
|
</UserAccounts>
|
||||||
|
<AutoLogon>
|
||||||
|
<Password>
|
||||||
|
<Value>Pa$$w0rd</Value>
|
||||||
|
<PlainText>True</PlainText>
|
||||||
|
</Password>
|
||||||
|
<Domain>.</Domain>
|
||||||
|
<Enabled>true</Enabled>
|
||||||
|
<LogonCount>1</LogonCount>
|
||||||
|
<Username>Administrateur</Username>
|
||||||
|
</AutoLogon>
|
||||||
|
<FirstLogonCommands>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<CommandLine>c:\conf\deploy.cmd</CommandLine>
|
||||||
|
<Description>Post Install Script</Description>
|
||||||
|
<Order>1</Order>
|
||||||
|
</SynchronousCommand>
|
||||||
|
</FirstLogonCommands>
|
||||||
|
<OOBE>
|
||||||
|
<HideEULAPage>true</HideEULAPage>
|
||||||
|
</OOBE>
|
||||||
|
<Display>
|
||||||
|
<ColorDepth>32</ColorDepth>
|
||||||
|
<HorizontalResolution>1024</HorizontalResolution>
|
||||||
|
<VerticalResolution>768</VerticalResolution>
|
||||||
|
</Display>
|
||||||
|
</component>
|
||||||
|
</settings>
|
||||||
|
<settings pass="generalize">
|
||||||
|
<component name="Microsoft-Windows-Security-SPP" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<SkipRearm>1</SkipRearm>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-ServerManager-SvrMgrNc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<DoNotOpenServerManagerAtLogon>false</DoNotOpenServerManagerAtLogon>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-OutOfBoxExperience" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<DoNotOpenInitialConfigurationTasksAtLogon>true</DoNotOpenInitialConfigurationTasksAtLogon>
|
||||||
|
</component>
|
||||||
|
</settings>
|
||||||
|
<cpi:offlineImage cpi:source="catalog:c:/users/maintenance/documents/clg/install_windows server 2008 r2 serverstandard.clg" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
|
||||||
|
</unattend>
|
||||||
|
>>>>>>> DNS
|
||||||
|
152
Unattend/client.xml
Normal file
152
Unattend/client.xml
Normal file
@ -0,0 +1,152 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<unattend xmlns="urn:schemas-microsoft-com:unattend">
|
||||||
|
<settings pass="specialize">
|
||||||
|
<component name="Microsoft-Windows-International-Core" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<InputLocale>040c:0000040c</InputLocale>
|
||||||
|
<SystemLocale>en-us</SystemLocale>
|
||||||
|
<UILanguage>en-us</UILanguage>
|
||||||
|
<UILanguageFallback>en-us</UILanguageFallback>
|
||||||
|
<UserLocale>en-us</UserLocale>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<InputLocale>040c:0000040c</InputLocale>
|
||||||
|
<SystemLocale>en-us</SystemLocale>
|
||||||
|
<UILanguage>en-us</UILanguage>
|
||||||
|
<UILanguageFallback>fr-FR</UILanguageFallback>
|
||||||
|
<UserLocale>en-us</UserLocale>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<SkipAutoActivation>true</SkipAutoActivation>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<SkipAutoActivation>true</SkipAutoActivation>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-SQMApi" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<CEIPEnabled>0</CEIPEnabled>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-SQMApi" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<CEIPEnabled>0</CEIPEnabled>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<ComputerName>MYCOMPUTER</ComputerName>
|
||||||
|
<!--
|
||||||
|
<ProductKey>W269N-WFGWX-YVC9B-4J6C9-T83GX</ProductKey>
|
||||||
|
-->
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<ComputerName>MYCOMPUTER</ComputerName>
|
||||||
|
<!--
|
||||||
|
<ProductKey>W269N-WFGWX-YVC9B-4J6C9-T83GX</ProductKey>
|
||||||
|
-->
|
||||||
|
</component>
|
||||||
|
</settings>
|
||||||
|
<settings pass="oobeSystem">
|
||||||
|
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<AutoLogon>
|
||||||
|
<Password>
|
||||||
|
<Value>Pa$$w0rd</Value>
|
||||||
|
<PlainText>true</PlainText>
|
||||||
|
</Password>
|
||||||
|
<Enabled>true</Enabled>
|
||||||
|
<LogonCount>1</LogonCount>
|
||||||
|
<Username>AdminLocal</Username>
|
||||||
|
</AutoLogon>
|
||||||
|
<OOBE>
|
||||||
|
<HideEULAPage>true</HideEULAPage>
|
||||||
|
<HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
|
||||||
|
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
|
||||||
|
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
|
||||||
|
<NetworkLocation>Home</NetworkLocation>
|
||||||
|
<SkipUserOOBE>true</SkipUserOOBE>
|
||||||
|
<SkipMachineOOBE>true</SkipMachineOOBE>
|
||||||
|
<ProtectYourPC>1</ProtectYourPC>
|
||||||
|
</OOBE>
|
||||||
|
<UserAccounts>
|
||||||
|
<LocalAccounts>
|
||||||
|
<LocalAccount wcm:action="add">
|
||||||
|
<Password>
|
||||||
|
<Value>Pa$$w0rd</Value>
|
||||||
|
<PlainText>true</PlainText>
|
||||||
|
</Password>
|
||||||
|
<Description>AdminLocal</Description>
|
||||||
|
<DisplayName>AdminLocal</DisplayName>
|
||||||
|
<Group>Administrators</Group>
|
||||||
|
<Name>AdminLocal</Name>
|
||||||
|
</LocalAccount>
|
||||||
|
</LocalAccounts>
|
||||||
|
</UserAccounts>
|
||||||
|
<RegisteredOrganization></RegisteredOrganization>
|
||||||
|
<RegisteredOwner>Bollocks Corp</RegisteredOwner>
|
||||||
|
<DisableAutoDaylightTimeSet>false</DisableAutoDaylightTimeSet>
|
||||||
|
<FirstLogonCommands>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<Description>Control Panel View</Description>
|
||||||
|
<Order>1</Order>
|
||||||
|
<CommandLine>reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel" /v StartupPage /t REG_DWORD /d 0 /f</CommandLine>
|
||||||
|
<RequiresUserInput>true</RequiresUserInput>
|
||||||
|
</SynchronousCommand>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<Order>2</Order>
|
||||||
|
<Description>Control Panel Icon Size</Description>
|
||||||
|
<RequiresUserInput>false</RequiresUserInput>
|
||||||
|
<CommandLine>reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel" /v AllItemsIconView /t REG_DWORD /d 1 /f</CommandLine>
|
||||||
|
</SynchronousCommand>
|
||||||
|
</FirstLogonCommands>
|
||||||
|
<TimeZone>Romance Standard Time</TimeZone>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<AutoLogon>
|
||||||
|
<Password>
|
||||||
|
<Value>Pa$$w0rd</Value>
|
||||||
|
<PlainText>true</PlainText>
|
||||||
|
</Password>
|
||||||
|
<Enabled>true</Enabled>
|
||||||
|
<LogonCount>1</LogonCount>
|
||||||
|
<Username>AdminLocal</Username>
|
||||||
|
</AutoLogon>
|
||||||
|
<OOBE>
|
||||||
|
<HideEULAPage>true</HideEULAPage>
|
||||||
|
<HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
|
||||||
|
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
|
||||||
|
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
|
||||||
|
<NetworkLocation>Home</NetworkLocation>
|
||||||
|
<SkipUserOOBE>true</SkipUserOOBE>
|
||||||
|
<SkipMachineOOBE>true</SkipMachineOOBE>
|
||||||
|
<ProtectYourPC>1</ProtectYourPC>
|
||||||
|
</OOBE>
|
||||||
|
<UserAccounts>
|
||||||
|
<LocalAccounts>
|
||||||
|
<LocalAccount wcm:action="add">
|
||||||
|
<Password>
|
||||||
|
<Value>Pa$$w0rd</Value>
|
||||||
|
<PlainText>true</PlainText>
|
||||||
|
</Password>
|
||||||
|
<Description>AdminLocal</Description>
|
||||||
|
<DisplayName>AdminLocal</DisplayName>
|
||||||
|
<Group>Administrators</Group>
|
||||||
|
<Name>AdminLocal</Name>
|
||||||
|
</LocalAccount>
|
||||||
|
</LocalAccounts>
|
||||||
|
</UserAccounts>
|
||||||
|
<RegisteredOrganization></RegisteredOrganization>
|
||||||
|
<RegisteredOwner>Bollocks Corp</RegisteredOwner>
|
||||||
|
<DisableAutoDaylightTimeSet>false</DisableAutoDaylightTimeSet>
|
||||||
|
<FirstLogonCommands>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<Description>Control Panel View</Description>
|
||||||
|
<Order>1</Order>
|
||||||
|
<CommandLine>reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel" /v StartupPage /t REG_DWORD /d 0 /f</CommandLine>
|
||||||
|
<RequiresUserInput>true</RequiresUserInput>
|
||||||
|
</SynchronousCommand>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<Order>2</Order>
|
||||||
|
<Description>Control Panel Icon Size</Description>
|
||||||
|
<RequiresUserInput>false</RequiresUserInput>
|
||||||
|
<CommandLine>reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel" /v AllItemsIconView /t REG_DWORD /d 1 /f</CommandLine>
|
||||||
|
</SynchronousCommand>
|
||||||
|
</FirstLogonCommands>
|
||||||
|
<TimeZone>Romance Standard Time</TimeZone>
|
||||||
|
</component>
|
||||||
|
</settings>
|
||||||
|
<cpi:offlineImage cpi:source="" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
|
||||||
|
</unattend>
|
77
Unattend/server.xml
Normal file
77
Unattend/server.xml
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<unattend xmlns="urn:schemas-microsoft-com:unattend">
|
||||||
|
<settings pass="specialize">
|
||||||
|
<component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<RunAsynchronous>
|
||||||
|
<RunAsynchronousCommand wcm:action="add">
|
||||||
|
<Credentials>
|
||||||
|
<Username>Administrateur</Username>
|
||||||
|
<Password>Pa$$w0rd</Password>
|
||||||
|
</Credentials>
|
||||||
|
<Description>Script to install roles</Description>
|
||||||
|
<Order>1</Order>
|
||||||
|
<Path>powershell -File "C:\Tools\scripts\boot.ps1"</Path>
|
||||||
|
</RunAsynchronousCommand>
|
||||||
|
</RunAsynchronous>
|
||||||
|
</component>
|
||||||
|
</settings>
|
||||||
|
<settings pass="oobeSystem">
|
||||||
|
<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<InputLocale>fr-fr</InputLocale>
|
||||||
|
<SystemLocale>en-us</SystemLocale>
|
||||||
|
<UILanguage>en-us</UILanguage>
|
||||||
|
<UserLocale>en-us</UserLocale>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<RegisteredOrganization>Bollocks Corp</RegisteredOrganization>
|
||||||
|
<RegisteredOwner>Bollocks Corp</RegisteredOwner>
|
||||||
|
<UserAccounts>
|
||||||
|
<AdministratorPassword>
|
||||||
|
<Value>UABhACQAJAB3ADAAcgBkAEEAZABtAGkAbgBpAHMAdAByAGEAdABvAHIAUABhAHMAcwB3AG8AcgBkAA==</Value>
|
||||||
|
<PlainText>false</PlainText>
|
||||||
|
</AdministratorPassword>
|
||||||
|
</UserAccounts>
|
||||||
|
<AutoLogon>
|
||||||
|
<Domain>.</Domain>
|
||||||
|
<Enabled>true</Enabled>
|
||||||
|
<LogonCount>1</LogonCount>
|
||||||
|
<Username>Administrateur</Username>
|
||||||
|
<Password>
|
||||||
|
<Value>UABhACQAJAB3ADAAcgBkAFAAYQBzAHMAdwBvAHIAZAA=</Value>
|
||||||
|
<PlainText>false</PlainText>
|
||||||
|
</Password>
|
||||||
|
</AutoLogon>
|
||||||
|
<FirstLogonCommands>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<CommandLine>c:\conf\deploy.cmd</CommandLine>
|
||||||
|
<Description>Post Install Script</Description>
|
||||||
|
<Order>1</Order>
|
||||||
|
</SynchronousCommand>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<Order>2</Order>
|
||||||
|
<CommandLine>powershell -File "C:\tools\scripts\boot.ps1"</CommandLine>
|
||||||
|
</SynchronousCommand>
|
||||||
|
</FirstLogonCommands>
|
||||||
|
<OOBE>
|
||||||
|
<HideEULAPage>true</HideEULAPage>
|
||||||
|
</OOBE>
|
||||||
|
<Display>
|
||||||
|
<ColorDepth>32</ColorDepth>
|
||||||
|
<HorizontalResolution>1024</HorizontalResolution>
|
||||||
|
<VerticalResolution>768</VerticalResolution>
|
||||||
|
</Display>
|
||||||
|
</component>
|
||||||
|
</settings>
|
||||||
|
<settings pass="generalize">
|
||||||
|
<component name="Microsoft-Windows-Security-SPP" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<SkipRearm>1</SkipRearm>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-ServerManager-SvrMgrNc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<DoNotOpenServerManagerAtLogon>false</DoNotOpenServerManagerAtLogon>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-OutOfBoxExperience" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<DoNotOpenInitialConfigurationTasksAtLogon>true</DoNotOpenInitialConfigurationTasksAtLogon>
|
||||||
|
</component>
|
||||||
|
</settings>
|
||||||
|
<cpi:offlineImage cpi:source="wim:d:/wim/server-2016.wim#W2016_x64" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
|
||||||
|
</unattend>
|
Loading…
Reference in New Issue
Block a user