SSIS commands - Say why they refuse to run on PowerShell 7 - #10665
Open
andreasjordan wants to merge 1 commit into
Open
SSIS commands - Say why they refuse to run on PowerShell 7#10665andreasjordan wants to merge 1 commit into
andreasjordan wants to merge 1 commit into
Conversation
Copy-DbaSsisCatalog, New-DbaSsisCatalog and Get-DbaSsisEnvironmentVariable refuse to run on PowerShell Core, which is right: dbatools.library ships Microsoft.SqlServer.Management.IntegrationServices.dll only under desktop/lib, so the SSIS object model does not exist on pwsh. But the message said "This command is not supported on Linux or macOS", which sends a Windows user looking for a platform problem that is not there. The message now says that PowerShell Core is not supported because the object model is only shipped for Windows PowerShell, and asks for Windows PowerShell - the wording Install-DbaSqlWatch already uses for the same limitation. The gate itself is unchanged. Each command gets a unit test that runs only on pwsh and asserts the warning names Windows PowerShell and not Linux. Refs #10662 (do *Ssis*) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #10662
Problem
Copy-DbaSsisCatalog,New-DbaSsisCatalogandGet-DbaSsisEnvironmentVariablerefuse to run on PowerShell 7 with "This command is not supported on Linux or macOS" - also on Windows, which sends the user looking for a platform problem that does not exist.Mechanism
Unlike the PBM commands (fixed separately), the refusal itself is correct: dbatools.library ships
Microsoft.SqlServer.Management.IntegrationServices.dllonly underdesktop/lib, so the SSIS object model does not exist on pwsh at all. Only the message is wrong.What changed
The three messages now read "PowerShell Core is not supported because the SQL Server Integration Services object model is only shipped for Windows PowerShell, please use Windows PowerShell." - the wording
Install-DbaSqlWatchandUninstall-DbaSqlWatchalready use for the same kind of limitation. The gate ($PSVersionTable.PSEdition -eq "Core") is unchanged.Each of the three test files gets a unit test that runs only on pwsh and asserts the warning names Windows PowerShell and does not mention Linux. It uses a placeholder instance name, because the gate fires before any connection is attempted.
What deliberately did not change
Nothing is made to work on pwsh here; that would need the assembly in the core library first.
Tests
New-DbaSsisCatalog.Tests.ps1fails withExpected regular expression 'Windows PowerShell' to match [New-DbaSsisCatalog] This command is not supported on Linux or macOS.Thanks to @JankeUwe for listing these commands in #10662.
created by Claude and reviewed by Andreas Jordan
馃 Generated with Claude Code