Nov 20 2023 07:50 AM
I am using this version of PS:
Major Minor Build Revision
----- ----- ----- --------
5 1 19041 3570
I have also installed PnP for PowerShell.
I am attempting this:
$tenant = "myCompany"
Write-Host "Connecting to https://$($tenant)-admin.sharepoint.com..."
Connect-PnPOnline -Url "https://myCompany-admin.sharepoint.com"
Get-PnPWeb -Identity "https://myCompany.sharepoint.com/sites/mySite"
But I'm getting an error saying:
Get-PnPWeb : File Not Found.
At line:4 char:1
+ Get-PnPWeb -Identity "https://myCompany.sharepoint.com/sites/MyCompan...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Get-PnPWeb], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,PnP.PowerShell.Commands.GetWeb
I've read ALL existing MS documentation and even the PnP docs, but nothing shows how to do it.
My objective is to connect to the tenant (this works) then get a specific site so I can start adding items to it.
Nov 20 2023 11:19 AM
Nov 21 2023 12:19 AM
Nov 21 2023 12:50 AM
Nov 22 2023 01:00 AM
Solution@CardinalNight Did that work out for you?
Please click Mark as Best Response & Like if my post helped you to solve your issue.
This will help others to find the correct solution easily. It also closes the item.
If one of the posts was helpful in other ways, please consider giving it a Like.
Nov 22 2023 01:03 AM