kwizcom banner advertisement

SharePoint Online: Site Collections Storage Size - Quota Usage Report using PowerShell

April 30, 2017    , , , ,
Requirement: Need to generate a report to analyze all SharePoint Online Site collection storage consumption.   How to get the Storage Metrics of a SharePoint Online Site Collection? To find the storage details of a site collection, Go to: Click on Settings gear and then select Site Settings. In the "Site Settings" page, under "Site Collection Administration", click on Storage Metrics. This page gives SharePoint Online site collection storage details along with the breakdown of data usage. Get Storage Info for a Single Site Collection using PowerShell: Lets use PowerShell script to get the storage size allocated, used and warning level of a given site collection. #Config Parameters $AdminSiteURL="https://crescent-admin.sharepoint.com" $SiteURL="https://crescent.sharepoint.com/sites/Ops" #Get Credentials to connect to SharePoint Admin Center $Cred = Get-Credential #Connect to SharePoint Online Admin Center Connect-SPOService -Url
SharePoint Online: Site Collections Storage Size - Quota Usage Report using PowerShell SharePoint Online: Site Collections Storage Size - Quota Usage Report using PowerShell Reviewed by Salaudeen Rajack on April 30, 2017 Rating: 5

How to Delete OneDrive for Business Site Collection in SharePoint Online?

April 30, 2017    , , , ,
Requirement: Delete OneDrive for Business Site Collection! After a business decision made to disable OneDrive in organization wide, We configured the settings to disable OneDrive. However,  All existing OneDrive sites were active, users can access them and we wanted to remove them all! Any SharePoint My Site or OneDrive for business site gets deleted in 30 days (retention period) from user account deleted from AD or when license is deactivated for the user in Office 365. How to Delete OneDrive for Business Site Collection in SharePoint Online? Deleting OneDrive for Business site collection is as same as deleting any SharePoint sites, But there is no way to delete it using browser UI. So, you can utilize Remove-SPOSite cmdlet to delete any OneDrive for Business (My Site) site collection. PowerShell to Delete a OneDrive for Business Site Collection Use this PowerShell script on SharePoint Online Management Shell to remove a particular OneDrive site collection. Make sure you log
How to Delete OneDrive for Business Site Collection in SharePoint Online? How to Delete OneDrive for Business Site Collection in SharePoint Online? Reviewed by Salaudeen Rajack on April 30, 2017 Rating: 5

How to Set Secondary Admin for All OneDrive for Business Sites?

April 30, 2017    , , , ,
When SharePoint My Site or OneDrive for business site collection are created by the user, SharePoint assigns primary site collection administrator rights to the user. At times, you may have to gain Admin access in situations such as User left the organization, troubleshooting, etc. In SharePoint on-premises environments, we've "User Policy" option for web applications which provides Admin rights to the whole web application. In SharePoint Online we don't have user policies but fortunately, we have the option to set secondary admin for all My sites to avoid adding them in every single site collection. While its possible to add additional site collection administrators to SharePoint Online My Sites, Here is how you can specify the default secondary site owner for all OneDrive for Business sites in SharePoint Online. Login to your SharePoint Online Admin Center  Click on User Profiles from left navigation Click on My Site Settings >> Setup My Sites >&
How to Set Secondary Admin for All OneDrive for Business Sites? How to Set Secondary Admin for All OneDrive for Business Sites? Reviewed by Salaudeen Rajack on April 30, 2017 Rating: 5

There was a problem deleting Web site "Site-URL". Sites that have subsites or certain apps can't be deleted. Please try again after deleting all subsites and removing the apps.

April 29, 2017    , , ,
Problem: If you try to delete a SharePoint Online site which has subsites in it, SharePoint throws error message saying " There was a problem deleting Web site "<subsite-url>". Sites that have subsites or certain apps can't be deleted. Please try again after deleting all subsites and removing the apps. " Solution: So, basically SharePoint Online tells us: You have to delete all subsites first, in order to delete its parent site. Deleting a subsite is a matter of few clicks: Go to Site Settings >> Click on "Delete this site" link under site actions group. Confirm the prompt once. However, the problem is: When you have larger number of subsites (say: 50!) its cumbersome and time consuming process to delete each and every subsite using browser interface. So, the solution is PowerShell! PowerShell to delete a subsite in SharePoint Online: #Load SharePoint CSOM Assemblies Add-Type -Path "C:\Program Files\Common Files\Mic
There was a problem deleting Web site "Site-URL". Sites that have subsites or certain apps can't be deleted. Please try again after deleting all subsites and removing the apps. There was a problem deleting Web site "Site-URL". Sites that have subsites or certain apps can't be deleted. Please try again after deleting all subsites and removing the apps. Reviewed by Salaudeen Rajack on April 29, 2017 Rating: 5

