Skip to content

Powershell Module SQLSERVER 22.3.0 missing invoke-sqlcmd #31

@amjelnes

Description

@amjelnes

Just a heads up when running the script today I got a missing module error, which is to be expected, as module sqlserver hadn't been installed/imported.

However after doing so (SQLSERVER v. 22.3.0) I got an error saying invoke-sqlcmd was not recognized as a command.

Investigating I found that the command was indeed missing from that particular version, but present in earlier versions.

So removing 22.3.0 with "Uninstall-Module -Name SqlServer -RequiredVersion 22.3.0" and installing an older version with "Install-Module -Name SqlServer -RequiredVersion 21.1.18256 -Force -AllowClobber" (per AI suggestion, so be vary of errors ;-) ) fixed the error and the script now runs as it should.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions