how set device name only on Soti Mobicontrol 2024.1.2.1046 on Windows modern PC

Solved
NG
Nigro Giovanni
CALZEDONIA S.P.A.

Hi to all,

we starting with my company to use soti on Windows modern PC.

For the enroll we just install the Provisioning Package.

What we need is modify the name of the various pc on the Mobicontrol view but not modify the name internally to the Windows OS.... we need just to organize better the various device on our Soti tenant.

With the old OS of Windows and Windows Classic agent we use a script that read a txt file and modiy the name just on the device view.

How can we do this usning Windows Modern agent ?

Now with Windows Classic we are using this script:

 

set newname=TXT://C:\Fortech\Utility\Soti\DeviceName.txt?LN=1

writeprivateprofstring device devicename "%newname%" 

sleep 2

4 months ago
SOTI MobiControl
ANSWERS
A
ASMOD@SOTI
2 months ago

Hi Giovanni,

 

The following PowerShell Script that parses a .txt file in ANSI containing a line of text with the name the machine should be renamed into (not the Host, only in the WebConsole).

In PowerShell:


Path of the file that contains the correct device name
$nameFile = "C:\ProgramFiles\SOTI\DeviceName.txt"


Read the first line of the file
$deviceName = Get-Content -Path $nameFile -TotalCount 1


Launch the MobiControl application with the -n parameter
$mcAppPath = "C:\Program Files (x86)\SOTI\MobiControl\CommLoader.exe"
Start-Process -FilePath $mcAppPath -ArgumentList "-n `"$deviceName`""

Just make sure that:

- The file path to the .txt file is correct, including spaces, capitalization, and parentheses, and that it is encrypted in ANSII, not UTF-8;

- The file path is also correct, pointing to the MobiControl agent, which is the CommLoader executable;

- Send a check-in from device actions after the script to the machines.

 

 

Solution
RC
Raymond Chan Diamond Contributor
3 months ago (edited 3 months ago)

Why don't you just use the "Rename" device-action in the device view of the web-console to perform the renaming process one Windows-Modern device at a time?

 

NG
Nigro Giovanni
3 months ago

Ciao what we need is automate the rename process just for soti view, we want to avoid that this operation are done manually. We configure a lot of workstation and all info are available directly on the Database of PC for each workstation.... in this way we aviod human error. There are any script or command that give us the possibilit to use custom data or read txt file present in the Windows file system? With Windows 10 and 7 we do this automatically but the same approch don't work with Windows Modern soti solution.