From a2d340b71bf525b5b79114eaf05fc984142664f9 Mon Sep 17 00:00:00 2001 From: Alexandre-Simao Date: Mon, 31 May 2021 11:03:47 +0200 Subject: [PATCH] Feat: Add original unattend files --- OLD/RTR-02_OLD.ps1 | 64 -------------- OLD/RTR-03_Old.ps1 | 47 ---------- Unattend/FullUnattend-srv.xml | 66 ++++++++++++++ Unattend/Fullunattend-Win10.xml | 151 ++++++++++++++++++++++++++++++++ 4 files changed, 217 insertions(+), 111 deletions(-) delete mode 100644 OLD/RTR-02_OLD.ps1 delete mode 100644 OLD/RTR-03_Old.ps1 create mode 100644 Unattend/FullUnattend-srv.xml create mode 100644 Unattend/Fullunattend-Win10.xml diff --git a/OLD/RTR-02_OLD.ps1 b/OLD/RTR-02_OLD.ps1 deleted file mode 100644 index d80bbf0..0000000 --- a/OLD/RTR-02_OLD.ps1 +++ /dev/null @@ -1,64 +0,0 @@ -# Alexandre SIMAO -# GPLv3 - -# Script to install and configure a Fuckdows Server 2016 as a router -# RTR-02 Only - -echo "Shamefully made by Alexandre Simao. Pardon-me M. Stallman" - -# Change the poor machine name -Rename-computer "RTR-02" - -Rename-NetAdapter -Name "Ethernet" -NewName "Bou-LAN" -Rename-NetAdapter -Name "Ethernet 2" -NewName "WAN" - -netsh interface ip set address "WAN" static 192.168.255.8 255.255.255.0 192.168.255.254 -netsh interface ip set address "Bou-LAN" static 192.168.128.254 255.255.255.0 -netsh interface ip set dns name="WAN" static 9.9.9.9. - -# Install Routing and necessary linked roles -Install-WindowsFeature RemoteAccess, RSAT-RemoteAccess-PowerShell, Routing -IncludeManagementTools -set-service RemoteAccess -StartupType Automatic -Start-Service RemoteAccess - -# Display interfaces and active forwarding for all of thm via Regedit -netsh inter show inter - - -Set-NetConnectionProfile -NetworkCategory Private - -$Params = @{ - "Name" = 'vm-monitoring-icmpv4' - "Action" = 'Allow' -} - -Set-NetFirewallRule @Params - -# Activate NAT and DHCP Relay -netsh routing ip relay install - -netsh routing ip add interface name="WAN" state=enable - -netsh routing ip relay add interface "WAN" -netsh rout ip rel set int ARC-CLI min=0 -netsh routing ip relay add interface "Bou-LAN" -netsh rout ip rel set int ARC-SRV min=0 - - -netsh -f ./Bou-LAN.conf - -# Change ZoneAlarm rule to accept incoming ICMP ipv4 probes -$Params = @{ - "Name" = 'vm-monitoring-icmpv4' - "Action" = 'Allow' -} - -Set-NetFirewallRule @Params - -# Add routes - -route add -p 192.168.8.0/24 192.168.255.8 -route add -p 192.168.12.0.24 192.168.255.8 -route add -p 192.168.255.0/24 192.168.255.128 -route add -p 192.168.128.0/24 192.168.128.254 -route add -p 0.0.0.0/0 192.168.255.254 diff --git a/OLD/RTR-03_Old.ps1 b/OLD/RTR-03_Old.ps1 deleted file mode 100644 index a8784da..0000000 --- a/OLD/RTR-03_Old.ps1 +++ /dev/null @@ -1,47 +0,0 @@ -# Alexandre SIMAO -# GPLv3 - -### TODO ? - -# Script to install and configure a Fuckdows Server 2016 as a router -# RTR-03 Only -echo "Shamefully made by Alexandre Simao. Pardon-me M. Stallman" - -# Change the poor machine name -Rename-computer "RTR-03" - -Rename-NetAdapter -Name "Ethernet" -NewName "WAN" -Rename-NetAdapter -Name "Ethernet 2" -NewName "Aston" - -# Install Routing and necessary linked roles -Install-WindowsFeature RemoteAccess, RSAT-RemoteAccess-PowerShell, Routing -IncludeManagementTools -set-service RemoteAccess -StartupType Automatic -Start-Service RemoteAccess - -netsh interface ip set address "WAN" static 192.168.255.254 255.255.255.0 -netsh interface ip set dns name="WAN" static 9.9.9.9 - -# Activate NAT - -netsh routing ip nat install -netsh routing ip nat add interface name="WAN" mode=PRIVATE -netsh routing ip nat add interface name="Aston" mode=FULL - -# Change ZoneAlarm rule to accept incoming ICMP ipv4 probes - -$Params = @{ - "Name" = 'vm-monitoring-icmpv4' - "Action" = 'Allow' -} - -Set-NetFirewallRule @Params - -Set-NetConnectionProfile -networkcategory private - - -# Add routes - -route add -p 192.168.8.0/24 192.168.255.8 -route add -p 192.168.12.0/24 192.168.255.8 -route add -p 192.168.128.0/24 192.168.255.128 -route add -p 192.168.255.0/24 192.168.255.254 diff --git a/Unattend/FullUnattend-srv.xml b/Unattend/FullUnattend-srv.xml new file mode 100644 index 0000000..7cbbd89 --- /dev/null +++ b/Unattend/FullUnattend-srv.xml @@ -0,0 +1,66 @@ + + + + + * + Aston Ecole + Aston Ecole + false + + + + + fr-fr + fr-fr + fr-fr + fr-fr + + + Aston Ecole + Aston Ecole + + + Pa$$w0rd + 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> diff --git a/Unattend/Fullunattend-Win10.xml b/Unattend/Fullunattend-Win10.xml new file mode 100644 index 0000000..8fafe26 --- /dev/null +++ b/Unattend/Fullunattend-Win10.xml @@ -0,0 +1,151 @@ +<?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>fr-FR</SystemLocale> +<UILanguage>fr-FR</UILanguage> +<UILanguageFallback>fr-FR</UILanguageFallback> +<UserLocale>fr-FR</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>fr-FR</SystemLocale> +<UILanguage>fr-FR</UILanguage> +<UILanguageFallback>fr-FR</UILanguageFallback> +<UserLocale>fr-FR</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>Aston Ecole</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>Aston Ecole</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> +</unattend> \ No newline at end of file