Skip to main content

Posts

Showing posts from 2012

Enable PowerShell commandlets for SharePoint 2013 in PowerShell ISE

Open the PowerShell ISE and create a profile by running the following code: if (!(test-path $profile.AllUsersAllHosts)) { new-item -type file -path $profile.AllUsersAllHosts-force } Open the newly created profile with the following command: psEdit $profile.AllUsersAllHosts The profile will be open in the PowerShell ISE. Add the following code to the profile: (If the profile for some reason doesn't open then you can get it here: C:\Windows\System32\WindowsPowerShell\v1.0\profile.ps1) if ((Get-PSSnapIn -Name Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue) -eq $null ) { Add-PSSnapIn -Name Microsoft.SharePoint.PowerShell } Save the profile. Next time you open the PowerShell ISE you will have all the Microsoft.SharePoint.PowerShell commandlets.

Presence icon missing in Site Users webpart

Problem The presence icon is missing in the Site Users webpart. Solution Verify that Microsoft Office is installed on the client computer. Verify that Additional actions and Online Status for members is enabled in the General Settings for the Web Application. Verify that the SIP Address in the SharePoint user information has a value.

Determine service pack version in SharePoint 2010

If you want to get Farm information e.g. configuration database version, configuration database server, SharePoint products installed go to Central Administration > System Settings > Manage servers in your farm (/_admin/FarmServers.aspx). If you want to view the patch status for products installed on servers in the farm, go to Central Administration > Upgrade and Migration > Check Product and patch installation status (/_admin/PatchStatus.aspx). If you want to view the upgrade status for databases in the farm, go to Central Administration > Upgrade and Migration > Review database status (/_admin/DatabaseStatus.aspx).

The form cannot be submitted because of an error

Problem I created a reusable approval workflow in SharePoint Designer 2010. I initiated the workflow. Then when I filled in the Assigned To field I got an error pop up saying: "The form cannot be submitted because of an error". Solution Uninstall the KB2553322 for SharePoint Designer. I didn't uninstall KB2553322 for Microsoft Office. Restart SharePoint Designer. Recreate the workflow.

Hide-SPView

This cmdlet sets a view to hidden. Parameters: SiteCollection url. Edit $listUrl and $viewUrl to your own values. param([string]$url) param([string]$url) [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") function Get-SPSite([string]$url) { New-Object Microsoft.SharePoint.SPSite($url) } function Hide([string]$url) { $SPSite = Get-SPSite $url $listUrl = "/Lists/Tasks"; $viewUrl = "Lists/Tasks/byowner.aspx"; foreach($oWeb in $SPSite.AllWebs) { Write-Host "############ ###################"; Write-Host "Web: " $oWeb.Url; [Microsoft.SharePoint.SPList]$list = $null; [Microsoft.SharePoint.SPView]$spView = $null; try { $list = $oWeb.GetList("$($oWeb.Url)$($listUrl)"); } catch [Exception] { Write-Host "The list does not exist" -foreground red; $oWeb.Dispose(); c...

Access denied when editing the content source

The problem You get access denied when you try to edit the content source in Microsoft SharePoint 2007. I ran into this error after I changed the "Farm Search Service Account". Application error when access /_layouts/searchsspsettings.aspx Error=Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) The cause could be WSS_WPG group account does not have the correct permissions to the %windir%\Tasks folder on the computer that is running the indexing service. Fix the problem Add the WSS_WPG group to the Tasks folder. Log on to the servver that is running the indexing service with an account that has administrative permissions. Do the following step (2) if you don't have the security tab in the properties section of the %windir%\tasks folder: At the command prompt, run: attrib –s %windir%\tasks Note: If Windows Explorer is open when you make this change, you will not see the extra tab in Windows Explorer. If Windows Explorer is already open, ...

Problem installing service pack 1 for SharePoint Foundation 2010

I have a SharePoint farm with one application server, two WFE servers and one db server. When I ran the configuration wizard after I installed service pack 1 on the application server and the WFE servers I got an error that said that the service pack was missing on the WFE servers. Solution: Open your powershell editor and execute the following command on the WFE servers. Get-SPProduct –local Then run the configuration wizard again.

Adding Site Administrators to a Site Collection

If you want to add a SiteAdministrator to a SiteCollection you can't add the user to the SPUserCollection SPWeb.SiteAdministrators . SPWeb.SiteAdministrators.Add() SPUserCollection SPWeb.SiteAdministrators is of type SPUserCollectionType.UCT_SiteAdmins (6), which appears that SharePoint is not taking care of. If it's a bug, i don't know. Instead you have to set the property IsSiteAdmin of the SPUser to True; SPWeb web = SPContext.Current.Web; SPUser user = web.AllUsers["loginName"]; user.IsSiteAdmin = true; user.Update();