When you run as system under SCCM, some Environment Variables are blank.
While this is usually not an issue __and not caused by the toolkit__, we recently had a script that depended on %LOGONSERVER% and the script failed when running from SCCM. We ended up sucking the value for %LogonServer% out of the registry when %LogonServer% is blank:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\History]
DCName = "<Value of %LogonServer%>"
or
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\GroupPolicy\History]
DCName = "<Value of %LogonServer%>"
From testing we've found that %HOMEDRIVE% and %HOMEPATH% are also blank when running as system/SCCM. we have yet to determine if these 2 are worth fixing or what value to give them when running as system/SCCM.
Personally, I just care to have the TK fix %LogonServer% when it can. Otherwise set it to UNKNOWN or
NotSet.
While this is usually not an issue __and not caused by the toolkit__, we recently had a script that depended on %LOGONSERVER% and the script failed when running from SCCM. We ended up sucking the value for %LogonServer% out of the registry when %LogonServer% is blank:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\History]
DCName = "<Value of %LogonServer%>"
or
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\GroupPolicy\History]
DCName = "<Value of %LogonServer%>"
From testing we've found that %HOMEDRIVE% and %HOMEPATH% are also blank when running as system/SCCM. we have yet to determine if these 2 are worth fixing or what value to give them when running as system/SCCM.
Personally, I just care to have the TK fix %LogonServer% when it can. Otherwise set it to UNKNOWN or
NotSet.