To help you better we need some information from you.
*** Please fill in the fields below. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***
Product, version and build: PowerShell Studio 2022 (64 Bit), Build: v5.8.206
Operating system: Windows 10 Enterprise (64 Bit), Build: v10.0.19043.0
PowerShell version(s): 5.1.19041.1645
*** Please add details and screenshots as needed below. ***
"Analyze Script" is returning "Warning: Command accepts pipeline input but has not defined a process block." when I've explicitly set ValueFromPiple to false.
Thanks for your help, and a great product.
=======================================================================
92 param (
93 [Parameter(Position = 1, ValueFromPipeline = $false)][string]$Ucs = $null,
94 [Parameter(Position = 2, ValueFromPipeline = $false)][System.Management.Automation.PSCredential]$Credential = $null,
95 [Parameter(Position = 3, ValueFromPipeline = $false)][switch]$UCSManager = $null,
96 [Parameter(Position = 4, ValueFromPipeline = $false)][switch]$UCSMgmt = $null,
97 [Parameter(Position = 5, ValueFromPipeline = $false)][int]$ChassisId = $null,
98 [Parameter(Position = 6, ValueFromPipeline = $false)][int]$RackServerId = $null,
99 [Parameter(Position = 7, ValueFromPipeline = $false)][switch]$CIMC = $null,
100 [Parameter(Position = 8, ValueFromPipeline = $false)][switch]$IOM = $null,
101 [Parameter(Position = 9, ValueFromPipeline = $false)][int]$Timeout = 1200, # Will abort cmdlet after 20 minutes.
102 [Parameter(Position = 10, ValueFromPipeline = $false)][string]$PathPattern = $PWD, # Defaulting to local directory because if not set the cmdlet will put files in the $HOME directory.
103 [Parameter(Position = 11, ValueFromPipeline = $false)][bool]$Quiet = $false
104 )
=======================================================================
=======================================================================
Get-mUCSTechSupportFiles.ps1 (93, 64): Warning: Command accepts pipeline input but has not defined a process block.
Get-mUCSTechSupportFiles.ps1 (94, 99): Warning: Command accepts pipeline input but has not defined a process block.
Get-mUCSTechSupportFiles.ps1 (95, 64): Warning: Command accepts pipeline input but has not defined a process block.
Get-mUCSTechSupportFiles.ps1 (96, 64): Warning: Command accepts pipeline input but has not defined a process block.
Get-mUCSTechSupportFiles.ps1 (97, 61): Warning: Command accepts pipeline input but has not defined a process block.
Get-mUCSTechSupportFiles.ps1 (98, 61): Warning: Command accepts pipeline input but has not defined a process block.
Get-mUCSTechSupportFiles.ps1 (99, 64): Warning: Command accepts pipeline input but has not defined a process block.
Get-mUCSTechSupportFiles.ps1 (100, 64): Warning: Command accepts pipeline input but has not defined a process block.
Get-mUCSTechSupportFiles.ps1 (101, 61): Warning: Command accepts pipeline input but has not defined a process block.
Get-mUCSTechSupportFiles.ps1 (102, 65): Warning: Command accepts pipeline input but has not defined a process block.
Get-mUCSTechSupportFiles.ps1 (103, 63): Warning: Command accepts pipeline input but has not defined a process block.
=======================================================================
Analyze Script tool false positive regarding pipeline input
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Re: Analyze Script tool false positive regarding pipeline input
Analyze Script is using the PSScriptAnalyzer module to check your script. If you believe there is a bug, you can report a bug here:
https://github.com/PowerShell/PSScriptAnalyzer
https://github.com/PowerShell/PSScriptAnalyzer
Brittney
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.