Description
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
- Connect to admin site in tenant.
- Use Get-PnPSiteScriptFromWeb as above
- $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.