59 lines
1.8 KiB
PowerShell
59 lines
1.8 KiB
PowerShell
<#
|
|
.SYNOPSIS
|
|
<Overview of script>
|
|
|
|
.NOTES
|
|
Version : 1.0
|
|
Author : Hubert CORNET
|
|
Creation Date : 26/11/2022
|
|
Purpose/Change : <Initial script development>
|
|
|
|
.LINK
|
|
https://www.tips-of-mine.fr
|
|
|
|
.EXEMPLE
|
|
<Example goes here. Repeat this attribute for more than one example>
|
|
|
|
.DESCRIPTION
|
|
<Brief description of script>
|
|
|
|
.PARAMETER <Parameter_Name>
|
|
<Brief description of parameter input required. Repeat this attribute if required>
|
|
|
|
.INPUTS
|
|
<Inputs if any, otherwise state None>
|
|
|
|
.OUTPUTS
|
|
<Outputs if any, otherwise state None - example: Log file stored in C:\Windows\Temp\<name>.log>
|
|
#>
|
|
|
|
#---------------------------------------------------------[Initialisations]--------------------------------------------------------
|
|
|
|
# Définir l'action d'erreur pour continuer silencieusement
|
|
$ErrorActionPreference = "SilentlyContinue"
|
|
|
|
# Bibliothèques de fonctions requises
|
|
|
|
#----------------------------------------------------------[Declarations]----------------------------------------------------------
|
|
# Version Script
|
|
$sScriptVersion = "1.0"
|
|
|
|
#Log File Info
|
|
$sLogPath = "C:\Tmp"
|
|
$sLogName = "Key-Activation.log"
|
|
$sLogFile = Join-Path -Path $sLogPath -ChildPath $sLogName
|
|
|
|
Start-Transcript -Path $sLogFile -NoClobber
|
|
#-----------------------------------------------------------[Functions]------------------------------------------------------------
|
|
|
|
#--------------------------------------------------------[Debut Du Script]---------------------------------------------------------
|
|
|
|
DISM /online /Set-Edition:ServerStandard /ProductKey:VDYBN-27WPP-V4HQT-9VMD4-VMK7H /AcceptEula
|
|
|
|
#DISM /online /Set-Edition:ServerDatacenter /ProductKey:WX4NM-KYWYW-QJJR4-XV3QB-6VM33 /AcceptEula
|
|
|
|
#---------------------------------------------------------[Fin Du Script]----------------------------------------------------------
|
|
|
|
Stop-Transcript
|
|
|