SCCM Client unhealty

SCCM Client wasn’t registered in the SCCM Console anymore.

Reinstalled the client manually and noticed it showed up on the Console but after a day it was gone again.

The LocationServices.log shows the following error loop:

Retrieved lookup MP(s) from AD LocationServices 4/20/2020 10:04:20 AM 2676 (0x0A74)
Request to http://00863.XYZ.COM/SMS_MP/.sms_aut?SMSTRC cannot be fulfilled since use of metered network is not allowed. LocationServices 4/20/2020 10:04:20 AM 2676 (0x0A74)
No security settings update detected. LocationServices 4/20/2020 10:04:20 AM 2676 (0x0A74)
Retrieved MP [00096.XYZ.COM] from Registry LocationServices 4/20/2020 10:04:20 AM 2676 (0x0A74)
Attempting to retrieve lookup MP(s) from AD LocationServices 4/20/2020 10:04:20 AM 2676 (0x0A74)
Lookup Management Points from AD: LocationServices 4/20/2020 10:04:20 AM 2676 (0x0A74)
Name: ‘00866.XYZ.com’ HTTPS: ‘N’ ForestTrust: ‘N’ LocationServices 4/20/2020 10:04:20 AM 2676 (0x0A74)
Retrieved lookup MP(s) from AD LocationServices 4/20/2020 10:04:20 AM 2676 (0x0A74)
Attempting to retrieve default management points from lookup MP(s) via HTTPS LocationServices 4/20/2020 10:04:20 AM 2676 (0x0A74)
Default Management Points from AD: LocationServices 4/20/2020 10:04:20 AM 2676 (0x0A74)
Name: ‘00866.XYZ.com’ HTTPS: ‘N’ ForestTrust: ‘N’ LocationServices 4/20/2020 10:04:20 AM 2676 (0x0A74)
Persisting the default management points in WMI LocationServices 4/20/2020 10:04:20 AM 2676 (0x0A74)
Current AD site of machine is GBHH LocationServices 4/20/2020 10:04:20 AM 2676 (0x0A74)
Failed to send management point list Location Request Message to 00863.XYZ.COM LocationServices 4/20/2020 10:04:20 AM 2676 (0x0A74)
Persisted Default Management Point Locations locally LocationServices 4/20/2020 10:04:20 AM 2676 (0x0A74)
Attempting to retrieve local MPs from the assigned MP LocationServices 4/20/2020 10:04:20 AM 2676 (0x0A74)
Current AD site of machine is GBHH LocationServices 4/20/2020 10:04:20 AM 2676 (0x0A74)
Failed to send management point list Location Request Message to 00865.XYZ.com LocationServices 4/20/2020 10:04:20 AM 2676 (0x0A74)

Windows noticed it was connected through a Wi-Fi LTE modem, so it set its connection as metered.

User had an unlimited data plan, so we disabled the ‘Metered connection’ setting under Windows Setting.

But changing the ‘Metered connection’ setting was not enough.

We also changed the local policy:

  • Computer Configuration/Policies/Administrative Templates/Network/WLAN Service/WLANMedia Cost
    Set Cost: Enabled, Unrestricted
  • Computer Configuration/Policies/Administrative Templates/Network/WWAN Service/WWAN Media Cost
    Set 3G Cost: Enabled, Unrestricted
  • Computer Configuration/Policies/Administrative Templates/Network/WWAN Service/WWAN Media Cost
    Set 4G Cost: Enabled, Unrestricted

Client is now healthy and operational again.

Retrieving User information in VBScript

We have an issue where %userdomain% & %username% doesn’t resolve at all.

Therefore we found a “work-a-round”

Dim ntsys

Set ntsys = CreateObject(“WinNTSystemInfo”)

wscript.echo “User: ” & ntsys.UserName

wscript.echo “Computer: ” & ntsys.ComputerName

wscript.echo “Domain: ” & ntsys.DomainName

wscript.echo “PDC: ” & ntsys.PDC

Setx Environment Variables

By default setx sets the variable in the local environment (Under HKEY_Current_User Registry key). If you want to set the system variable (Under HKEY_LOCAL_MACHINE registry key), use the flag /m.

The set command only sets the environment variable for the current session. The setx command sets it permanently, but not for the current session. If you want to set it for current as well as future sessions, use both setx and set.

Example:

SETX /M INCLUDE C:\IBM\SQLLIB\LIB

SETX /M CLASSPATH .;C:\IBM\SQLLIB\java\db2java.zip;C:\IBM\SQLLIB\java\db2jcc.jar;C:\IBM\SQLLIB\java\db2cc_license_cu.jar;C:\IBM\SQLLIB\bin;C:\IBM\SQLLIB\java\common.jar

Append to Path use %PATH%

SETX /M PATH “%PATH%;X:\win32\install\bin;X:\win32\install\core\CO_ORBIX\bin;X:\win32\install\core\CO_JDK\bin”

Set environment variable by Registry edit

If your PATH variable is too long, then the best method would be to edit the registry.

For user environment variables, change the key HKEY_CURRENT_USER\Environment. For System Environment variables change

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment

Add, Edit or Delete the environment variable you want to change, then reboot to activate the changes.

https://www.opentechguides.com/how-to/article/windows-10/113/windows-10-set-path.html