Forum Discussion
Audi86
Sep 26, 2022Brass Contributor
Powershell for sharepoint online
Hi, I have a powershell script related to SharePoint 2013 server. Can this be converted to work on online, as the site is community site template which was available in SharePoint 2013 and its also a...
- Sep 26, 2022Hello,
There is no Get-SPWeb in SPO PS so I would say you will need to explore with PnP SharePoint module
https://pnp.github.io/powershell/cmdlets/Get-PnPWeb.html
and
https://pnp.github.io/powershell/cmdlets/Disable-PnPFeature.html
Sep 26, 2022
Hello,
There is no Get-SPWeb in SPO PS so I would say you will need to explore with PnP SharePoint module
https://pnp.github.io/powershell/cmdlets/Get-PnPWeb.html
and
https://pnp.github.io/powershell/cmdlets/Disable-PnPFeature.html
There is no Get-SPWeb in SPO PS so I would say you will need to explore with PnP SharePoint module
https://pnp.github.io/powershell/cmdlets/Get-PnPWeb.html
and
https://pnp.github.io/powershell/cmdlets/Disable-PnPFeature.html
- Audi86Sep 26, 2022Brass Contributor
hi AndresGorzelany
This code did some stuff. Renamed the old categories and created the new Categories but my URL didn't update to new categories, any advise for this ?I reset Site Features manually from site settings
Connect-PnPOnline -Url https://[your-tenant].sharepoint.com/sites/[your-site] $categorieslist = Get-PnPList -Identity "[GUID of the list you want to move]" $categorieslist.Title = "Categories_old" $categorieslist.RootFolder.MoveTo("https://[your-tenant].sharepoint.com/sites/[your-site]" + "/lists/categories_old") $categorieslist.Update() Invoke-PnPQuery Write-Host "Categories list issue fixed..."
- Sep 27, 2022I couldn't test your scenario specifically yet but remember that you have to use Disable-PnPFeature/Enable-PnPFeature
I am not sure you will find equal parity of cmdlets/parameters, so I also recommend testing on a test site/list. You will probably need to adjust some things. For example, Disable-PnpFeature does not have a Url Parameter but will run the cmd on the site you are connected to.