Forum Discussion
tvaishnav
Apr 07, 2020Copper Contributor
Add-PnPClientSideWebPart not working in Sharepoint online
I am trying to add a new webpart (document library) using Add-PnPClientSideWebPart. I am using following code : Set-Variable -Name "NewDocLib" -Value ((Get-PnPList -Identity "NewDocLib").Id)...
Animesh Joshi
Apr 21, 2020Brass Contributor
looking at the error variable $NewDocLib is null
it seems Get-PnPList -Identity "NewDocLib").Id is not returning anything
what do you see if you add write-host "$($NewDocLib)" after line 1 and before line 2
it seems Get-PnPList -Identity "NewDocLib").Id is not returning anything
what do you see if you add write-host "$($NewDocLib)" after line 1 and before line 2