Closed
Description
Report
Host used
- powershell.exe
- ISE
- VS Code
- Other (please specify)
Errors Received
writeErrorStream : True
PSMessageDetails :
Exception : System.Management.Automation.ParameterBindingException: 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.
TargetObject : [sch ].[seq ]
CategoryInfo : InvalidArgument: ([sch ].[seq ]:PSObject) [Remove-DbaDbSequence], ParameterBindingException
FullyQualifiedErrorId : InputObjectNotBound,Remove-DbaDbSequence
ErrorDetails :
InvocationInfo : System.Management.Automation.InvocationInfo
ScriptStackTrace : at Get-DbaDbSequence<Process>, C:\dbatools\functions\Get-DbaDbSequence.ps1: line 86
at <ScriptBlock>, <No file>: line 1
PipelineIterationInfo : {0, 1, 0}
Steps to Reproduce
# get the sequence and pipe it to remove
Get-DbaDbSequence -SqlInstance localhost -Database db -Name seq -Schema sch | Remove-DbaDbSequence
Expected Behavior
Removes the selected sequence
Actual Behavior
# asks for the name
Get-DbaDbSequence -SqlInstance localhost -Database db -Name seq -Schema sch | Remove-DbaDbSequence
cmdlet Remove-DbaDbSequence at command pipeline position 2
Supply values for the following parameters:
Name:
When I put the name I get this error:
writeErrorStream : True
PSMessageDetails :
Exception : System.Management.Automation.ParameterBindingException: 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.
TargetObject : [sch ].[seq ]
CategoryInfo : InvalidArgument: ([sch ].[seq ]:PSObject) [Remove-DbaDbSequence], ParameterBindingException
FullyQualifiedErrorId : InputObjectNotBound,Remove-DbaDbSequence
ErrorDetails :
InvocationInfo : System.Management.Automation.InvocationInfo
ScriptStackTrace : at Get-DbaDbSequence<Process>, C:\dbatools\functions\Get-DbaDbSequence.ps1: line 86
at <ScriptBlock>, <No file>: line 1
PipelineIterationInfo : {0, 1, 0}
Environmental information
🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨
Please provide the output of the below script
[pscustomobject]@{
'PowerShell Version' = $PSVersionTable.PSVersion.ToString()
'dbatools latest installed' = (Get-InstalledModule -Name dbatools).Version
'Culture of OS' = (Get-Culture)
} | fl -force
PowerShell Version : 5.1.19041.906
dbatools latest installed : 1.0.147
Culture of OS : en-GB
SQL Server:
Microsoft SQL Server 2017 (RTM-CU13) (KB4466404) - 14.0.3048.4 (X64) Nov 30 2018 12:57:58 Copyright (C) 2017 Microsoft Corporation Developer Edition (64-bit) on Linux (Ubuntu 16.04.5 LTS)
us_english