powershell
849 TopicsImporting JSON as a list in SharePoint Online via pnp
I'm trying to import a JSON list file to my Sharepoint online website. But it seems impossible to import it directly. Does anyone know a possibility via pnp because I saw a method on pnp named "fromJson" but I don't know how to use it to import my files to my SharePoint website. Thanks in advance!17Views0likes0CommentsAutomatic Version History in SharePoint Online
Hi, I want to turn on Automatic Version History to reduce storage. Has anyone implemented this on existing Large Libraries? What I want to know is, does it use the current meta data and delete versions straight away and free up space quickly? Or will it only start analysing from when you change the setting and i'll have to wait a longer time to reduce versions? Many thanks! Chris103Views0likes2CommentsMap Views in SharePoint online
Hi team my first post here... Can someone point me in the direction of the steps to follow to setup SharePoint online so that map views on custom lists display all the locations of list items in a view as pins on a map? There is info on-line showing how to set up Bing maps but they are deprecated with Azure replacing them - I think. So - again, I think - I need to configure map views in my sharepoint on-line site to work with Azure. It looks as though the 'Location' column type is not available in out-of-the-box custom list maintenance in SharePoint on-line. I managed to create a Location type column in my custom list with 'add column' on the right most side of a view - but the longitude and latitude aren't populated when i select the address for each item. Might that be fixed once map integration is in place? My end goal is to display the location of each custom list item on a map. If Azure maps aren't the best way to achieve this then what should I use? Any help much appreciated.179Views0likes3CommentsVersion History Reporting
Hey. We are very close to the SharePoint Storage Limit! After some research, I think the main issue is the amount of version history we are keeping. So I am coming up with a strategy to reduce this. Probably turning on the Automatic Versioning. What I would like to do is find a way (Probably with PowerShell) to get a report on each site. For each site, How much is the total storage and how much of that is just version history. Does anyone have any idea of how to achieve this? Thanks! Chris21Views0likes1CommentPowerShell Script to apply the retention Label in a full Site Collection
This script could help you to apply a Label in an entire Site Collection (All document libraries into all subsites). It's using an old command for "Set-PnPLabel" (I was not able to apply it with the last version of this "command"). You will need to have the PnP.PowerShell module version "1.12.0", this is why the start of the script is related to this component installation, you can remove it once your action is applied as expected. # ----------------------------------------------------------------------------------- #COMPONENT INSTALLATION #Get-InstalledModule -Name PnP.PowerShell #Find-Module -Name PnP.PowerShell -RequiredVersion 1.12.0 #Install-Module -Name PnP.PowerShell -RequiredVersion 1.12.0 -Force #Get-InstalledModule -Name PnP.PowerShell # ----------------------------------------------------------------------------------- [string]$SiteCollectionRelativeURL = "MySiteCollection" [string]$LabeltoApply = "Auto-delete 15 years" [string]$TeamSiteToUpdate = "https://MySPTenant.sharepoint.com/sites/$SiteCollectionRelativeURL/" [string]$ListName = "" # ----------------------------------------------------------------------------------- Import-Module PnP.PowerShell -DisableNameChecking Connect-PnPOnline -Url $TeamSiteToUpdate -UseWebLogin # ----------------------------------------------------------------------------------- #Get-PnPLabel $AllDocLibraries = Get-PnPList | Where-Object {$_.Hidden -eq $false} if ($AllDocLibraries.Count -gt 0) { foreach ($myDocLib in $AllDocLibraries) { $ListName = $myDocLib.Title $MyList = Get-PnPList -Identity $ListName $CurrentLabel = Get-PnPLabel -List $ListName -ValuesOnly if ($CurrentLabel.TagName -ne $LabeltoApply) { Write-Host " >>>> LABEL ", $LabeltoApply , "- NEED TO BE APPLIED on DocLib", $ListName -ForegroundColor Red Set-PnPLabel -List $ListName -Label $LabeltoApply -SyncToItems $false } else { Write-Host " >>>> LABEL ", $LabeltoApply , "- Yet Applied on DocLib", $ListName -ForegroundColor Green } #Get-PnPLabel -List $ListName -ValuesOnly } } $AllSubWebs = Get-PnPSubWeb -Recurse if($AllSubWebs.count -gt 0) { foreach ($mysubweb in $AllSubWebs) { Write-Host $mysubweb.Url -ForegroundColor Yellow Connect-PnPOnline -Url $mysubweb.Url -UseWebLogin $AllDocLibraries = Get-PnPList | Where-Object {$_.Hidden -eq $false} if ($AllDocLibraries.Count -gt 0) { foreach ($myDocLib in $AllDocLibraries) { $ListName = $myDocLib.Title $MyList = Get-PnPList -Identity $ListName $CurrentLabel = Get-PnPLabel -List $ListName -ValuesOnly if ($CurrentLabel.TagName -ne $LabeltoApply) { Write-Host " >>>> LABEL ", $LabeltoApply , "- NEED TO BE APPLIED on DocLib", $ListName -ForegroundColor Red Set-PnPLabel -List $ListName -Label $LabeltoApply -SyncToItems $false } else { Write-Host " >>>> LABEL ", $LabeltoApply , "- Yet Applied on DocLib", $ListName -ForegroundColor Green } } } } } This script was used to prevent the automatic cleanup implemented in the full tenant to documents older than 10 years. I used it to apply this on site collections containing more than 200 subsites and 10 doc lib mini per subsites. You can use it and adapt it as you need for your specific context. Fab93Views0likes0CommentsAdding columns to SharePoint Admin Center - Active Sites
Hey, My org wants me to find a solution for managing ownership of sites. Ideally we need to know a single owner of a site and which department they belong to. I know I can look at the site owners group and I can create and link to hub sites. This is not an ideal solution. So, I am looking at other possibilities. It would be really useful if we could add extra columns to the Active sites in SharePoint Admin Center. Does anyone know if this is possible or if anyone has any other solutions, without having to keep an excel spreadsheet of all sites? Thanks, in advance!58Views1like3CommentsI'd like to set an automatic redirect of a URL for SharePoint to direct it to a new page.
I'd like to set an automatic redirect of a URL for SharePoint to direct it to a new page. Anyone who clicks this link: https://test.sharepoint.com/SitePages/TestValues.aspx To get automatically redirected to this link: https://test.sharepoint.com/sites/testingtest/SitePages/Home.aspx How to do this.231Views0likes1Comment