Add and Remove Windows User

Version 2

    To add or remove a Windows user, do the following:

    Live Browse ANY Windows server.
    Open the Local Users node.
    Find ANY User. It's most handy to pick a User that looks very similar to the one you want to add or remove.
    Right-Click the User and choose "Add to depot as BLPackage".


    Your BLPackage will look like this:


    Now watch what happened here:
    We packaged ONLY the Guest user and we have two objects in the BLPackage. In the image above you can see all the properties of the user we packaged. You can change every property that is not greyed out and that includes Password, HomeDrive, etc.
    Now, because the user Guest is member of a Windows Group, BSA also packaged that Windows Group, in our case the group Guests.


    In the image above you can see that BSA going to Modify the Windows Group and that there is a node called Guest.


    According to this image this Guest is going to be added to the Windows Group Guests.
    So if we deploy this BLPackage BSA will create the user Guest and add the user to the Windows Group Guests.
    Makes all the sense in the world, doesn't it?

    So how does this work if we want to remove the user Guest?

    If we want to remove the Windows User Guest from any target server, the only thing we need to do is to change the Action of the first object, the Windows User Guest, from "Add" to "Delete" as shown in the next image.


    What we want to do with the Windows Group is up to us. We can explicitly say that we want to take the User out of the Group like in the next image...2012-06-20_21-19-11.jpg



    ...or we can take the Windows Group out of the BLPackage entirely and let Windows handle the fact that when a User gets deleted from the system, this use also get deleted from any Windows Group it belonged to.
    Your BL_Package will then look like this:


    That's all there is to handing Windows Users and Groups in BSA.