Forum Discussion
Trying to use PowerShell for SharePoint Online, failing miserably
Hey Joe,
When you use connect-sponline what URL are you using? In the error it would appear you are connecting to https://harmelinmedia.sharepoint.com/...can you try to connect to https://harmelinmedia-admin.sharepoint.com/? The connect-sponline needs to connect to the admin site...Sorry if you have tried this, just trying to eliminate the simple things for you
Suzanne
I think this is 100% what I'm doing wrong. i'll update tomororw. Thanks.
- Vipin TyagiOct 04, 2016Brass Contributor
Hey,
A simple tip for you.
If you are using PnP PowerShell then you can use below cmdlet to connects SPO
1.Connect-SPOnline(site Url will be https:\\abc.sharepoint.com)
But if you are using SharePoint Online Management Shell,you have only one option to connect
1.Connect-SPOService(Url will be https:\\abc-admin.sharepoint.com)
Cheers!!!!
- Suzanne HuntOct 04, 2016Brass Contributor
Hi Joe,
Did you manage to get this working?
- Joe FedorowiczOct 04, 2016Iron Contributor
I did, but it was nothing different from what I was doing (I believe). Some of the old scripts I had just started working again, so I think there was a problem with my tenent for about 24 hours.
Thanks all. Still learned some stuff in here.