You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently using the PNP Cmdlet "New-PnPsite" and I want to automize it. Therefore I need to use variables with the cmdlet, but everytime I use a variable within the -Url Parameter I get an error message:
New-PnPSite : The property or field 'Url' has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested
This discussion was converted from issue #3071 on April 30, 2023 18:29.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello guys,
I'm currently using the PNP Cmdlet "New-PnPsite" and I want to automize it. Therefore I need to use variables with the cmdlet, but everytime I use a variable within the -Url Parameter I get an error message:
New-PnPSite : The property or field 'Url' has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested
My code looks the following:
I use the the PowerShell parameters:
When I use a normal string -Url "{tenant}.sharepoint.com/sites/title" then it's working. What can I do?
Best regards
Matthias
Beta Was this translation helpful? Give feedback.
All reactions