How to Gain Owner Access to OneDrive for Business Sites in Office 365?

April 29, 2017    , , , ,
By default, When SharePoint My Site or OneDrive site collection is created by the user, SharePoint assigns primary site collection administrator rights to the user. In some cases you might need to gain Admin access to a OneDrive for Business site of a user. E.g. User left the company and manager of the user wants to gain access, Backup purposes, compliance, security, etc. How to get admin access to the OneDrive for Business site in Office 365? To gain access to a user's OneDrive site, follow these steps: Login to SharePoint Online Admin Center Click on "User Profiles" link from left navigation >> Click on "Manage User Profiles" link under "People" group Search and pick the user profile which you want to gain access. From the search result, Click on the menu item "Manage site collection owners" from the context menu. Add any additional administrators to the site collection in "Site Collection Administrators" field.
How to Gain Owner Access to OneDrive for Business Sites in Office 365? How to Gain Owner Access to OneDrive for Business Sites in Office 365? Reviewed by Salaudeen Rajack on April 29, 2017 Rating: 5

SharePoint Online: Check if Feature is Activated using PowerShell

April 29, 2017    , , ,
Requirement: PowerShell to check if feature is activated in SharePoint Online. How to Check if a specific Feature is Enabled in SharePoint?; To check the current status of a SharePoint feature, Say: Publishing Feature - follow these steps: Navigate to Site Settings >> Click on "Site Collection Features" link under "Site collection administration (If its a site level feature, use: "Manage Site Features" link under "Site Actions" group!) Check the button next to your feature. If the button shows just "Activate" then the feature is not activated. If the button shows "Deactivate" and the "Active"highlighted then the feature is already activated. SharePoint Online: PowerShell to Check if Feature is Activated Prior to enabling or disabling a feature in SharePoint Online, we can check the current status of the feature in PowerShell with this script. Lets take an example of "Publishing Feature" and che
SharePoint Online: Check if Feature is Activated using PowerShell SharePoint Online: Check if Feature is Activated using PowerShell Reviewed by Salaudeen Rajack on April 29, 2017 Rating: 5

SharePoint Online: Update List Title, Description, Quick Launch Navigation Properties using PowerShell

April 26, 2017    , ,
Requirement: Set Title, Description and Quick Launch Navigation settings in a SharePoint Online List. How to Update List Title, Description and Quick Launch Navigation Settings in SharePoint Online? To set list title, description and quick launch navigation options in SharePoint Online, follow these steps: Navigate to your target list or library. Click on Settings Icon and then "Library Settings" (In Classic SharePoint, Under "List" tab, Click on "List Settings" button in the ribbon) In the List or Library settings page, Click on "List name, description and navigation" link under General Settings. General Settings page, You can update the Title of the list, Description for the list and the option to show or hide list in Quick launch navigation. Click on "Save" to commit your changes. PowerShell to Set List Title, Description and Quick Launch Navigation Settings: Here is the PowerShell script to update list settings. #
SharePoint Online: Update List Title, Description, Quick Launch Navigation Properties using PowerShell SharePoint Online: Update List Title, Description, Quick Launch Navigation Properties using PowerShell Reviewed by Salaudeen Rajack on April 26, 2017 Rating: 5

SharePoint Online: PowerShell to Iterate Through All Files in a Document Library

April 24, 2017    ,
SharePoint Online PowerShell to Iterate through All Files in a Document Library: Often in PowerShell scripting, we may have to loop through each file in a SharePoint Online libraries. This PowerShell script iterates through each folder of the library and lists all files. #Load SharePoint CSOM Assemblies Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll" Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll" #Function to get all files of a folder Function Get-FilesFromFolder([Microsoft.SharePoint.Client.Folder]$Folder) { Write-host -f Yellow "Processing Folder:"$Folder.ServerRelativeUrl #Get All Files of the Folder $Ctx.load($Folder.files) $Ctx.ExecuteQuery() #list all files in Folder ForEach ($File in $Folder.files) { #Get the File Name or do something
SharePoint Online: PowerShell to Iterate Through All Files in a Document Library SharePoint Online: PowerShell to Iterate Through All Files in a Document Library Reviewed by Salaudeen Rajack on April 24, 2017 Rating: 5

Enable Blank Site Template in SharePoint 2016

