The Micro Update Service allows records (e.g. User, Apps, Devices) to be updated from an external process (e.g. SCCM build script) by reading micro update files from a shared location. This allows business tools to update ManagementStudio without any knowledge of the MS API.
MUS Service requires MS version 2022.0.8.5 or higher
The system requires a correctly constructed text file to be placed in one of the folders that the service monitors.
The file should:
- Start with: MUS_
- Be a unique filename - See note below.
- Content should identify a ManagementStudio record
- Content should identify at least one field or custom field ID (More than one is OK, but each requires a line)
E.g. The filename MUS_DT113421_01.txt is a valid filename
- Starts with MUS_
- Has computer name in the file name
- Has a _01 at the end to make this instance of the file name unique, DateTime could also be used to make it unique.
Unique file names are not a requirement, however processed files are stored for later inspection, if they have the same filename they will overwrite previous versions of the file.
If there are multiple projects and therefore multiple versions of the Micro Update Service operational it is important that they monitor different folders.
i.e.
\\Servername\Share\ProjectName \\DataServer01\Incoming\MergerProject
\\Servername\Share\ProjectName \\DataServer01\Incoming\HardwareRefreshProject
SCCM Command-Line to generate a file on a share
cmd.exe /c "(echo ID:Hostname:%COMPUTERNAME% & echo CFId:100:Upgrade Initiated & echo CFId:110:Task Sequence Completed)> \\ServerName\Share\MUS_%COMPUTERNAME%.txt"
SCCM Sample including the time in the file name
cmd.exe /c "(echo ID:Hostname:%COMPUTERNAME% & echo CFId:100:Upgrade Initiated & echo CFId:110:Task Sequence Completed)> \\ServerName\Share\MUS_%COMPUTERNAME%_%time:~1,1%%time:~3,2%%time:~6,2%.txt"
The first line of the text file should identify the ManagementStudio object that will be updated
using the ID prefix and the line must contain the Target Type and the Name or Value of that target.
ID:IdType:TargetName
Subsequent lines should contain The target type followed by the target followed by the value
TargetType:Target:NewValue
Updatable Modules
Module | Id Type |
---|---|
Applications | AppId or App-CustomerId |
User Migrations | MigrationId or Domain\SamAccount or Email or UserAdSid |
Devices Migrations | DeviceId or Hostname or SmBiosGuid |
Mail Migrations | MailId or MailName1 or MailName123 (This combines all three fields) or MailAdSid |
Bespoke Migrations | BespokeId or BespokeName1 or BespokeName123 or MailAdSid |
Deployment Units | DeployUnitId or DeployUnitName |
Target Type | TargetField | New Value |
---|---|---|
ID | AppId, MigrationId, Hostname.. etc | e.g. 1000, 'PC0001', 'global\rhynes' |
Field | AppVendor, AppName, FirstName.. etc | |
CFPath | CF Path | e.g. 'Form\Section\Field' |
CFId | CF Field Id | e.g. 1234 |
Process | Process | e.g. 'Process Name\Sub Process' |
Note | Note | Some note text |
Option | CreateIfNotFound | true |
Special Characters. ':' and 'new line' characters can't normally be used in the 'Value' portion of the micro update and need to be escaped.
To add a ':' use '\:' and to add a new line use '\n'.
When writing dates with MUS you need to escape the : in the time componant as CFID:999: 2024-05-09 02\:03
Example Text files
Ex - Update Devices from SCCM TS
ID:Hostname:PC00045
CFId:14801:True
CFId:14802:This is the error message from the task sequence
ID:MigrationID:8901
CFId:153:ThisData2`r`nThatData2`r`nMoreData8
Ex - Update a User
ID : SamAccount : global\jdoe
Field: Email: jdoe@global.com
Ex - Create a new App and move it to a Process
Id: App-CustomerId: 12345
Option: CreateIfNotFound: true
Field: AppVendor: Adobe
Field: AppName: New Reader
Field: AppVersion:2021.011.20039
Process: 2. Discovery
Note: Note: Created from ServiceNow support ticket
Security
As MangementStudio will be reading anonymous text files from a share and using this to change data it is important to permission the share so that only AD accounts that you want to be able to update ManagementStudio have permission to write to this share.
i.e. If the MUS is being used to read updates from an SCCM TS then only the SCCM AD account and the ManagementStudio account should have write access to that share.
Further Support
If you require further support, please visit ManagementStudio's Service Desk to search the knowledge base or create a new support ticket.