CLI script samples #2839
-
🤔 What do I mean?Ok so this is not a suggestion for an improvement itself but maybe some kind of method to find potential improvements to the CLI and a way to make the CLI more popular tool at the same time. The idea is to challenge all script samples done in PnP PowerShell or SPO (... or any other ) and try to do the same (or almost the same) using m365 CLI 🧑💻. 🙄 Why?👉 First of all it's actually sometimes hard to find what is missing in m365 CLI just by looking at the command list and clicking through the tenant 😋. The functionalities needed are found on real case scenarios (so the time when the customer/domain/whatever comes to the dev/po/consultant/whatever and says: "hey, you know what, we have a great idea for you to do this magical thing for us in the tenant") 😉 . https://pnp.github.io/script-samples is a place where a majority of samples were added based on this kind of experience, and is a great place to start looking for inspiration 👍 Trying to do something in m365 CLI which was already done using some different method => that's a potential way to find a point where you say "hmm... we don't have a command/parameter that supports it.. strange... we should add one 😅". Real life case: I tried to do this -> pnp/script-samples#108 I couldn't do all so I reached out to you and with you we added this new command -> #2777 👉 Second of all is popularity. I remember when I started a first task as and SP dev and first thing I did was research, especially finding samples for something similar what I am trying to achieve (.. now after couple of years I am doing the exact same thing 😅). So even if someone has typed the keyword "PnP PowerShell" in the browser it is still possible he or she will find a page in the script sample were also an CLI equivalent is present 😍. Finding more and more ready to use solutions (not single command but ready scenarios) in this tool may be a game changer if someone will want to use it. 🤨 What are the benefits?TBH I think it is finding what is lacking and increasing potential popularity 👍. What's important is not to show that some tool is better or worser, I think using both or more approaches is best and allows to find the best tool for dev needs. 😏 How? What should be done? Where is the help?So I am not asking for any code or functionality support ... I know, strange... I would like to discuss with you:
What I tried till now is to check the script sample matrix https://pnp.github.io/script-samples/matrix.html (BTW CLI already has most samples 🤩) then pick some which have PnP PowerShell but no CLI, and open a issue with the list of what I would like to do pnp/script-samples#104, agree with repo owner that it is ok, and then go issue by issue and PR by PR etc. (also got a lot of help from @ValerasNarbutas .. thanks a lot 👍). This process is in progress but as I got a tip today that maybe this is also not the best way, maybe there should be an issue also in CLI repo for each sample (like an sample request). |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
This is definitely a great idea and looking at scripts is a great way to see what's needed. What's more, when looking at scripts, we can discover scenarios and usage patterns that we could implement in commands to simplify building scripts. I think it's hard to find which scripts are popular and the script gallery could help us with understanding it. Combined with the feedback from the community, we should have a solid base to understand what's needed and where we could improve. |
Beta Was this translation helpful? Give feedback.
This is definitely a great idea and looking at scripts is a great way to see what's needed. What's more, when looking at scripts, we can discover scenarios and usage patterns that we could implement in commands to simplify building scripts. I think it's hard to find which scripts are popular and the script gallery could help us with understanding it. Combined with the feedback from the community, we should have a solid base to understand what's needed and where we could improve.