Add files via upload

This commit is contained in:
freedbygrace
2020-05-28 13:41:31 -04:00
committed by GitHub
parent c4b44ebd52
commit 7ef4b3d9a6
+9
View File
@@ -107,6 +107,7 @@
[Parameter(Mandatory=$False)]
[ValidateNotNullOrEmpty()]
[Alias('NTPServer')]
[String]$NTPServerFQDN = "pool.ntp.org",
[Parameter(Mandatory=$False)]
@@ -298,6 +299,9 @@ ForEach ($ModuleGroup In $ModuleGroups)
If ($IsWindowsPE -eq $True)
{
$WarningMessage = "[WindowsPE Detected] - Additional file(s), system settings, and registry changes are required to allow time synchronization to occur."
Write-Warning -Message "$($WarningMessage)" -Verbose
[System.IO.DirectoryInfo]$Path_w32tm = "$($ToolsDirectory.FullName)\w32tm"
$GetFiles_w32tm = Get-ChildItem -Path "$($Path_w32tm.FullName)" -Recurse -Force | Where-Object {($_ -is [System.IO.FileInfo])}
@@ -330,6 +334,11 @@ ForEach ($ModuleGroup In $ModuleGroups)
If ($CurrentTimeZone.ID -ine $DestinationTimeZoneID) {$SetTimeZone = Set-TimeZone -Id "$($DestinationTimeZone.ID)" -PassThru}
}
Else
{
$LogMessage = "[WindowsPE Not Detected] - No additional changes are required to allow time synchronization to occur."
Write-Verbose -Message "$($LogMessage)" -Verbose
}
$LogMessage = "Time Before NTP Synchronization: $((Get-Date).ToString($DateTimeLogFormat)) - [$($DestinationTimeZone.DisplayName)]"
Write-Verbose -Message "$($LogMessage)" -Verbose