Users and User Groups - Command Arguments¶
Users¶
GetUserNames¶
Description:
Display all the user names.
Aliases: GetUserNames, Users
Syntax:
| deadlinecommand -GetUserNames | 
| deadlinecommand -Users | 
Arguments:
| Argument | Description | 
|---|---|
| . | No arguments | 
Example:
C:\>deadlinecommand -GetUserNames
    janesmith
    johnsmith
    reneebarton
    sandyallison
    tylerjordan
GetUsers¶
Displays information for all users.
| Argument | Description | 
|---|---|
| <Use Ini Display> | true/false (optional, default is false) | 
Note
See GetUser below for example output.
GetUser¶
Description:
Displays information for the user.
Syntax:
| deadlinecommand -GetUser <User Name(s)> [<Use Ini Display>] | 
Arguments:
| Argument | Description | 
|---|---|
| <User Name(s)> | The user name, or a list of names separated by commas | 
| <Use Ini Display> | true/false (optional, default is false) | 
Example:
C:\>deadlinecommand -GetUser janesmith,johnsmith True
    [janesmith]
    EmailAddress=janesmith@someemail.com
    EmailNotifications=True
    MachineName=WS-1337
    PopupNotifications=False
    UserName=janesmith
    [johnsmith]
    EmailAddress=johnsmith@someemail.com
    EmailNotifications=False
    MachineName=WS-10537
    PopupNotifications=True
    UserName=johnsmith
SetUser¶
Description:
Modifies or creates the user.
Syntax:
| deadlinecommand -SetUser <User Name> <Email> <Machine Name> <Notify By Email> <Notify By Popup> [<User Group>] | 
Arguments:
| Argument | Description | 
|---|---|
| <User Name> | The user name | 
| <Email> | Their email address | 
| <Machine Name> | Their machine name | 
| <Notify By Email> | If they want email notifications (true/false) | 
| <Notify By Popup> | If they want popup notifications (true/false) | 
| <User Group> | Optional. The user group (or list of groups separated by commas) to add the user to. By default, the user is already part of the Everyone group. | 
Example:
Assuming user johnsmith does not exist, this will create a new user:
C:\>deadlinecommand -SetUser johnsmith johnsmith@someemail.com WS-10537 True False Artists
    Created user 'johnsmith'
If the user exists, the existing user’s settings will be modified:
C:\>deadlinecommand -SetUser johnsmith johnsmith@gmail.com WS-10537 False True Producers
    Modified user 'johnsmith'
ChangeUser¶
Description:
Changes the current Deadline User on the machine.
Syntax:
| deadlinecommand -ChangeUser <User Name> | 
Arguments:
| Argument | Description | 
|---|---|
| <User Name> | (optional) If not specified, a Switch Deadline User dialog will be displayed | 
Example:
Change the user to an existing name - no result is printed out on success:
C:\>deadlinecommand -ChangeUser janesmith
C:\>
Opening the Switch Deadline User dialog from the Monitor toolbar will show the new current user:
 
Note
Opening the Switch Deadline User dialog via deadlinecommand -ChangeUser with no optional name argument will not display the current user, but will default to the top user on the list!
If the User name does not exist, an new user will be created:
C:\>deadlinecommand -ChangeUser nemo
    New user account for 'nemo' has been created. You can select Options from the Tools menu in the Monitor to edit your user settings.
Warning
CheckAdminPrivileges¶
Description:
Checks if the current user has admin privileges.
Syntax:
| deadlinecommand -CheckAdminPrivileges <Verbose> | 
Arguments:
| Argument | Description | 
|---|---|
| <Verbose> | true/false | 
Example:
C:\>deadlinecommand -CheckAdminPrivileges true
    Name:           DESKTOP-12A34B56\johnsmith
    System:         False
    Authenticated:  True
    BuiltinAdmin:   False
    Identity:       System.Security.Principal.WindowsIdentity
    Groups:         Everyone,
                    BUILTIN\Users,
                    NT AUTHORITY\INTERACTIVE,
                    CONSOLE LOGON,
                    NT AUTHORITY\Authenticated Users,
                    NT AUTHORITY\This Organization,
                    MicrosoftAccount\johnsmith@email.com,
                    NT AUTHORITY\Local account,
                    LOCAL,
                    NT AUTHORITY\Cloud Account Authentication
    Success
C:\>deadlinecommand -CheckAdminPrivileges true
    Success
GetCurrentUserName¶
Description:
Display the current Deadline user
Syntax:
| deadlinecommand -GetCurrentUserName | 
Arguments:
| Argument | Description | 
|---|---|
| . | No arguments | 
Example:
C:\>deadlinecommand -GetCurrentUserName
    johnsmith
DeleteUser¶
Deletes the user.
| Argument | Description | 
|---|---|
| <User Name(s)> | The user name, or a list of names separated by commas | 
Example:
C:\>deadlinecommand -DeleteUser johnsmith,janesmith
    Deleted users: johnsmith,janesmith
User Groups¶
NewUserGroups¶
Description:
Creates new User Groups with the given user group names, if they do not exist already.
Syntax:
| deadlinecommand -NewUserGroups <User Group Name(s)> | 
Arguments:
| Argument | Description | 
|---|---|
| <User Group Name(s)> | The user group name, or a list of user group names separated by commas | 
Example:
C:\>deadlinecommand -NewUserGroups Artists
    Create new User Group(s): Artists
