kwizcom banner advertisement

Find and Replace Old Link URLs in Quick Launch, Top Navigation Menus during Migration

January 30, 2013    , , , , ,
Found so many hard-coded links (Absolute links) in SharePoint Quick launch and in Top navigation bar. This PowerShell script, Scans and Replaces the provided Old URL with the New URL all over the SharePoint web Application. PowerShell Script to Find and Replace Quick Launch & Top Navigation Links: Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue #Set Old & New URLs $OldURL = "http://moss2007.crescent.com" $NewURL = "http://sharepoint2010.crescent.com" #Get all sites of the web application $webs = Get-SPWebApplication "http://sharepoint.crescent.com" | Get-SPSite -Limit All | Get-SPWeb -Limit All #Iterate through webs foreach ($web in $webs) { #Get the Quick Launch Bar Nodes $QuickLaunchNodes = $Web.Navigation.QuickLaunch #For Top Navigation use: $Web.Navigation.TopNavigationBar . TOp Nav may or May not have child nodes #Iterate through each Parent nodes of Quick launch foreach ($parentNode in $QuickLaunchNode
Find and Replace Old Link URLs in Quick Launch, Top Navigation Menus during Migration Find and Replace Old Link URLs in Quick Launch, Top Navigation Menus during Migration Reviewed by Salaudeen Rajack on January 30, 2013 Rating: 5

SharePoint Top Navigation Link: Open in New Window

January 28, 2013    , ,
There was a requirement is to add a link in intranet portal's top navigation bar. Provided on clicking the link, it should open in new window, as the site link added was developed in a different platform & environment other than SharePoint. If publishing feature is enabled, we can just go to: Site Actions >> Site Settings >> Navigation (Under Look and Feel), Add a New link with "Open link in new window" check-box selected. That's all, We are done with opening top navigation link in new window! However, In the provided site we don't have publishing feature enabled. So, in site settings page, we saw "Top link bar" link instead of "Navigation". Unfortunately, it doesn't provide us an option to open links in new window. Here is the Trick to Open SharePoint top navigation link in New Window : JavaScript! In URL field, just enter: javascript:void(window.open('http://your-link.aspx','_blank'))  Even javasc
SharePoint Top Navigation Link: Open in New Window SharePoint Top Navigation Link: Open in New Window Reviewed by Salaudeen Rajack on January 28, 2013 Rating: 5

How to Start a SharePoint Workflow using PowerShell?

January 28, 2013    , , , ,
Requirement is: To start a specific Workflow on All documents in a document library. Solution: Lets use PowerShell to Start workflow Programmatically on all Items in a Document Library! After making sure, Manual start is enabled for the workflow: # For MOSS 2007 compatibility [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") #Region MOSS2007-CmdLets Function global:Get-SPSite() { Param( [Parameter(Mandatory=$true)] [string]$SiteCollURL ) if($SiteCollURL -ne '') { return new-Object Microsoft.SharePoint.SPSite($SiteCollURL) } } Function global:Get-SPWeb() { Param( [Parameter(Mandatory=$true)] [string]$SiteURL ) $site = Get-SPSite($SiteURL) if($site -ne $null) { $web=$site.OpenWeb(); } return $web } #EndRegion #Get the Web $web = Get-SPWeb "http://sharepoint.company.com" #Get the List $list=$web.Lists["Review Documents"] #Get Workflow Manager
How to Start a SharePoint Workflow using PowerShell? How to Start a SharePoint Workflow using PowerShell? Reviewed by Salaudeen Rajack on January 28, 2013 Rating: 5

Set Permissions and Restrict Access to SharePoint Views

