-
Notifications
You must be signed in to change notification settings - Fork 0
/
AIB-RegionalSettings.ps1
63 lines (54 loc) · 2.04 KB
/
AIB-RegionalSettings.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<#
Script purpose: Set Windows region & TimeZone to Dutch
Version: 1.0
Date: 18-01-2022
Author: John Eijgensteijn
Change log: First release
#>
#region Variables
$TempPath="c:\Temp\Software"
$LogPath="C:\Programdata\PPC\"
$Logfile="Software_Install.log"
#repo for app installation parameters
$repo="https://dev.azure.com/ProactBenelux/d4523fbb-bde0-48ff-9be6-e3fb84165b1a/_apis/git/repositories/92abb40d-73cf-49ef-9a5c-cbed18018b12/items?path="
$storageaccount="https://ppcavdstorage.blob.core.windows.net/avdbuild?sp=r&st=2022-02-24T08:31:07Z&se=2023-02-24T16:31:07Z&spr=https&sv=2020-08-04&sr=c&sig=8NGsByN%2BkHPpTsFIZvRubQ%2FqfN1c1Hig7pDAyqXmZfo%3D"
#region create folders
#Create folder for Logfile storage
#Create Temp folder for Software download and Extract
try {
If (!(Test-path -Path $TempPath -ErrorAction Ignore)) {New-Item -ItemType Directory $TempPath }
}
catch {
$ErrorMessage = $_.Exception.message
Write-Output "Error creating temp folder $ErrorMessage"
}
If (!(Test-Path -Path $LogPath -ErrorAction Ignore)) {New-Item -ItemType Directory $LogPath }
#Create folder for Languagefile storage
try {
$LanguagePath=$TempPath+"\nl"
If (!(Test-Path -Path $LanguagePath -ErrorAction Ignore)) {New-Item -ItemType Directory $LanguagePath}
}
catch {
$ErrorMessage = $_.Exception.message
Write-Output "Error creating Log folder $ErrorMessage"
}
#endregion create folders
#region Timezone and Keyboard
try {
write-host "Setting Timesettings and regional settings"
#variables
$RegionalSettings = $TempPath+"\AVDBuild\DutchRegionalSettings.xml"
# Set Locale, language etc.
& $env:SystemRoot\System32\control.exe "intl.cpl,,/f:`"$RegionalSettings`""
# Set languages/culture. Not needed perse.
Set-TimeZone -id "W. Europe Standard Time" -Verbose
Set-WinSystemLocale nl-NL -Verbose
Set-WinUserLanguageList -LanguageList nl-NL -Force -Verbose
Set-Culture -CultureInfo nl-NL -Verbose
Set-WinHomeLocation -GeoId 176 -Verbose
}
catch {
$ErrorMessage = $_.Exception.message
write-host "Error setting Timesettings $ErrorMessage"
}
#endregion