C:\>deadlinecommand -NewUserGroups Artists
    Failed to create any new User Groups, as all provided User Group names already exist.
C:\>deadlinecommand -NewUserGroups Artists,Producers
    Create new User Group(s): Producers
GetUserGroup¶
Description:
Displays all User names in the specified User Group.
Syntax:
| deadlinecommand -GetUserGroup <User Group Name> | 
Arguments:
| Argument | Description | 
|---|---|
| <User Group Name> | The user group name | 
Example:
C:\>deadlinecommand -GetUserGroup Everyone
    janesmith
    johnsmith
    reneebarton
    sandyallison
    tylerjordan
GetUserGroupNames¶
Description:
Display all the user group names.
Syntax:
| deadlinecommand -GetUserGroupNames | 
Arguments:
| Argument | Description | 
|---|---|
| . | No arguments | 
Example:
C:\>deadlinecommand -GetUserGroupNames
    Artists
    Everyone
    Producers
AddUserToUserGroup¶
Description:
Adds a User to the specified User Group.
Syntax:
| deadlinecommand -AddUserToUserGroup <User Name(s)> <User Group Name(s)> | 
Arguments:
| Argument | Description | 
|---|---|
| <User Name(s)> | The user name, or a list of user names separated by commas | 
| <User Group Name(s)> | The user group name, or a list of user group names separated by commas | 
Example:
C:\>deadlinecommand -AddUserToUserGroup jane,joe Artists
    Added users jane,joe to groups Artists
Adding a User multiple times to the same Group does not cause an error.:
C:\>deadlinecommand -AddUserToUserGroup jane Artists,Producers
    Added users jane to groups Artists,Producers
If some User Groups in the list do not exist, they will be ignored.:
C:\>deadlinecommand -AddUserToUserGroup jane Artists,Zombies
    Added users jane to groups Artists
C:\>deadlinecommand -AddUserToUserGroup jane Zombies
    Unable to add users to user groups.  No valid group names given
C:\>deadlinecommand -AddUserToUserGroup maria Zombies
    Unable to add users to user groups.  No valid user names given
GetUserGroupsForUser¶
Description:
Display all the user group names for the user.
Syntax:
| deadlinecommand -GetUserGroupsForUser <User Name> | 
Arguments:
| Argument | Description | 
|---|---|
| <User Name> | The user name | 
Example:
C:\>deadlinecommand -GetUserGroupsForUser jane
    Artists
    Producers
    Everyone
SetUserForUserGroup¶
Description:
Sets the Users lists of the specified User Groups.
Syntax:
| deadlinecommand -SetUserForUserGroup <User Name(s)> <User Group Name(s)> | 
Arguments:
| Argument | Description | 
|---|---|
| <User Name(s)> | The user name, or a list of user names separated by commas | 
| <User Group Name(s)> | The user group name, or a list of user group names separated by commas | 
Example:
C:\>deadlinecommand -SetUserForUserGroup jane,joe Artists,Producers
    Set users to jane,joe for groups Artists,Producers
The User Group is set to the exact list specified. Excluding a user from the list will remove it from the User Group if it was in it:
C:\>deadlinecommand -SetUserForUserGroup jane,joe Artists,Producers
    Set users to jane,joe for groups Artists,Producers
C:\>deadlinecommand -GetUserGroup Artists
    jane
    joe
C:\>deadlinecommand -GetUserGroup Producers
    jane
    joe
C:\>deadlinecommand -SetUserForUserGroup jane Artists,Producers
    Set users to jane for groups Artists,Producers
C:\>deadlinecommand -GetUserGroup Artists
    jane
C:\>deadlinecommand -GetUserGroup Producers
    jane
RemoveUserFromUserGroup¶
Description:
Removes one or more Users from one or more User Groups.
Syntax:
| deadlinecommand -RemoveUserFromUserGroup <User Name(s)> <User Group Name(s)> | 
Arguments:
| Argument | Description | 
|---|---|
| <User Name(s)> | The user name, or a list of user names separated by commas | 
| <User Group Name(s)> | The user group name, or a list of user group names separated by commas | 
Example:
C:\>deadlinecommand -SetUserForUserGroup jane,joe Artists,Producers
    Set users to jane,joe for groups Artists,Producers
C:\>deadlinecommand -RemoveUserFromUserGroup jane Artists,Producers
    Removed users jane from groups Artists,Producers
C:\>deadlinecommand -GetUserGroup Artists
    joe
C:\>deadlinecommand -GetUserGroup Producers
    joe
There is no warning or error if the User being removed is not in the User Group:
C:\>deadlinecommand -RemoveUserFromUserGroup jane Artists,Producers
    Removed users jane from groups Artists,Producers
DeleteUserGroup¶
Description:
Deletes the User Group with the given User Group name.
Syntax:
| deadlinecommand -DeleteUserGroup <User Group Name> | 
Arguments:
| Argument | Description | 
|---|---|
| <User Group Name> | The name of the User Group to delete | 
Example:
C:\>deadlinecommand -DeleteUserGroup Artists
    Successfully deleted User Group 'Artists'
C:\>deadlinecommand -DeleteUserGroup Artists
    User Group 'Artists' can not be deleted as it does not exist.

