Adding a CodeSnippet to a modern page using the Add-PnPPageWebPart cmdlet : how to add the code in #2449
Unanswered
Data-Ned88
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there,
I'm trying to use the Add-PnPPageWebPart cmdlet to add a SQL code snippet:
Add-PnPPageWebPart -Page "/FromPowerShell/FirstPnPPage" -Connection $conn -DefaultWebPartType CodeSnippet -WebPartProperties "{
"language":
"SQL",
"lineNumbers":true,
"lineWrapping":true,
"theme":
"Base16Light"}"
Only snag is, how do I actually add the bit of SQL code?! I can't see it as an option in the -WebPartProperties or any other parameters that would take it. IS this even possible?
Beta Was this translation helpful? Give feedback.
All reactions