SMS\_GetUnitIDFromName
SMS_GetUnitIDFromName(sSMSServer, sUnitName, sUserName, sPassword)
Section titled “SMS_GetUnitIDFromName(sSMSServer, sUnitName, sUserName, sPassword)”| Option | Description | Type |
|---|---|---|
| sSMSServer | The SMS Main Site Server | String |
| sUnitName | PC or Username that already exists in SMS | String |
| sUserName | Account performing the action on SMS server | String |
| sPassword | The password for the above account | String |
Return Type
Section titled “Return Type”Boolean, TRUE if function completed successfully.
Description
Section titled “Description”Gets the Unit ID from a named collection on the specified SMS server.
The retrieved ID will be returned in gsValue.
Note that the query is performed on the server and therefore you must be sure to have the right permissions.
Specify * as password to let CapaInstaller decrypt a password already specified by CapaInstaller in registry. Notes:
sSMSServer: SMS Main Server. Sub Site Servers are not supported.
Example
Section titled “Example”<Add Function Scripting Guidelines here>
bStatus=True
If bStatus Then bStatus=IncludeScript(“customlib.cis”)
If bStatus Then bStatus=IncludeScriptingLibrary(“CapaInstaller Scripting Library.cin”)
If bStatus Then bStatus=Job_Start(“WS”,“Get SMS site code”,“1.0”,“Capalib_test.log”,“INSTALL”)
If bStatus Then bStatus=SMS_GetUnitIDFromName(“SMSSRV01”,“FIRMWS34” DOMAIN\Admin”,“Password”)
Job_End(bStatus)
See Also
Section titled “See Also”SMS_GetCollectionIDFromName SMS_GetSiteCode SMS_AddUnitToCollection, Sys_SetEncryptedPassword