Share via


Site Url is not properly formed in Powershell?

Question

Tuesday, July 22, 2014 10:07 AM

Hi,

I've been trying to add files to a site on SharePoint Online via PowerShell

$SiteUrl = Get-SPOSite https://company.sharepoint.com/site1

However, every time i run the script i get this error:

Get-SPOSite : The site https://company.sharepoint.com/site1 is not properly formed.

I have connected to sharepoint with the Connect-SPOService command correctly.

What is wrong with the url?
Thanks

Dearbhla

Dearbhla Bradley

All replies (4)

Tuesday, July 22, 2014 10:35 AM ✅Answered | 1 vote

$SiteUrl = Get-SPOSite -Identity https://company.sharepoint.com/site1

Tuesday, July 22, 2014 10:40 AM ✅Answered

Hello,

As mentionned by Brian, you should use the "identity" parameter

more info there :http://technet.microsoft.com/en-us/library/fp161380(v=office.15).aspx

Best regards, Christopher.
Blog | Mail
Please remember to click "Mark As Answer" if a post solves your problem or "Vote As Helpful" if it was useful.
Why mark as answer?


Wednesday, April 19, 2017 8:12 PM

Hi

I have the same query but even after i use -Identity i get the same error, below is my code

[DBG]: PS C:\Users\kumar.akshat\Downloads\Paru\Scripts_FindSharePointOnlineSiteDetails\Scripts_FindSharePointOnlineSiteDetails>> Get-SPOSite -Identity $website.Url
Get-SPOSite : The site https://home500.sharepoint.com/Office365Learning is not properly formed.

value of

$website.Url = https://home500.sharepoint.com/Office365Learning

I have observed that sites having /sites/ after their tenant can only be recognized as per below result

Url                                                               Owner                              Storage Quota
                                                                                             
https://home500.sharepoint.com/search                                                                     26214400
https://home500.sharepoint.com/sites/Office_Viewing_Service_Cache om.mprawat@home500.onmicrosoft.com      26214400
https://home500.sharepoint.com/sites/0123                         om.mprawat@home500.onmicrosoft.com      26214400
https://home500.sharepoint.com/                                                                           26214400
https://home500.sharepoint.com/sites/000055                       om.mprawat@home500.onmicrosoft.com      26214400
https://home500.sharepoint.com/sites/000020                       om.mprawat@home500.onmicrosoft.com      26214400
https://home500.sharepoint.com/sites/0124                         om.mprawat@home500.onmicrosoft.com      26214400
https://home500.sharepoint.com/portals/hub                                                                26214400
https://home500.sharepoint.com/sites/000073                       om.mprawat@home500.onmicrosoft.com      26214400
https://home500-my.sharepoint.com/                                                                        26214400
https://home500.sharepoint.com/portals/Community                                                          26214400
https://home500.sharepoint.com/sites/000056                       om.mprawat@home500.onmicrosoft.com      26214400
https://home500.sharepoint.com/sites/SearchCenter                 om.mprawat@home500.onmicrosoft.com      26214400

Please help!

Thank you

Paru


Monday, April 30, 2018 2:33 AM

Make sure you first use Get-SPOSite to make sure the site you are trying to connect to is in there. For me I was trying connecting to site that I thought was off my root SC but it was not.

Danimal521 MCPD/MCAD