Skip to main content

Posts

Showing posts from April, 2014

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.

Users do not show up in SharePoint People Search or People Picker

I had this issue with people picker in a classic mode web application in SharePoint 2013 and this site is in 2010 mode - users in certain sub-domains would not show up in People Picker. I was aware of stsadm commands to fix this and we ran the stsadm command to hook up people picker with another domain some time back. The latest issue was that people picker was not returning users from the root domain and few sub domains. After researching on the internet I found (contrary to my thoughts) that we could use PowerShell and not just stsadm to map People Picker to domains. It is a good idea to first check what domains are added/mapped to the web application using the following commands: $wa = Get-SPWebApplication -Identity http://mywebapp.com #List the Domains $wa.PeoplePickerSettings.SearchActiveDirectoryDomains This will list the domains currently People Picker is looking up for that web application. I used the following script to map our AD forest to People Picker: