Quantcast
Channel: Ivanti User Community: Message List
Viewing all articles
Browse latest Browse all 12704

Re: Confirm Preferred Server Config on all Clients

$
0
0

Well I created a quick script that I run but you can have Inventory run it but I just needed it once for all devices:

=======================================

@ECHO ON
set CWD=%~d0%~p0
cls
C:

if %PROCESSOR_ARCHITECTURE% ==AMD64 (
ECHO Preferred Server List x64
FOR /F "delims==" %%1 IN ('type "%PROGRAMFILES(X86)%\LANDesk\LDClient\sdmcache\preferredservers.dat"') DO REG ADD "HKEY_LOCAL_MACHINE\System\LANDesk" /v "Preferred Server" /t REG_SZ /d "%%1" /f
ECHO %ERRORLEVEL%
sdclient.exe /msg=Preferred64_ERRORLEVEL_is_%ERRORLEVEL%
) else (
ECHO Preferred Server List x86
FOR /F "delims==" %%1 IN ('type "%ProgramFiles%\LANDesk\LDClient\sdmcache\preferredservers.dat"') DO REG ADD "HKEY_LOCAL_MACHINE\System\LANDesk" /v "Preferred Server" /t REG_SZ /d "%%1" /f
ECHO %ERRORLEVEL%
sdclient.exe /msg=Preferred32_ERRORLEVEL_is_%ERRORLEVEL%
)

EXIT /B %ERRORLEVEL%

==========================================

Then I just created a Custom Data Registry Key to pull the info into Inventory:

Root Key - HKLM

Key - System\LANDesk

Value - Preferred Server

Attribut Name - Custom Data - LANDesk - Preferred Server


Viewing all articles
Browse latest Browse all 12704

Trending Articles