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

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

Open
5 tasks
tyrfing666 opened this issue Feb 22, 2025 · 0 comments
Open
5 tasks

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

tyrfing666 opened this issue Feb 22, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@tyrfing666
Copy link

Expected behavior

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 E:\Code\SharePoint\ROP.SharePoint.SiteScripts> $c = connect-pnponline -url https://yyyyy-admin.sharepoint.com -applicationid -interactive -returnconnection
PS E:\Code\SharePoint\ROP.SharePoint.SiteScripts> $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 E:\Code\SharePoint\ROP.SharePoint.SiteScripts> $script = Get-PnPSiteScriptFromWeb -url "https://yyyyy.sharepoint.com/sites/I14" -includeall
Get-PnPSiteScriptFromWeb: File Not Found.
PS E:\Code\SharePoint\ROP.SharePoint.SiteScripts> $script
PS E:\Code\SharePoint\ROP.SharePoint.SiteScripts>

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
@tyrfing666 tyrfing666 added the bug Something isn't working label Feb 22, 2025
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

1 participant