minor changes

pull/435/head
romanitho 2023-10-19 15:29:50 +02:00
parent e0ac351430
commit e64d2861f4
2 changed files with 18 additions and 18 deletions

View File

@ -304,6 +304,13 @@ if (Test-Network) {
#Check if user context is activated during system run #Check if user context is activated during system run
if ($IsSystem) { if ($IsSystem) {
#Adds SymLink if Intune managed
$IntuneLogPath = "${env:ProgramData}\Microsoft\IntuneManagementExtension\Logs"
if ((Test-Path "$IntuneLogPath") -and !(Test-Path "$IntuneLogPath\WAU-updates.log")) {
Write-ToLog "Creating SymLink for log file (WAU-updates) in Intune Management Extension log folder" "Yellow"
New-Item -Path "$IntuneLogPath\WAU-updates.log" -ItemType SymbolicLink -Value $LogFile -Force -ErrorAction SilentlyContinue | Out-Null
}
#Run WAU in user context if feature is activated #Run WAU in user context if feature is activated
if ($WAUConfig.WAU_UserContext -eq 1) { if ($WAUConfig.WAU_UserContext -eq 1) {
@ -348,13 +355,6 @@ if (Test-Network) {
} }
} }
#Adds SymLink if Intune managed
$IntuneLogPath = "${env:ProgramData}\Microsoft\IntuneManagementExtension\Logs"
if ((Test-Path "$IntuneLogPath") -and !(Test-Path "$IntuneLogPath\WAU-updates.log")) {
Write-ToLog " `nCreating SymLink for log file (WAU-updates) in Intune Management Extension log folder" "Yellow"
New-Item -Path "$IntuneLogPath\WAU-updates.log" -ItemType SymbolicLink -Value $LogFile -Force -ErrorAction SilentlyContinue | Out-Null
}
#End #End
Write-ToLog "End of process!" "Cyan" Write-ToLog "End of process!" "Cyan"
Start-Sleep 3 Start-Sleep 3