Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Receive-FTPFile: -Suppress has no effect #42

Open
KlugB opened this issue Nov 19, 2024 · 1 comment
Open

Receive-FTPFile: -Suppress has no effect #42

KlugB opened this issue Nov 19, 2024 · 1 comment

Comments

@KlugB
Copy link

KlugB commented Nov 19, 2024

When using Receive-FTPFile, I'd like to suppress the verbose output of the commandlet:

Action          : DownloadFile
Status          : True
IsSuccess       : True
IsSkipped       : False
IsSkippedByRule : False
IsFailed        : False
LocalPath       : [...]
RemotePath      : [...]
Message         : Success

The -Suppress switch does not seem to change anything. What is its function? Right now I'm using $null = Receive-FTPFile but this way also error messages would be suppressed, right?

BTW it would be nice to have some documentation for all the other switches of your commandlets. Did I miss it?

Otherwise thanks for your great work!

@PrzemyslawKlys
Copy link
Member

It's supposed to not return any objects and basically act as a $null = xxx, if it's returning objects I guess I haven't covered all options. If you want to catch errors I guess there are two things -ErrorAction Stop or -WarningVariable xxx and catch all warnings it gives you. Both will work. Or you can just just not use suppress, and read Status from objects returned...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants