< Back

Push-ADUsersToBB

Sun Jan 12, 2020 6:33 pm

NAME Push-ADUsersToBB



SYNOPSIS

Get user information from ActiveDirectory with the information needed in GoBright BrightBooking and process it

directly in GoBright BrightBooking





SYNTAX

Push-ADUsersToBB [-Filter] <String> [[-SearchBase] <String>] [[-Server] <String>] [[-ADUserPincodePropertyName]

<String>] [[-ADUserNamePropertyName] <String>] [[-ADUserMobilePropertyName] <String>] [[-ADUserNFCIdPropertyName]

<String>] [[-ADSpecificUsername] <String>] [-BrightBookingApiUrl] <String> [-BrightBookingApiKey] <String>

[-BrightBookingIntegrationName] <String> [[-UserRoleNameForNewUsers] <String>] [[-UserDefaultRoleName] <String>]

[[-GroupUserRoleMapping] <Object[]>] [-DeactivateExistingUsersInSameIntegrationThatAreNotLoaded] [-WhatIf]

[-Confirm] [<CommonParameters>]





DESCRIPTION

Get user information via the Get-ADUser command, retreiving the information needed for GoBright BrightBooking.

(Requiring RSAT tools: Remote Server Administration Tools)





PARAMETERS

-Filter <String>

A filter used to pass to Get-ADUser, if you don't need a filter, then use: '*'

Example: 'samAccountName -like "admin*"'

More information: https://technet.microsoft.com/en-us/lib ... s.10).aspx



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-SearchBase <String>

A SearchBase used to pass to Get-ADUser, specifies an Active Directory path to search under.

Example: "OU=Office,DC=Company,DC=com"

More information: https://technet.microsoft.com/library/hh852208.aspx



Required? false

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Server <String>

Specifies the AD DS instance to connect to, by providing one of the following values for a corresponding

domain name or directory server.

More information: https://technet.microsoft.com/library/hh852208.aspx



Required? false

Position? 3

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ADUserPincodePropertyName <String>

Optional ActiveDirectory User Property which contains the pincode



Required? false

Position? 4

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ADUserNamePropertyName <String>

Optional ActiveDirectory User Property which contains the name of the user, in case you do not want to use the

default property



Required? false

Position? 5

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ADUserMobilePropertyName <String>



Required? false

Position? 6

Default value Mobile

Accept pipeline input? false

Accept wildcard characters? false



-ADUserNFCIdPropertyName <String>



Required? false

Position? 7

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ADSpecificUsername <String>

Optional way to get a specific username from ActiveDirectory which should be used to authenticate the users

when he logs in into GoBright BrightBooking (app/portal). You can choose which username should be used,

DOMAIN\\UserName or the UserPrincipalName (UPN)



Required? false

Position? 8

Default value None

Accept pipeline input? false

Accept wildcard characters? false



-BrightBookingApiUrl <String>

Address of the GoBright BrightBooking API, e.g.: https://eu1.api.brightbooking.eu/



Required? true

Position? 9

Default value

Accept pipeline input? false

Accept wildcard characters? false



-BrightBookingApiKey <String>

API key of the user to use to process the import



Required? true

Position? 10

Default value

Accept pipeline input? false

Accept wildcard characters? false



-BrightBookingIntegrationName <String>

Name of the integration to link the users to



Required? true

Position? 11

Default value

Accept pipeline input? false

Accept wildcard characters? false



-UserRoleNameForNewUsers <String>

Name of the GoBright userrole to link new users to



Required? false

Position? 12

Default value

Accept pipeline input? false

Accept wildcard characters? false



-UserDefaultRoleName <String>

Optional default name of role the role the user should get (will be assigned to every user, except for the

matches find in 'GroupUserRoleMapping')



Required? false

Position? 13

Default value

Accept pipeline input? false

Accept wildcard characters? false



-GroupUserRoleMapping <Object[]>

Optional map of ADGroupNames (by their distinguishedName) and the corresponding role name that should be

assigned. First match will be taken, and will override a potential given 'UserDefaultRoleName'

Examplestructure to supply in this parameter:

$groupToRoleMapping = @()

$groupToRoleMapping += @{ADDistinguishedName = "OU=GoBrightBookingManagers,OU=Groups,DC=company,DC=com";

RoleName = "Bookingmanagers"}



Required? false

Position? 14

Default value

Accept pipeline input? false

Accept wildcard characters? false



-DeactivateExistingUsersInSameIntegrationThatAreNotLoaded [<SwitchParameter>]

Deactivate users that exist in the platform in the same integration but are not loaded anymore from AD (e.g.

because they are not anymore in the group you filter on)



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

Use the WhatIf switch to print out the retreived users, without processing them to the API. This is usefull

for testing purposes



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Confirm [<SwitchParameter>]



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Push-ADUsersToBB -Filter * -BrightBookingApiUrl "https://eu1.api.brightbooking.eu/" -BrightBookingApiKey

"[your api key]" -BrightBookingIntegrationName "Office 365"



# Get all users in the Active Directory and let GoBright BrightBooking process it directly









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Push-ADUsersToBB -Filter * -SearchBase "OU=Office,DC=Company,DC=com" -BrightBookingApiUrl

"https://eu1.api.brightbooking.eu/" -BrightBookingApiKey "[your api key]" -BrightBookingIntegrationName "Office

365"



# Get the users in the Active Directory, which are member of the given group and let GoBright BrightBooking

process it directly









-------------------------- EXAMPLE 3 --------------------------



PS C:\\>Push-ADUsersToBB -Filter { memberOf -RecursiveMatch "CN=Administrators,DC=Company,DC=com" } -SearchBase

"OU=Office,DC=Company,DC=com" -ADUserPincodePropertyName PersonnelNumber -BrightBookingApiUrl

"https://eu1.api.brightbooking.eu/" -BrightBookingApiKey "[your api key]" -BrightBookingIntegrationName "Office

365"



# Get the users in the Active Directory, which in the specified SearchBase path, and use the custom property

'PersonnelNumber' as pincode and let GoBright BrightBooking process it directly











RELATED LINKS

https://support.gobright.com/

https://technet.microsoft.com/library/hh852208.aspx

Get-ADUsersForBB

Convert-ADUsersToBBUserExport

Export-ADUsersForBB