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
Following my Steps to Reproduce results in the following error:
Invoke-DbaDbShrink : The input object cannot be bound to any parameters for the command either because the command does not take pipeline input or the input and its properties do not match any of the parameters that take pipeline input.
At line:2 char:23+$SimpleDatabases|Invoke-DbaDbShrink-FileType Log -WhatIf
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: ([TEAMMATE]:PSObject) [Invoke-DbaDbShrink], ParameterBindingException
+ FullyQualifiedErrorId : InputObjectNotBound,Invoke-DbaDbShrink
Steps to Reproduce
If I have one or more database objects in a variable, I can't pass it to Invoke-DbaDbShrink on the pipeline.
So for example let's say I grab some databases like this:
Microsoft SQL Server 2019 (RTM-CU26) (KB5035123) - 15.0.4365.2 (X64) Mar 29 2024 23:02:47 Copyright (C) 2019 Microsoft Corporation Enterprise Edition (64-bit) on Windows Server 2019 Standard 10.0 (Build 17763: ) (Hypervisor)
.NET Framework Version
.NET Framework 4.8.4749.0
The text was updated successfully, but these errors were encountered:
Sorry, I assumed it was already supposed to accept pipeline input and that it wasn't working properly (and thus, a bug) since pretty much all the other DbaTools cmdlets I use that target a database accept a Database object on the pipeline. It didn't occur to me that it would be a Feature Request.
Verified issue does not already exist?
I have searched and found no existing issue
What error did you receive?
Following my Steps to Reproduce results in the following error:
Steps to Reproduce
If I have one or more database objects in a variable, I can't pass it to Invoke-DbaDbShrink on the pipeline.
So for example let's say I grab some databases like this:
I can do this:
But not this:
Attempting that results in the error I posted in the "What error did you receeive?" box above.
Please confirm that you are running the most recent version of dbatools
2.1.18
Other details or mentions
No response
What PowerShell host was used when producing this error
Windows PowerShell ISE (powershell_ise.exe)
PowerShell Host Version
Name Value
PSVersion 5.1.17763.6189
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17763.6189
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
SQL Server Edition and Build number
Microsoft SQL Server 2019 (RTM-CU26) (KB5035123) - 15.0.4365.2 (X64) Mar 29 2024 23:02:47 Copyright (C) 2019 Microsoft Corporation Enterprise Edition (64-bit) on Windows Server 2019 Standard 10.0 (Build 17763: ) (Hypervisor)
.NET Framework Version
.NET Framework 4.8.4749.0
The text was updated successfully, but these errors were encountered: