Skip to main content

Posts

Showing posts from January, 2017

Automating adding user to user groups

Every now and then, I would come across situation, where I have to add new member to project. As part of the process, I have to give the new guys user permission to the machine (mostly BizTalk Server machines). When you have multiple servers, the task gets monotonous. During once such, instance, I sought the enlightenment google caters and found below script to do the same, in matter of seconds. I am not sure which article guided me to the solution, so I am not referencing it.

Below is the script for adding users to group, generally for stand alone BizTalk machine,

$group = [ADSI]"WinNT://localhost/Users"
$group.psbase.Invoke("Add",([ADSI]"WinNT://<domain>/<username>").path)

$group = [ADSI]"WinNT://localhost/BizTalk Application Users"
$group.psbase.Invoke("Add",([ADSI]"WinNT://<domain>/<username>").path)

$group = [ADSI]"WinNT://localhost/BizTalk Isolated Host Users"
$group.psbase.Invoke("Add&…