Skip to content

[BUG]Get-SiteScriptFromWeb produces File not Found #4752

Closed
@tyrfing666

Description

@tyrfing666

Expected behavior

Note: in the below, https://yyyyy.sharepoint.com/sites/I14 is an existing site.

This line:
$script = Get-SiteScriptFromWeb -url "site" -IncludeAll
When used after a connection is made and URL is an existing site, should produce a JSON file in $script

Actual behavior

Note tenant id and clientid masked.

PS > $c = connect-pnponline -url https://yyyyy-admin.sharepoint.com -applicationid -interactive -returnconnection
PS > $c

ConnectionMethod : Credentials
ConnectionType : TenantAdmin
InitializationType : Unknown
Scopes :
PSCredential :
ClientId :
ClientSecret :
ApplicationInsights : PnP.PowerShell.ALC.ApplicationInsights
Url : https://yyyyy-admin.sharepoint.com/
TenantAdminUrl :
Certificate :
DeleteCertificateFromCacheOnDisconnect : False
Context : PnP.Framework.PnPClientContext
Tenant :
UserAssignedManagedIdentityObjectId :
UserAssignedManagedIdentityClientId :
UserAssignedManagedIdentityAzureResourceId :
AzureEnvironment : Production

PS > $script = Get-PnPSiteScriptFromWeb -url "https://yyyyy.sharepoint.com/sites/I14" -includeall -connection $c
Get-PnPSiteScriptFromWeb: File Not Found.
PS > $script
PS >

Steps to reproduce behavior

  1. Connect to admin site in tenant.
  2. Use Get-PnPSiteScriptFromWeb as above
  3. $script variable will be empty and error returned is 'File Not Found".

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

ModuleType Version PreRelease Name PSEdition ExportedCommands


Manifest 2.12.0 PnP.PowerShell Core {Add-PnPAdaptiveScopeProperty, Add-PnPE…
Manifest 2.1.1 PnP.PowerShell Desk {Add-PnPAdaptiveScopeProperty, Add-PnPP…

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

  • [X ] Windows
  • Linux
  • MacOS
  • Azure Cloud Shell
  • Azure Functions
  • Other : please specify

edited for clarity.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions