You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PS C:\WINDOWS\system32> D:\Downloads\CreateUser.ps1
Creating User user1
Assigning Permission Set SUPER to user1
Assigning Premium plan for USER1
The term 'Invoke-Sqlcmd' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
Container Free Physical Memory: 8.1Gb
Services in container mycontainer:
New-BcContainerBcUser Telemetry Correlation Id: 3b850d78-fa1a-4870-9829-be7ede65263b
The term 'Invoke-Sqlcmd' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\6.0.8\ContainerHandling\Invoke-ScriptInNavContainer.ps1:304 char:25
+ throw $errorMessage
+ ~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (The term 'Invok... and try again.:String) [], RuntimeException
+ FullyQualifiedErrorId : The term 'Invoke-Sqlcmd' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
...
Screenshots
n/a
Additional context
I am using BcContainerHelper 6.0.8
This has broke in the past week as I have a similar script running every Saturday. It ran fine on March 2, and failed on March 9.
I am creating a container with v24 artifacts (specifically, I am using the next-minor artifacts)
I had a similar script I was running where I was using 'Invoke-ScriptInBcContainer' to call 'Invoke-SqlCmd' and it had the same error. I fixed that by adding '-usePwsh $false' to the 'Invoke-ScriptInBcContainer' call
This is caused by the fact that invoke-scriptinBcContainer uses pwsh in BC 24+ instead of powerShell
Reason for this is that all BC commandlets in BC24 now need PowerShell 7.4.1 and running a bridge from PowerShell 5 to PowerShell 7 is very expensive.
BTW, this is not related to 3330 (which is a problem with different locale in a container) - this is simply invoke-sqlcmd not available in pwsh.
freddydk
changed the title
New-BcContainerBcUser fails with 'Invoke-SqlCmd' error
New-BcContainerBcUser fails with 'Invoke-SqlCmd' error when running BC24
Mar 11, 2024
And remove support for pre 1.0.2.15 generic images (these no longer
exists)
Fixes#3404Fixes#3406
---------
Co-authored-by: freddydk <freddydk@users.noreply.github.com>
PLEASE DO NOT INCLUDE ANY PASSWORDS OR TOKENS IN YOUR ISSUE!!!
Describe the issue
When executing 'New-BcContainerBcUser' on an existing container, the command fails with the following error:
The term 'Invoke-Sqlcmd' is not recognized as a name of a cmdlet, function, script file, or executable program.
Scripts used to create container and cause the issue
After creating a container with user/password authentication, run the following script:
Full output of scripts
Screenshots
n/a
Additional context
The text was updated successfully, but these errors were encountered: