Public/Functions/OSDCloud/Set-SetupCompleteTimeZone.ps1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
function Set-SetupCompleteTimeZone { $ScriptsPath = "C:\Windows\Setup\scripts" $RunScript = @(@{ Script = "SetupComplete"; BatFile = 'SetupComplete.cmd'; ps1file = 'SetupComplete.ps1';Type = 'Setup'; Path = "$ScriptsPath"}) $PSFilePath = "$($RunScript.Path)\$($RunScript.ps1File)" if (Test-Path -Path $PSFilePath){ Add-Content -Path $PSFilePath "Write-Output 'Running Time Zone Configuration'" Add-Content -Path $PSFilePath "Set-TimeZoneFromIP" } else { Write-Output "$PSFilePath - Not Found" } } |