tmaestrini / easyGovernance

governance and validation for configuration baselines in M365 – made as easy as possible
MIT License
11 stars 4 forks source link

Engine-BaselineValidator-M365-SPO.ps1 error #1

Closed sympmarc closed 4 months ago

sympmarc commented 4 months ago

I know you just started this effort, but I'm really intrigued! It doesn't look like there's anything working yet? I've cloned it and I get stuck on line 6 of Engine-BaselineValidator-M365-SPO.ps1

image

I expect there's a prerequisite for yaml processing...

Before I try much more, I just figured I'd check in.

tmaestrini commented 4 months ago

Hey @sympmarc, so glad to read that you're interested in or project! 😍 welcome! As we've started some days ago, I haven't prepared anything so far. Therefore, the README is missing the following two dependencies:

Install-Module -Name powershell-yaml -Scope CurrentUser Install-Module -Name PnP.PowerShell -RequiredVersion 2.2.0 -Scope CurrentUser

Tell me if it's working. It's still work in progress, I will check the preable in as soon as I am at home. 🙌

sympmarc commented 4 months ago

I figured out the poweshell-yaml dependency. Bravo me!

I'm running an older version PnP.PowerShell (1.12) because of some client needs. I'll try the newer version.

But I also think you've got some shortcut logic in the PowerShell that doesn't quite work. I'd suggest spelling out all the shortcuts. For example, VS Code thinks ? means Where-Object, but that doesn't work. In VS Code, I get the problems in the screenshot below. Some are meaningful, but others not so much.

image

Once I understand a little more about what you're doing, I'm hoping I can contribute!

tmaestrini commented 4 months ago

Hmmm, are you on PowerShell 5.1 or >=7? I also will add a .devcontainer, so you don't need to install the modules locally.

sympmarc commented 4 months ago

Doh! You're right: I was on PowerShell 5.1 - also for client reasons.

I still say you should expand things like Select. :)

But I'm up and running!

image

sympmarc commented 4 months ago

Sorry to have bothered you with trivialities.

tmaestrini commented 4 months ago

No worries, Marc! Anytime!