pnp / powershell

PnP PowerShell
https://pnp.github.io/powershell
MIT License
679 stars 348 forks source link

Azure Automation Runbooks: Various PnP cmdlets not working #736

Closed colonelclaypoo closed 3 years ago

colonelclaypoo commented 3 years ago

Hi, I'm unable to get Cmdlets such as Get-PnPWeb, Get-PnPList, Get-PnPListItem. to work in an Azure Runbook (module version 1.5.0). Is it's similar to what was discussed here: archive Interestingly, I found Get-PnPTenantSite to work. Unfortunately, the three workarounds suggested are not helping:

  1. Storing cmdlet output in $
  2. Using -ReturnConnection
  3. Suppressing output with | Out-Null is useless for Get-* cmdlets.

The job gets suspended after 3 unsuccessful attempts.

Is this new or could it never be fixed for good? I couldn't tell from the linked, archived thread.

Thanks.

Update: Get-PnPWeb outputs a user not found message to the job stream console, for whatever reason. Get-PnPWeb : The user could not be found. At line:5 char:9 + $webs = Get-PnPWeb + ~~~~~~~~~~ + CategoryInfo : WriteError: (:) [Get-PnPWeb], ServerException + FullyQualifiedErrorId : EXCEPTION,PnP.PowerShell.Commands.GetWeb

Dopsterinho commented 3 years ago

Hy, I have the same Problem. Did you found a solution ? Besides this, after upgrading to PnP.Powershell Module, Inoke-PnPSiteTemplate doesn't work, although the progress bar shows like it would do.

Why is this happening ?

Regards

colonelclaypoo commented 3 years ago

Unfortunately not as of right now. I fell back to executing the script on a local machine but am really curious if more people experience this behaviour.

Hy, I have the same Problem. Did you found a solution ? Besides this, after upgrading to PnP.Powershell Module, Inoke-PnPSiteTemplate doesn't work, although the progress bar shows like it would do.

Why is this happening ?

Regards

github-actions[bot] commented 3 years ago

This issue is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 5 days

gautamdsheth commented 3 years ago

Am converting this to a discussion as this is not an issue with the PnP PowerShell cmdlets but something to do with Azure automation..