Guest User!

You are not Sophos Staff.

This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Management API - DeleteUMA

I am trying to write a script to run that will remove the assigned user from a laptop so that we can then re-image it and give it to a new user. As it stands SGN will sync with the client after re-image and configure it for the old user again.

Obviously this can be done manually in the management centre but I would like to use an automated script if possible.

I have looked at the UmaAPI.vbs on the product CD but cannot get this to run. I'm probably missing something obvious!

Does anyone have any experience with this or has wrote a similar script themselves?

Thanks

:34163


This thread was automatically locked due to age.
Parents
  • Hi SteveMo,

    the provided UmaAPI.vbs script should work for you. You would need to query all users that are assigned to the machine ( mode 2 ) and remove all users from the machine in a second step ( mode 3 ).

    'UMA operations by Script
    '
    'Arguments: mode = 1: Get all assigned machines from user
    '			mode = 2: Get all assigned users from machine
    '			mode = 3: delete User Machine relationships
    '			mode = 4: create User Machine relationships and set the relationships's properties
    
    '
    'Call: E.g. cscript UMA_API.vbs mode [computer] [user]
    'Call: E.g. cscript UMA_API.vbs 1 user
    'Call: E.g. cscript UMA_API.vbs 2 computer
    'Call: E.g. cscript UMA_API.vbs 3|4 xp-105 user

    The POA will do a fall back to Autologon mode and the next user that logs on to the machine will create a new User Machine Assignment and will be the new owner of the machine.

    As you may need to cary out additional administrative tasks on the machine and dont want to activate the POA again with your administrator account, you should work with a SGN Service Account (Service Accounts do not activate the POA and can be configured in the Management Center) after you removed the users with the script.

    Cheers,

    ChrisD

    :34409
Reply
  • Hi SteveMo,

    the provided UmaAPI.vbs script should work for you. You would need to query all users that are assigned to the machine ( mode 2 ) and remove all users from the machine in a second step ( mode 3 ).

    'UMA operations by Script
    '
    'Arguments: mode = 1: Get all assigned machines from user
    '			mode = 2: Get all assigned users from machine
    '			mode = 3: delete User Machine relationships
    '			mode = 4: create User Machine relationships and set the relationships's properties
    
    '
    'Call: E.g. cscript UMA_API.vbs mode [computer] [user]
    'Call: E.g. cscript UMA_API.vbs 1 user
    'Call: E.g. cscript UMA_API.vbs 2 computer
    'Call: E.g. cscript UMA_API.vbs 3|4 xp-105 user

    The POA will do a fall back to Autologon mode and the next user that logs on to the machine will create a new User Machine Assignment and will be the new owner of the machine.

    As you may need to cary out additional administrative tasks on the machine and dont want to activate the POA again with your administrator account, you should work with a SGN Service Account (Service Accounts do not activate the POA and can be configured in the Management Center) after you removed the users with the script.

    Cheers,

    ChrisD

    :34409
Children
No Data
Share Feedback
×

Submitted a Tech Support Case lately from the Support Portal?