pnp / PnP-PowerShell

SharePoint PnP PowerShell CmdLets
https://pnp.github.io/powershell
Other
989 stars 662 forks source link

Added additional example for Remove-PnPClientSideComponent #2758

Closed ToddKlindt closed 4 years ago

ToddKlindt commented 4 years ago

Added a second example to Remove-PnPClientSideComponent.

Before creating a pull request, make sure that you have read the contribution file located at

https://github.com/pnp/PnP-PowerShell/blob/dev/CONTRIBUTING.md

Type

What is in this Pull Request ?

Added a few lines with an example

KoenZomers commented 4 years ago

Thanks @ToddKlindt, nice scenario to add as an example. Please ensure next time it compiles before committing :) Fixed it.

ToddKlindt commented 4 years ago

Sorry for any typos. :) I don't have Visual Studio installed. I do have VS Code though. I edited this file right in the browser. How can I verify the file compiles?

KoenZomers commented 4 years ago

It was missing double quotes and it had an argument twice in the sample attribute. Not sure if you can get this to compile in Visual Studio Code actually, never tried. If you need some steps how to get started with Visual Studio, have a look at contributing. It should help you to get started.

ToddKlindt commented 4 years ago

Also, could I talk you into not using the alias? I prefer using the full cmdlet, makes it easier for people trying to pick up PowerShell.

KoenZomers commented 4 years ago

I personally actually think this syntax is way easier to pick up and remember than the other one. Not sure if others may be monitoring this PR, would love to hear more opinions. Most votes win :)

KoenZomers commented 4 years ago

Short discussion with @erwinvanhunen learned that he also prefers the full syntax. I have reverted it as such.

Windos commented 4 years ago

It's been changed already, but my vote is certainly for no aliases in cmdlet examples.

In my mind examples should double for "best practices".

Also in this specific case ? might be easier to read when you know what that means... it's super hard to Google for if you don't. Where-Object gives you a bit more meat to find help on that part if needed.

KoenZomers commented 4 years ago

Fair enough, thanks for sharing your thoughts @Windos

sympmarc commented 4 years ago

No aliases in examples! Most examples are hard enough to follow. KISS