Forum Discussion
Jhult1170
Feb 25, 2026Copper Contributor
stop expanding parentheses in a variable
Hello We have created a script using PowerShell and Box CLI to create groups in Box as a user request them. We have had success with the script until recently. We had a user request that failed...
LainRobertson
Mar 01, 2026Silver Contributor
Hi Jhult1170 ,
I do not have a command called "box", so I can't test your exact use case, however, it's worth noting that your manual example line of:
$BoxLOWGRPRaw="$( Box groups:create --json "Test-Group(Name)" )"
Is not what your first three lines would be producing. Rather, based on your initial three lines, the proper manual test case would look like:
$BoxLOWGRPRaw = "$( Box groups:create --json Test-Group(Name)_Owner )"
This is because you have used the $BoxClientOwnerName variable in your third line rather than the $ClientName variable.
Cheers,
Lain