January 27, 2013    , , , ,
Little background: PMO from Sales domain came with this requirement: They Have a list for capturing project metrics in a project collaboration SharePoint Site with below columns: There are two requirements: When Project Managers logs in, they should get projects in which they are assigned as "Project Managers". When Program Manager logs in, He should get all of the projects. To solve the first requirement, I asked them to set the view filter as: "[Project Manager] is equals to [ME]", simple, uh? For the second requirement, Program Manager should get all projects, nothing comes to my mind other than creating a separate view without filters. But how do we restrict normal users/ project managers from accessing the view for Program Managers? (of course, PMOs can create private views, but they don't wanted to!). So, Lets restrict access and secure view by setting permissions. How to restrict views in SharePoint 2013?  SharePoint doesn't provide an
Set Permissions and Restrict Access to SharePoint Views Set Permissions and Restrict Access to SharePoint Views Reviewed by Salaudeen Rajack on January 27, 2013 Rating: 5

Dynamic Fusion Charts from SharePoint 2010 List Data

January 21, 2013    , ,
I said it before, and I'm saying it again: "Fusion Charts is a great product!" .In my earlier fusion chart implementations, most of the cases, charts are generated with predefined category. In some cases, I've fusion charts generated for SharePoint 2010 with dynamic categories as well. How to use fusion chart in SharePoint 2010? Here is one among them: Had a List for tracking project risks and the requirement is to generate a Pie chart based on Risk count. Here is my "Risk Metrics" List structure. Among bunch of fields, I took only "Project Name" field and calculate its count for my requirement. Steps to Create Dynamic Fusion Charts from SharePoint List Simple! just download the Fusion Chart Free version and upload the SWF files to a SharePoint Document library. Create a Web Part Page, Insert a Empty Data View Web Part, Drag & Drop Relevant fields to the web part (in my case its "Project Name"), Change the XSL accordingly.
Dynamic Fusion Charts from SharePoint 2010 List Data Dynamic Fusion Charts from SharePoint 2010 List Data Reviewed by Salaudeen Rajack on January 21, 2013 Rating: 5

SharePoint Document Versions Size Report with PowerShell

January 20, 2013    , , , , , , , , ,
This is a PowerShell version of my existing post Version History Size Report for SharePoint which uses C# object model to generate versioning report and gives insights, such as: Site/Library's Total versions size Total No. of versions created Which documents are with more versions Type of the documents Library in which the document stored. Library Size with/Without versions When was the last version modified Size of the document's latest version How much storage space being occupied by versions Total size of the document including versions PowerShell Script to generate Document Versions Report: Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue Function Generate-VersionSizeReport() { #Define 'Web Application URL' as Mandatory Parameter Param( [Parameter(Mandatory=$true)] [string]$WebAppURL, [Parameter(Mandatory=$true)] [string] $CSVReport ) #Get the Web Application $WebApp=Get-SPWebApplication($WebAp
SharePoint Document Versions Size Report with PowerShell SharePoint Document Versions Size Report with PowerShell Reviewed by Salaudeen Rajack on January 20, 2013 Rating: 5

My Site, My Profile Links Not Found in SharePoint 2010

January 20, 2013    , , ,
Problem: End-Users were unable to create my site in SharePoint 2010 as the "My Site" link doesn't appear on Welcome Menu! Cause: After making sure User Profile Service Application is properly configured , found UPS is not associated with the particular web application! That's why SharePoint 2010 my site link is missing! Solution: Associate UPS Service Application with the web application. Go to Central Administration >> Application Management >> Manage Web Applications Pick the Relevant Web Application (In my case: user tried creating my site from: http://intranet.crescent.com") Click on "Service Connections" button from the Ribbon Enable the User Profile Service Application to associate it with the particular web application. Done! We've fixed my site link missing issue! Now "My Site" link is visible in SharePoint 2010 welcome menu! This doesn't' solve your issue? No worries, Check out this Troubl
My Site, My Profile Links Not Found in SharePoint 2010 My Site, My Profile Links Not Found in SharePoint 2010 Reviewed by Salaudeen Rajack on January 20, 2013 Rating: 5

How to Change SharePoint List or Library Settings Programmatically with PowerShell?

January 18, 2013    , , , ,
Today there was a requirement to change SharePoint document library draft item security on all document libraries in a sub-site. We used to achieve it by going to Document Library settings >> Versioning Settings >> Change "Draft Item Security" from "Any user who can read items (default setting)" to "Only users who can edit items" as per the requirement. Not bad! but there were 50+ document libraries! OMG!! It kept the developer busy for some time!!! Why don't we script it? sure, Lets change SharePoint List or Library settings programmatically with PowerShell. Change SharePoint List Settings Programmatically with PowerShell Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue #Function to Get a Single List function Get-SPList([string]$URL, [string]$ListName) { $Web = Get-SPWeb $URL $List = $Web.Lists[$ListName] return $List $Web.Dispose() } $WebURL= "http://sharepoint.crescent.com" #Get t
How to Change SharePoint List or Library Settings Programmatically with PowerShell? How to Change SharePoint List or Library Settings Programmatically with PowerShell? Reviewed by Salaudeen Rajack on January 18, 2013 Rating: 5

Audit Specific User Permissions in SharePoint 2007 with PowerShell

January 17, 2013    , , , ,
In continuation with my earlier post: SharePoint Permission Report: Check Access Rights for a Specific User , got few requests to make the PowerShell script compatible with MOSS 2007. Hence, I'm posting the code here. Make sure you are running the script from Farm Admin credentials who has "FULL Control" Policy created on the Web Application! It checks the following areas of SharePoint and generates a Log file as in the below screen: Farm Administrator's Group Central Administration Web Application Policies Site Collection Administrators  Scans the all Site collections and Sub-sites with Unique Permissions Scans all Lists and Libraries with unique permissions Scans all Groups which has permissions on sites and Lists PowerShell Script to Check Access Rights for a Particular user all over SharePoint: [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") #Get All Web Applications Function global:Get-SPWebApplication($WebApp
Audit Specific User Permissions in SharePoint 2007 with PowerShell Audit Specific User Permissions in SharePoint 2007 with PowerShell Reviewed by Salaudeen Rajack on January 17, 2013 Rating: 5

SharePoint Versioning Manager - Control Versioning Settings & Clean Up Old Versions

January 17, 2013    , , , , ,
We have document libraries with unlimited versioning enabled for years. As part of regular auditing Version History Size Report for Entire SharePoint Web Application , found many documents have more than 100 versions!  In order to free up more database storage space and for better performance, We understand that we'll have to disable or limit versions. Although, versions are very useful to track changes, each of the versions is a copy of the document and takes up a disk space (Till SharePoint 2010, BTW). As per Microsoft design changing versioning limits will not delete existing minor/major versions of the file until we update it. Its a best practice to limit versions. You can Navigate to Document Library Settings >> Version Settings >> and set versioning limits, set versioning ON/OFF in SharePoint versioning settings page. But this will not have any effect on existing documents until you make edits on the document and update. (You can Check-out and check-in them
SharePoint Versioning Manager - Control Versioning Settings & Clean Up Old Versions SharePoint Versioning Manager - Control Versioning Settings & Clean Up Old Versions Reviewed by Salaudeen Rajack on January 17, 2013 Rating: 5

MOSS 2007 List Toolbar in SharePoint 2010

January 17, 2013    , , ,
After migrating from MOSS 2007 to SharePoint 2010, some users still face difficulty with SharePoint 2010 interface, especially ribbon. What they are asking for is: List toolbar is missing! We need MOSS 2007 style list view toolbar!! As SharePoint 2010 list toolbar integrated with ribbon, SharePoint doesn't show list toolbar separately, by default. However, we can just tweak this settings to show SharePoint 2010 list view toolbar as in SharePoint 2007. Here is how: Go to Site Actions >> Edit Page >> Modify List View Web Part Set list view toolbar type  from "Full Toolbar" to "Show Toolbar" That's all. See the toolbar appears on list!
MOSS 2007 List Toolbar in SharePoint 2010 MOSS 2007 List Toolbar in SharePoint 2010 Reviewed by Salaudeen Rajack on January 17, 2013 Rating: 5

User's Account Name Changed in Active Directory. How to Sync it in SharePoint?

January 14, 2013    , , ,
We had a user account in Active Directory: EU\su s anapi . Later there was a change in User name. It become: EU\su z anapi . But even after several user profile imports, the old user name: EU\susanapi was still showing up in SharePoint, and SharePoint treated the new user account as a separate account. What is the Fix? Unfortunately, Sharepoint doesn't understand this change automatically. We need to make it understand by giving instruction via STSADM command. When user's Account Name (or Login Name: Domain\User) renamed in Active Directory, you have to use stsadm -o migrateuser command to associate the new AD account with an existing SharePoint profile. stsadm -o migrateuser -oldlogin EU\susanapi -newlogin EU\suzanapi -ignoresidhistory PowerShell cmdlet to migrate user: Move-SPUser –Identity "DOMAIN\OldUserName" –NewAlias "Domain\NewUserName" Before the Fix: After the Fix: I had to do the same thing When users left the company, their
User's Account Name Changed in Active Directory. How to Sync it in SharePoint? User's Account Name Changed in Active Directory. How to Sync it in SharePoint? Reviewed by Salaudeen Rajack on January 14, 2013 Rating: 5

Get SharePoint Library Size with PowerShell

January 14, 2013    , , , ,
SharePoint 2010 document library sizes can be easily retrieved via Storage metrics: Site Actions >> Site Settings >> Storage Metrics if you have SP1 installed. You can get SharePoint library size, ONLY when you have Quotas applied to the site collection. otherwise, you get "The storage space allocation page cannot be used for sites that do not have a storage quota defined." error message in MOSS 2007. How to find a particular document library's size in SharePoint programmatically? Lets see the PowerShell approaches to find SharePoint 2007/SharePoint 2010 document library size, picture library size or for any other libraries. Approach 1: Using StorageManagementInformation API: It retrieves storage management information about the site collection. More info on StorageManagementInformation , It takes these parameters: 1. ltVar: Which object         List = 1         DocumentLibrary = 2         Document = 3 2. sordVar: sort order      
Get SharePoint Library Size with PowerShell Get SharePoint Library Size with PowerShell Reviewed by Salaudeen Rajack on January 14, 2013 Rating: 5

Customized Master Pages Report for All SharePoint Sites

January 09, 2013    , , ,
Today, wanted to audit customized Master pages which are deviating from our corporate Branding in my Team Sites environment. Generated the report for customized master pages with help of PowerShell. Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue #Get all site collections of provided web app $SiteCollections = Get-SPWebApplication "http://sharepoint.crescent.com" | Get-SPSite -Limit All #Loop through all site collections foreach($Site in $SiteCollections) { #Loop throuh all Sub Sites foreach($Web in $Site.AllWebs) { #Get the Master Page $MasterPage = $Web.GetFile($Web.URL+"/"+$Web.MasterUrl) #Check the Customization Status if($MasterPage.CustomizedPageStatus -eq "Customized") { $MasterPage.Name +" : " +$Web.Url } } } If you want to use it in MOSS 2007, use these two lines of cod
Customized Master Pages Report for All SharePoint Sites Customized Master Pages Report for All SharePoint Sites Reviewed by Salaudeen Rajack on January 09, 2013 Rating: 5

SharePoint 2010 Permission Report: Check Access Rights for a Specific User

January 08, 2013    , , , ,
Update: This script has been updated to scan Folders and List Items with Claims support at: SharePoint User Permission Analysis & Reporting using PowerShell Requirement: To ensure security, generate permissions report on all locations like (sites, lists, etc.) where a specific user has permissions. When people moving from one role to another, Its necessary to audit their permissions on sites and lists where user has access rights. But unfortunately, There is no out of the box ways to find all sites and lists where a particular user has been granted access in SharePoint with out using third party tools. Luckily, We've PowerShell! Lets find all SharePoint sites and lists where a particular user has access rights. PowerShell Script to Check and Generate Report on Access Rights for a Specific User : With this script, you can analyze and track the security effectively check what permissions on an account has been granted on each all places in SharePoint. This PowerShell scr
SharePoint 2010 Permission Report: Check Access Rights for a Specific User SharePoint 2010 Permission Report: Check Access Rights for a Specific User Reviewed by Salaudeen Rajack on January 08, 2013 Rating: 5

Activate button Disabled in SharePoint Sandboxed Solutions

January 07, 2013    , ,
Developers reported an issue in a New SharePoint 2010 Environment: When they try to activate sandboxed solutions "Activate" button is disabled (greyed out)! This is because: By default, sandboxed solutions are disabled in SharePoint. Confirmed, SharePoint 2010 activate sandbox solution disabled. Confirmed user has enough permissions (User needs to be a site collection administrator or with Full Control permission at the root site collection, to deploy and activate sandboxed solution), logged in to the server and found "SharePoint 2010 User Code Host" is disabled from Services console. Solution:  Enable Sandboxed solution by starting " Microsoft SharePoint Foundation Sandboxed Code Service"! Go to Central Administration >> System Settings >> Manage Services on Server, start "Microsoft SharePoint Foundation Sandboxed Code Service". Microsoft SharePoint Foundation Sandboxed Code Service can be stared with PowerShell: Star
Activate button Disabled in SharePoint Sandboxed Solutions Activate button Disabled in SharePoint Sandboxed Solutions Reviewed by Salaudeen Rajack on January 07, 2013 Rating: 5

Change Site Collection Primary, Secondary Administrators in SharePoint

January 07, 2013    , , , , , , ,
Site collection administrators have god like power within a SharePoint site collection, They can add/delete sites, content, users, etc for any site within a site collection. These administrators are responsible for administering their site collection and are recipients of any site status and resourcing Email notifications. How to Change site collection administrator in SharePoint 2010: In SharePoint 2010 or 2013, Primary, Secondary site collection administrators are set from Central Administration >> Application Management >> Change site collection administrators under Site Collection. Apart from these two site collection administrators, you can add additional administrators from: Site Settings >> Users And Permissions >> Site Collection Administrators . How to change site collection administrator in SharePoint 2007 / SharePoint 2010 using STSADM: To change primary site owner, secondary site owner in MOSS 2007, we use stsadm with siteowner switch.
Change Site Collection Primary, Secondary Administrators in SharePoint Change Site Collection Primary, Secondary Administrators in SharePoint Reviewed by Salaudeen Rajack on January 07, 2013 Rating: 5

The terminal server has exceeded the maximum number of allowed connections - Solution

January 04, 2013    ,
When trying to take a Remote desktop on Windows Servers, got the error message "The terminal server has exceeded the maximum number of allowed connections". Root Cause:  This is because, Windows 2003 Server supports only two active RDP connections. When you try as third, you may experience this issue. Ideally, user must "Log Off" to end-up the session rather disconnect. Just closing the remote desktop window disconnects the user but it keeps the session active. Next time when user tries to login,  he gets the error message. Solution: Alright, what is the workaround to by pass this error and login to Windows Server 2003 or Windows Server 2008? Go to command line, or Run dialog box. If you are running remote desktop from Windows Server 2003 or Windows XP, enter: MSTSC /v: <MachineName or IP> /f -console E.g. MSTSC /v:SPSrv01 /f -console For Windows 2008/Windows 7, use: mstsc /v:SPSrv01 /f /admin Now, you should be able to login to the server and l
The terminal server has exceeded the maximum number of allowed connections - Solution The terminal server has exceeded the maximum number of allowed connections - Solution Reviewed by Salaudeen Rajack on January 04, 2013 Rating: 5

Import User Pictures from Active Directory to SharePoint 2010 My Site

January 03, 2013    , , , , , ,
My Organization decided to use Active Directory as a central repository for user profile photos to share with Lync 2010, Outlook and of course SharePoint! Lets keep other products aside and talk about How to Import User Pictures from Active Directory to SharePoint 2010 My Site. Here is the default My site Profile page without Profile photo imported from AD: Well, this article addresses import user pictures from active directory to SharePoint 2010 step by step: Import user photo into Active Directory user profile's "thumbnailPhoto" attribute. Configure Property mapping between SharePoint and Active Directory and Run FULL Profile Import. Run Update-SPProfilePhotoStore cmdlet to generate thumbnails for SharePoint user profile picture. Assuming UPS is in place, My Site is up and running, SharePoint 2010 SP1 is installed (or October 2010 Cumulative Update ), Lets get into details. Step 1: Import user photo into Active Directory user profile's "thumbnail
Import User Pictures from Active Directory to SharePoint 2010 My Site Import User Pictures from Active Directory to SharePoint 2010 My Site Reviewed by Salaudeen Rajack on January 03, 2013 Rating: 5
Powered by Blogger.