Skip to main content

Posts

Showing posts with the label powershell

SharePoint Online - Export Term Store data

We had a requirement to export Terms from a particular Term Store Group in our SPO tenant but I couldn't find a script that goes in to Level 2 and Level 3 Terms or if there is one out there I couldn't find it. I checked many forums and blogs and thanks to all those contributors who inspired me to come up with this script. This isn't perfect by any means and I would like to improve and clean this up a bit but I'm sharing this here so its documented where I can fix this later and also probably help someone. The script will export the data in hierarchical form in a .csv file.   # Tenant url $url="<enter your SharePoint admin url>" # Term Group names as an array $groups = @("")  # location of CSV file $FilePath="Terms.csv"  # Variable to collect all data and export to CSV $results = New-Object System.Collections.ArrayList # Function to iterate through Term store function Get-TermsAsCSV {           try       {  ...

SharePoint & Powershell

This is an attempt to capture the things I learned about working with SharePoint using Powershell so I can refer back to it. 1. I was trying to get a list of all service application proxies with in the default proxy group and no matter how I tried output was truncated. Here is the command I used: Get-SPServiceApplicationProxyGroup | Format-Table -Property Defaultproxies  -Wrap -AutoSize | Out-String -Width 4096 Format-Table with parameters didn't seem to work in this case. It seems there is a property in PowerShell that has to be set for this output to display all items and here is how we can set it: PS C:\Windows\system32> $FormatEnumerationLimit = 25 I had to set this value to 25 to get a proper formatted output.

SharePoint 2010 Central Admin database GUID

I got some inspiration reading the Technet article Deploy by using DBA-created databases (SharePoint Server 2010) the other day. We can deploy SharePoint 2010 without the central administration (CA) database having the annoying GUID. If we run the SharePoint configuration Wizard after installation it will create content database with GUID. However, if we create CA content database using PowerShell we can have the database name of our choice. I have also referred to the SPModule PowerShell Scripts available from Microsoft. Here are the steps: 1. Run Setup on each server computer in the farm. You must run Setup on at least one of these computers by using the Complete installation option. 2. Do not run the SharePoint Products Configuration Wizard after Setup finishes. From the SharePoint 2010 Management Shell, use the New-SPConfigurationDatabase command to create a new configuration database,,for example: New-SPConfigurationDatabase -DatabaseName "SharePoint_Config" -Database...