MSEndpointMgr / ConfigMgr

Microsoft Endpoint Configuration Manager scripts and tools
628 stars 282 forks source link

_SMSTSLOGPath null #307

Open aarnold-sd68 opened 3 years ago

aarnold-sd68 commented 3 years ago

I created a TS for upgrading drivers on Windows, and for some reason it fails trying to create the log file. If I replace the default log directory $LogsDirectory = $Script:TSEnvironment.Value("_SMSTSLogPath") with the debug line $LogsDirectory = Join-Path -Path $env:SystemRoot -ChildPath "Temp" everything works. There was an issue reports last year about why you didn't use the TSEnvironment.Value("_SMSTSLogPath"), but could not remember why. Could it be that this doesn't always exist? or is their something wrong with what I've done?