Command
Connect-Box
Description
The command to connect to a Box drive to import files from.
For admin connection, the ShareGate Desktop application must be authorized on your Box enterprise. See here for more informations.
Note: You will get prompted with a popup to authorize ShareGate Desktop to complete the connection.
Examples
Connect to a Box.com Drive using a Box.com user account email
Connect-Box -Email user@box.com
Connect to a Box drive using a Box administrator account to perform a migration for any user account
Connect-Box -Email user@box.com -Admin
Syntax
Connect-Box
-Email <String>
Connect-Box
-Email <String>
-Admin <SwitchParameter>
Parameters
-Admin <SwitchParameter>
Use administrator authentication.
Required? | True |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | Admin |
Aliases | None |
-Email <String>
Specifies the user email address.
Required? | True |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
Comments
5 comments
Can you please explain how to automatically connect to box without manual click. When i ran below command, i have to manually click and authorize. Can this be skipped through power shell. That would help as i would be able to create .ps1 file and schedule those task scheduler.
after below command this screen appears-
$box = Connect-Box -email abc@email.com -admin
Hello Jaydeep,
If you want to avoid the manual prompt, you need to follow the link under Description, which guides you to Connect ShareGate to Box article. That will explain how to grant access and no longer see that prompt.
Thanks!
We are having the same problem. Opened up ticket with Box and they are saying its a ShareGate OAuth2 issue. We registered ShareGate Desktop with the client ID (jj7eh2t0p7r5vh8gqzrtgb4tl8jen7pj) in Box, but still get the logon prompt in our powershell script.
Hello Alex,
If you are having the same issue as Jaydeep, but the solution we offered is not fixing it, it will be best to open a ticket with our Support team.
I will go ahead and do that for you.
Thanks!
Please sign in to leave a comment.