powershell icon indicating copy to clipboard operation
powershell copied to clipboard

[BUG] Lack of information/verbose or debugging info from most cmdlets

Open kilasuit opened this issue 4 years ago • 3 comments

Reporting an Issue or Missing Feature

Most cmdlets do not output any verbose, debugging or information streams

Expected behavior

Ability to output these types of streams which is a built in feature to PowerShell

Actual behavior

Please describe what you see instead. Please provide samples of output or screenshots.

Steps to reproduce behavior

Add -Verbose, -Debug or change any of the built in preference vairables and this should at least output some basic useful information

What is the version of the Cmdlet module you are running?

1.8.0 and all versions below

Which operating system/environment are you running PnP PowerShell on?

  • [x ] Windows
  • [ ] Linux
  • [ ] MacOS
  • [ ] Azure Cloud Shell
  • [ ] Azure Functions
  • [ ] Other : please specify

kilasuit avatar Oct 26 '21 11:10 kilasuit

The problem with cmdlets not implementing these streams natively is that you need to add so much additional unneccesary boilerplate code around them so that you can correctly debug/log what a script is doing.

and that's a huge waste of development effort for every script author.

kilasuit avatar Oct 26 '21 11:10 kilasuit

Good point @kilasuit and I totally agree with you. The team shares the same stance with you in this. From our side we'll try to make better and moreover more use of these options while working on or adding new cmdlets. As this is not something we can just do for the existing 600 cmdlets. I therefore don't think it serves a purpose to keep this issue open, but thanks for sharing your opinion. Feel free to contribute through Pull Requests to add this to cmdlets where you think it will be most beneficial.

KoenZomers avatar Nov 11 '21 14:11 KoenZomers

@KoenZomers perhaps we should create this as a project with individual issues to split the work down to smaller groups of cmdlets & plan this as something to aim to complete for each group by say Feb/March 2022's release?

kilasuit avatar Nov 11 '21 20:11 kilasuit