PnP PowerShell and more...

Here I occasionally post about Microsoft 365 Patterns and Practices in general and PnP PowerShell more specifically.

Register your own parameter completer in PowerShell for PnP Cmdlets

2024-11-12 3 min read PowerShell
UPDATE: While the information below is still relevant for basically any cmdlet in your PowerShell modules (so it does not only apply to PnP PowerShell), in the upcoming version 3.0 of PnP PowerShell we have built-in support for autocompletion on List names, Content Type names, Fields and Property Bag keys. For instance, typing Get-PnPList -Identity<tab> will automatically retrieve all the lists in the current site for you to pick from. Continue reading

Speed tip for PnP PowerShell

2022-12-06 1 min read PowerShell
Did you know that retrieving 20 list items like this for($i=1;$i -lt 20;$i++) { Get-PnPListItem -List "My List" -Id $i } is so much slower than $list = Get-PnPList "My List" for($i=1;$i -lt 20;$i++) { Get-PnPListLitem -List $list -Id $i } ? The reason behind this is that the cmdlet Get-PnPListItem for every execution where you use the name ‘My List’ will have to make an extra call to the server to figure out the details about that list before it is able to retrieve the item. Continue reading

2 years after COVID-19

2022-12-03 7 min read
*Warning: This will be a very personal post. Why such a personal post? I guess it’s time to get it ‘out of my system’ * A gap of 2 years. And what a gap it was…. So much happened. TL;DR: in November of 2020 I had a bad base of covid. In May of that same year I lost my father to COPD. In August of 2021 I lost my mother to cancer. Continue reading

COVID-19

2020-11-07 6 min read
Maybe you’ve noticed a bit of a slow down with PnP PowerShell updates the last 2 weeks. The reason: I am currently suffering from COVID-19. How it started Approximately 2 weeks ago my wife felt ‘off’. She started to build up a slight fever, coughed a bit, had some muscle aches. That started on a Monday. I drove her to the local test center for a COVID-19 test. The test was performed and we went home. Continue reading

PowerShell: Debugging Tip

2020-10-13 2 min read PowerShell
When I work on PnP PowerShell (https://github.com/pnp/powershell) I code either in VSCode or in Visual Studio as I write the cmdlets in C#. During development I need to debug the cmdlets I’m building so I need to attach the debugger to the PowerShell session where I run my cmdlets. If there is one PowerShell window/tab running, then there is no problem. However… When I run multiple PowerShell sessions (no surprise: I most of the time do…) then which process do I attach to? Continue reading

PowerShell: Easy Navigation Between Folders

2020-10-13 2 min read PowerShell
If you, like me, have a folder where you navigate to a lot in PowerShell maybe this tip is a handy one for you. The folder in my case contains my GitHub/Code repositories. I navigate around on my computer with PowerShell, but sometimes I simply want to jump back to that location from wherever I am, without needing to enter something like cd c:\users\erwin\repositories\myrepositoryfolder etc. etc. Wouldn’t it be nicer if you get enter something alike repo myrepositoryfolder instead? Continue reading

Cross Platform PnP PowerShell Released

2020-10-09 5 min read PowerShell
After close to more than 2 years or work we finally are ready to release a preview build of PnP PowerShell for PowerShell Core! (Check out the original post) Why did it take so long? A few factors came into play here. At the MVP Summit in Redmond in 2018 I already demoed a version of PnP PowerShell running on MacOS. For that we needed to a few things: We needed to have the Microsoft Client Object Model for SharePoint library (CSOM) available for . Continue reading
Older posts