How To Connect To SharePoint Online Using Windows PowerShell

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello friends welcome to my youtube channel captec pro in this video we'll learn how to connect to sharepoint online using powershell and what are the basic commands of sharepoint online but prior to that we will see how to install sharepoint online module to run those commands so guys and let's start our today's demonstration [Music] okay friends so now we are on our lab environment and we will open windows powershell now on windows powershell if we will try to connect to our sql service we will enter the command connect dash sp service you can see there is an error message this error message is coming because we haven't installed sharepoint online management shell and this is the reason we are getting this error message so there are two methods to install sharepoint module first method is to go to the browser simply type sharepoint online management shell there is the first link of microsoft you can click over here and you can see sharepoint knowledge and online management shell you can click on download to download this module now let's see how we can do it using powershell so to install sharepoint online module we'll simply type okay so we have entered the command install module microsoft dot online sharepoint dot powershell scope current user this command will install our sharepoint online module on our this system so we'll press enter and we'll wait till the time our installation of sharepoint online module gets complete now we have to provide the input do you want powershell get to install and import on and you get provided now we'll press y and then we press enter it will take around one to two minutes to get installed on our system okay so it's saying untrusted repository still you want to proceed we'll type type a yes to all okay so you can see install it's installing the package okay so now our command is successfully executed now if you will try to connect to spo service we won't be getting the error message okay connect sql service okay so do you want to run the software for this untrusted publisher we'll type r to run it once okay so you can see now it is trying to connect to our spo service and it's saying supply values for the following parameters now it's asking for the url so here we have to enter the url of our sharepoint online so where you will get this url now in the microsoft 365 admin center i will open navigation menu and i will click on sharepoint so basically this is the url which we have to enter on powershell so we'll copy https colon captec admin sharepoint.com we'll copy this we'll go back to powershell and here enter the so now i will press enter now it will ask me to sign into the account so let me enter the credentials okay now let me okay now i will click on sign so now i am successfully logged in now first of all i want to see the list of site on sharepoint admin center if i will click on admin sites these are sites which i have created on sharepoint admin center first of all let's see how to see all these sites using powershell so here i will enter the command get spo site and if i will press enter you will see the list of sites you can see these all are the sites now if you want to see details of particular site you can simply type get spo site space dash identity [Music] space now enter the url of the particular site of which you want to see the details so i want to see the details of my test site so i will simply copy it and i will paste it over here and and now press enter so you can see the url the site owner is richard captec.microsoft.com and this is the storage quota now if you want to see more details about this site you can simply add enter space pipe and fl now you will see all the details of this particular site like last content and modified date is this the status is active or not and you can see lot many things like the url of the site and what is the group id you can see lot many things from this fl okay after seeing the fl now if i want to remove a particular site from my active state so say for example i want to delete my site test which is this side so there's a command to perform this action so i will type remove dash spo space dash then enter the identity and and enter the url of the site so this is the site which i want to remove so now i will press enter so it's asking do you are you sure you want to perform this action so i will press y and i will press enter okay so now i have removed my site test so i will minimize powershell and let's see on sharepoint admin center it's removed or not if i will refresh this okay so you can see my test site is now deleted if i will see on deleted site it's over here we can see this using powershell as well if i will again type get spo site you can see the test site is now not listed on our this list now okay so we have removed our site now if you want to restore it using powershell there is a command for that as well so we'll type restore dash spo site delete site space dash identity now then we have to paste the url of the site which you want to restore so the url is this of my site test so now i will press enter so we have make a mistake on the command now i will press enter [Music] okay so now our command is executed now if i will see my site is on active state or not so we'll again type command get spo site and now it press enter so again you can see my site test is now on active site if i will minimize my powershell and if i will refresh my admin center you can see my site is now restored so friends we have learned how to download module for sharepoint online we have seen how to connect to our rescue service then we have to simply enter the url to connect to a specific sharepoint admin center we have seen how to see the list of site and how to remove it and how to restore a particular site so guys this was a brief introduction how to use powershell for to connect to sharepoint online in our upcoming videos will see more advanced commands for our sharepoint online that's it for this video demonstration for more informative videos you can check my other video links on the screen and subscribe my channel and press bell icon for more upcoming videos i will see you guys in next video
Info
Channel: KapTechPro
Views: 9,488
Rating: undefined out of 5
Keywords: kaptechpro, How To Connect To SharePoint Online Using Windows PowerShell, can we connect to sharepoint online site using powershell, connect to sharepoint online site collection using powershell, download and install SharePoint Online Management Shell, How to connect to sharepoint online site using powershell, Get list of sharepoint online Active site using powershell, delete site on sharepoint online using powershell, restore site on sharepoint online using powershell
Id: wXMdEbQGNWg
Channel Id: undefined
Length: 8min 14sec (494 seconds)
Published: Mon Jan 17 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.