April 22, 2017    , , , ,
Problem: Blank site template is not available in SharePoint 2013 and SharePoint 2016. If you try to create a site collection from SharePoint Central Administration site or try to create a subsite, you'll find blank site template missing from the create site collection page. Unlike its previous versions, SharePoint 2013 on wards certain site templates are hidden from the user interface.  So, How to create a blank site collection in SharePoint 2016? PowerShell to Create a site collection using blank site template We can create a site collection using blank site template with PowerShell. Blank site template id in SharePoint 2016 or SharePoint 2013 is: STS#1 Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue #Define Parameters $Template = Get-SPWebTemplate "STS#1" $SiteURL="http://intranet.crescent.com/sites/blank" $SiteOwner="Crescent\SPAdmin" #Create blank site collection New-SPSite -Url $SiteURL -OwnerAlias $SiteOw
Enable Blank Site Template in SharePoint 2016 Enable Blank Site Template in SharePoint 2016 Reviewed by Salaudeen Rajack on April 22, 2017 Rating: 5

Remove SharePoint Web Application Policy using PowerShell

April 20, 2017    , , , , , ,
Requirement: Remove Web Application Policy using PowerShell How to remove a web application Policy in SharePoint? To remove a user or group from SharePoint web application Policy, follow these steps: Login to SharePoint Central Administration Site Application Management >> Manage Web Applications  Select the appropriate web application from the list >> Click on "User Policy" button from the ribbon.  Now, from the "Policy for Web Application" page, Select the user or group to remove and click on "Delete Selected Users" link Confirm the prompt once to remove select accounts from web application Policy. PowerShell to Remove a Web Application Policy in SharePoint: Here is the PowerShell script to delete a web application policy in SharePoint. Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue Function Remove-WebAppPolicy($WebAppURL, $Account) { Try { Write-host "Removing Account '$Acc
Remove SharePoint Web Application Policy using PowerShell Remove SharePoint Web Application Policy using PowerShell Reviewed by Salaudeen Rajack on April 20, 2017 Rating: 5

How to Delete a Host Named Site Collection in SharePoint using PowerShell?

April 20, 2017    , , ,
Requirement: Delete host named site collection using PowerShell in SharePoint. How to Delete host named Site Collection? Generally, Host named site collections in SharePoint are managed through PowerShell. Prior to SharePoint 2013, You cannot delete host named site collections from Central Administration site as the delete button is greyed out on delete site collection page. However, from SharePoint 2013 you can delete either host named site collection or path based site collection from: Central Administration >> Application Management >> Delete Site Collection Select the site collection from the drop down and hit "Delete" button Confirm the prompt once to delete the host named site collection. Delete host named site collection using PowerShell: To delete a Host named site collection using PowerShell, use Remove-SPSite cmdlet in SharePoint Management Shell. Remove-SPSite -Identity "http://Host-Named-Site-Collection-URL" This removes gi
How to Delete a Host Named Site Collection in SharePoint using PowerShell? How to Delete a Host Named Site Collection in SharePoint using PowerShell? Reviewed by Salaudeen Rajack on April 20, 2017 Rating: 5

Style SharePoint 2016 List View Web Part with Custom CSS

April 16, 2017    , , , ,
Requirement: Add a custom style to SharePoint 2016's standard list view web part to make it look like a dashboard! By default, SharePoint list view web part looks dull, isn't it? So, lets add some custom CSS to the SharePoint 2016 list view, to make it look like a dashboard! How to add CSS to listview? Simple, Click on Site Settings gear >> Edit Page Insert web part >> Choose "Script Editor" under "Media and Content" Place the below CSS code in it. Save and close! CSS to Brand SharePoint List view: <style type="text/css"> /* List View Header */ .ms-listviewtable > thead > tr > th { background-color: #5B9BD5; } /* List view Header Text color*/ .ms-vh-div, .ms-headerSortTitleLink { color:white!important; font-weight: bold; } /* background color for alternate rows */ .ms-listviewtable > tbody > tr.ms-alternating { background: #DDEBF7 } </style> Here is the output of the branded List view web p
Style SharePoint 2016 List View Web Part with Custom CSS Style SharePoint 2016 List View Web Part with Custom CSS Reviewed by Salaudeen Rajack on April 16, 2017 Rating: 5

Export-SPWeb: 0x80070057 Error

April 02, 2017    
Problem: When trying to export a List from SharePoint 2016 site, got this error message "Export-SPWeb: <nativehr>0x80070057</nativehr><nativestack></nativestack>" Export-SPWeb http://intranet.crescent.com/ -ItemUrl "Lists/Projects" -path "C:\Projects.cmp" Solution: In the ItemUrl Parameter, You must include a leading slash! E.g. Instead of -ItemUrl "Lists/Projects" You must enter "-ItemUrl "/Lists/Projects" E.g.  Export-SPWeb http://intranet.crescent.com/ -ItemUrl "/Lists/Projects" -path "C:\Projects.cmp"
Export-SPWeb: 0x80070057 Error Export-SPWeb: <nativehr>0x80070057</nativehr><nativestack></nativestack> Error Reviewed by Salaudeen Rajack on April 02, 2017 Rating: 5
Powered by Blogger.