Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New-PNPSite with PreferredDataLocation Error using Azure Automate- [BUG] #2629

Closed
1 of 6 tasks
cystatto opened this issue Dec 12, 2022 · 2 comments
Closed
1 of 6 tasks
Labels
bug Something isn't working

Comments

@cystatto
Copy link

Notice

Many bugs reported are actually related to the PnP Framework which is used behind the scenes. Consider carefully where to report an issue:

  1. Are you using Invoke-PnPSiteTemplate or Get-PnPSiteTemplate? The issue is most likely related to the Provisioning Engine. The Provisioning engine is not located in the PowerShell repo. Please report the issue here: https://github.com/pnp/pnpframework/issues.
  2. Is the issue related to the cmdlet itself, its parameters, the syntax, or do you suspect it is the code of the cmdlet that is causing the issue? Then please continue reporting the issue in this repo.
  3. If you think that the functionality might be related to the underlying libraries that the cmdlet is calling (We realize that might be difficult to determine), please first double check the code of the cmdlet, which can be found here: https://github.com/pnp/powershell/tree/master/src/Commands. If related to the cmdlet, continue reporting the issue here, otherwise report the issue at https://github.com/pnp/pnpframework/issues

Reporting an Issue or Missing Feature

Error when executing New-PNPSite with -PreferredDataLocation GBR

Expected behavior

Expecting new site to be created within the Geo Location

Actual behavior

Creating new site
Creating site in Norway Geo Locaton (NOR)
Provisioning process has FAILED
New-PnPSite : {"error":{"code":"-2147024809, System.ArgumentException","message":"PreferredDataLocation"}}
At line:110 char:16

  • ... $newsite = New-PnPSite -Type TeamSite -Title $siteTitle -Description ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [New-PnPSite], PSInvalidOperationException
    • FullyQualifiedErrorId : InvalidOperation,PnP.PowerShell.Commands.NewSite

Steps to reproduce behavior

Please include complete script or code samples in-line or linked from gists

$siteTitle = "Test Site"
$siteAlias = "TestSite"
$owner.Email = "Joe@Bloggs.com"
$GeoLocation = "NOR"

$newsite = New-PnPSite -Type TeamSite -Title $siteTitle -Alias $siteAlias -Owners $owner.Email -PreferredDataLocation $GeoLocation

What is the version of the Cmdlet module you are running?

PnP.PowerShell 1.12.0

Which operating system/environment are you running PnP PowerShell on?

  • Windows
  • Linux
  • MacOS
  • Azure Cloud Shell
  • Azure Functions
  • Other : please specify
@cystatto cystatto added the bug Something isn't working label Dec 12, 2022
@nithin-kpr
Copy link

is this issue resolved in the latest version ?

@veronicageek
Copy link
Collaborator

@cystatto - Can you please update to the latest release 2.1.x however you will need PS 7.2 or later to benefit from all the bug fixes and improvements.

PS5 support has been dropped in the new release.

Feel free to reopen if the issue persists. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants