tag:blogger.com,1999:blog-32363639111187003442024-03-14T02:25:48.353+11:00Fun with SharePointIsha Jainhttp://www.blogger.com/profile/10869794228243405007noreply@blogger.comBlogger31125tag:blogger.com,1999:blog-3236363911118700344.post-39918729125807519652014-06-20T17:09:00.000+10:002014-06-20T17:09:20.416+10:00Set the refinable property to true for Managed Metadata Property in Search Service Application and do full crawl using PowerShell<div dir="ltr" style="text-align: left;" trbidi="on">
Hi Again,<br />
<br />
I came up with a requirement where I want to show the custom managed metadata property in the search refinement web part in the search results page.<br />
<br />
By default the refinable property of any managed property is non set as false/not active. In order to show a property in the search refinement web part , it has to be active/true.<br />
<br />
Below is the PowerShell script I wrote to update the custom managed metadata refinable property and then I did the full crawl.<br />
<br />
<script src="https://gist.github.com/ishajain/61c0b3b3a2190526f923.js"></script>
<br />
Hope this is helpful.
<br />
Cheers,
<br />
Isha Jain
</div>
Isha Jainhttp://www.blogger.com/profile/10869794228243405007noreply@blogger.com5tag:blogger.com,1999:blog-3236363911118700344.post-26260985014339947242014-05-28T17:29:00.000+10:002014-05-28T17:29:44.705+10:00SharePoint 2013 Exception from HRESULT : 0x80131904<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
Hi All,<br />
<br />
<div>
I am recently involved in big migration project from SharePoint 2010 to SharePoint 2013. During this journey I come across a very weird exception - Exception from HRESULT : 0x80131904.</div>
<div>
One of the site collections in the migrated web application is giving me this issue for all the users except site collection administrator. When any user other than site collection administrator tries to either change master page or page layouts under look and feel section in the site settings page. The user is getting the below error.</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhw4ZpQNagfFL3cIoUAb6-wawBwDw-fFMnPOREUc4xhCGQasCeZeapYkVLLqsNVh1sMylQoUASxZYrGLmdQw145QIrymCn3RxgCAwtavtlH2mffxJg2uUaB1i9XQ5NFoD44JaioqrH1WU0/s1600/Capture.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhw4ZpQNagfFL3cIoUAb6-wawBwDw-fFMnPOREUc4xhCGQasCeZeapYkVLLqsNVh1sMylQoUASxZYrGLmdQw145QIrymCn3RxgCAwtavtlH2mffxJg2uUaB1i9XQ5NFoD44JaioqrH1WU0/s1600/Capture.JPG" height="219" width="640" /></a></div>
<br />
<br />
I have checked the permissions for the below lists and it all inherits from parent.<br />
<ul style="text-align: left;">
<li>Master Page Gallery</li>
<li>Device Channel</li>
</ul>
Then I thought is it something related to windows to claims conversion , as I am getting the below error when I ran Test-SPContentDatabase.<br />
<br />
<i>
"The web application is configured with claims authentication mode however the content database you are trying to attach is intended to be used against a windows classic authentication mode."</i><br />
<br />
then I ran the below script to convert users from Windows to Claims to my content database, but still no luck.<br />
<br />
Windows to Claims Conversion:<br />
<br />
<script src="https://gist.github.com/ishajain/3a35924d7b87f2ffd060.js"></script>
<br />
I have also tried deleting the master page gallery and importing from other working site collection but still the same error message.<br />
<br />
ULS logs also giving me very weird errors like below:
<br />
<br />
Invalid column name 'tp_IsCurrent' - from the SQL executed for AllUserData table of the content database. When I read more about this column in the database I found the below description.<br />
<br />
<i><b>tp_IsCurrent: When a file is checked out, tp_IsCurrent is set to false on that file’s record, and a new line is created for the checked-out version of the file (wherein tp_IsCurrent becomes true).</b></i><br />
<br />
I have almost lost my patience as I have spent more than a week to troubleshoot this issue. Then I found a light in the tunnel. I tried moving one of the items "BlankWebPartPage.aspx" from the master page gallery to a blanknew document library and have found that it also copies the below fields and content type in the document library when I copied the file.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdIdqUtD7QDSw8_IMfykbKB-sWCLaWjrohYDIs_YJV1Kh-fJ2mWkA8USZi_CzRLfB35_tD7rCeiLkkO7-C9RB_lSClJ0d3kXo1gFMF-UMM7DgFKR77La7y7WvijknHZxz_P-Q-FQKhSLU/s1600/Fields.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdIdqUtD7QDSw8_IMfykbKB-sWCLaWjrohYDIs_YJV1Kh-fJ2mWkA8USZi_CzRLfB35_tD7rCeiLkkO7-C9RB_lSClJ0d3kXo1gFMF-UMM7DgFKR77La7y7WvijknHZxz_P-Q-FQKhSLU/s1600/Fields.JPG" height="160" width="640" /></a></div>
<br />
<br />
Content Type: Page Layout<br />
<br />
When I click on any of the above lookup fields, I got access denied for all the users except site collection administrators. Then I realised , it is something to do with the access with the above lookup fields.<br />
<br />
Then I found, the nice blog explaining about the cache Profiles<br />
<a href="http://sureshpydi.blogspot.com.au/2013/10/cache-profiles-in-sharepoint.html">http://sureshpydi.blogspot.com.au/2013/10/cache-profiles-in-sharepoint.html</a><br />
<br />
and I found my solution to the problem, it is the Cache Profile list has unique permissions. I then just deleted the unique permissions from my cache profile list and everything started working :).<br />
<br />
<br />
Hope this could save some of your time.<br />
<br />
Cheers,<br />
Isha Jain<br />
<br />
</div>
Isha Jainhttp://www.blogger.com/profile/10869794228243405007noreply@blogger.com1tag:blogger.com,1999:blog-3236363911118700344.post-29683587811963768542014-04-17T09:34:00.000+10:002014-04-17T09:34:19.068+10:00How to call and pass parameter from one PowerShell script file to another?<div dir="ltr" style="text-align: left;" trbidi="on">
I came across a scenario where I have to call another PowerShell script file and pass the current PowerShell script file input parameter to this second file.<br />
<br />
PowerShell as the name says is very powerful and I was able to achieve my requirement with a simple expression called as "Invoke-Expression" in PowerShell.<br />
<br />
Just to explain you how I have achieved my above requirement, I have created two demo PowerShell files called First.ps1 and Second.ps1. I am gonna show you how I have called First.ps1 and invoke the Second.ps1and pass the First.ps1 input parameter to the Second.ps1 with "Invoke-Expression".<br />
<br />
<script src="https://gist.github.com/ishajain/10942147.js"></script>
<br />
<script src="https://gist.github.com/ishajain/10942310.js"></script>
<br />
Hope
this is helpful.<br />
Cheers!!<br />
Isha Jain</div>
Isha Jainhttp://www.blogger.com/profile/10869794228243405007noreply@blogger.com0tag:blogger.com,1999:blog-3236363911118700344.post-74051863068638842832014-03-31T10:44:00.001+11:002014-03-31T10:44:25.173+11:00Upgrade Search Settings and result sources using PowerShell in SharePoint 2013<div dir="ltr" style="text-align: left;" trbidi="on">
I came up with a requirement where I want the user to search the results only from the site collection level. In SharePoint 2010, we all know there are search scopes which help us to narrow down our search based on content sources, web address and metadata. However; there is no search scopes in SharePoint 2013. There is a new concept similar to Search Scope called as Search Result Sources.<br />
<br />
This Result sources can be created at "Application Level", "Site Collection Level" and "Site Level".<br />
<br />
You could find more information on Result Sources in SharePoint 2013 @ <a href="http://technet.microsoft.com/en-us/library/dn186229(v=office.15).aspx">http://technet.microsoft.com/en-us/library/dn186229(v=office.15).aspx</a><br />
<br />
I decided to script out the following<br />
1. Creation of Enterprise Search Centre site<br />
2. Update the search settings to point to this new search centre instead of default OSSSearchResults page.<br />
3. Create a site collection level result source<br />
4. Update the search results webpart properties to query only at above created site collection result source.<br />
<br />
1. Create Enterprise Search Centre via PowerShell<br />
<script src="https://gist.github.com/ishajain/9881724.js"></script>
<br />
Note: you need to activate the "BaseSite" Collection hidden feature before creating the search centre.
<br />
2. Settings the results page for your above search centre<br />
<script src="https://gist.github.com/ishajain/9881830.js"></script>
<br />
3. Create a Site Collection level result source<br />
<script src="https://gist.github.com/ishajain/9881879.js"></script>
<br />
4. Update the search results webpart to use this above result source for query.<br />
<script src="https://gist.github.com/ishajain/9881921.js"></script>
<br />
Hope you like my approach.<br />
enjoy!!
<br />
Isha Jain
</div>
Isha Jainhttp://www.blogger.com/profile/10869794228243405007noreply@blogger.com0tag:blogger.com,1999:blog-3236363911118700344.post-82895767049540970312014-03-31T10:00:00.000+11:002014-03-31T10:00:09.187+11:00Runtime error when creating SharePoint 2013 Pulishing site<div dir="ltr" style="text-align: left;" trbidi="on">
Today, I received a very strange error when creating a sub publishing site in SharePoint 2013. I received the below error runtime error with the famous yellow screen.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZ63w1GQG19rs624a-4HHgt93Luyzbn5flJEav7WjMwT16JRe0Kq9VokyBQB6iWIkfEEXUZ0PJQBaUIGg6Bp1WtPoHcyJ3lwcVnsW2GETsiOOcbQe3ipx4UzKxC5hUpvQUlW5pEw8Vq9M/s1600/runtime+error.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZ63w1GQG19rs624a-4HHgt93Luyzbn5flJEav7WjMwT16JRe0Kq9VokyBQB6iWIkfEEXUZ0PJQBaUIGg6Bp1WtPoHcyJ3lwcVnsW2GETsiOOcbQe3ipx4UzKxC5hUpvQUlW5pEw8Vq9M/s1600/runtime+error.jpg" height="150" width="320" /></a></div>
<br />
<br />
I am surprised to see this error and I have full control to the site and uls logs says access denied to one of the mobile channel list. I wondered what is mobile channel list is, then after much searching I have found that there is a new feature introduced in SharePoint 2013 called device channels.<br />
<br />
With Device channel in SharePoint 2013, you can render a single publishing site in multiple ways by using different designs that target different devices like Mobile, i-Pad etc.<br />
<br />
In order to resolve this error, you need to grant at least read only access to all the users to this device channel list or break the unique permissions to this list. Device channel list is hidden and can be accessible via site settings -> Device Channels <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhk6lhMzMYhnxci0ur6N-R65gYpiz-xxcod8jr_I9xD7LypRYvJ60A-vpoDyJK3NKRnXYEeTw2H5tYdRnG3C3zY4iKTSns8R015XMXSqLbRSO11IPn9WGMR80_3u4hJp5LmNRhqldqTpmk/s1600/DeviceChannels.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhk6lhMzMYhnxci0ur6N-R65gYpiz-xxcod8jr_I9xD7LypRYvJ60A-vpoDyJK3NKRnXYEeTw2H5tYdRnG3C3zY4iKTSns8R015XMXSqLbRSO11IPn9WGMR80_3u4hJp5LmNRhqldqTpmk/s1600/DeviceChannels.png" height="161" width="320" /></a></div>
<br />
<br />
<br />
Thus to solve the above error while creating the sub publishing site, at least provide read only permission to sub site owners at device channel list.<br />
<br />
Hope this must have saved lot of your time.<br />
<br />
Cheers,<br />
Isha Jain<br />
<br />
<br />
<br />
</div>
Isha Jainhttp://www.blogger.com/profile/10869794228243405007noreply@blogger.com0tag:blogger.com,1999:blog-3236363911118700344.post-4081663133883544672013-11-15T11:37:00.003+11:002013-11-15T11:37:28.472+11:00Add Custom Web Parts to a page and Connect them using PowerShell <div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div class="MsoNormal" style="margin: 0cm 0cm 8pt;">
<span style="font-family: Calibri;">These days I am working heavily on SharePoint CSOM and BCS (Business
Connectivity Services). I have created a sandbox package with multiple custom
business data and html form data web parts.<o:p></o:p></span></div>
<br />
<div class="MsoNormal" style="margin: 0cm 0cm 8pt;">
<span style="font-family: Calibri;">The reason why I am writing this blog is to share with you some
of the cool stuffs I did with PowerShell in the project.<o:p></o:p></span></div>
<br />
<div class="MsoNormal" style="margin: 0cm 0cm 8pt;">
<span style="font-family: Calibri;">I have written many automation scripts to create web part page,
add web parts to this page and then connect to them on a single click using
PowerShell.<o:p></o:p></span></div>
<br />
<div class="MsoNormal" style="margin: 0cm 0cm 8pt;">
<span style="font-family: Calibri;">First thing first…<o:p></o:p></span></div>
<br />
<div class="MsoListParagraph" style="margin: 0cm 0cm 8pt 36pt; mso-list: l0 level1 lfo1; text-indent: -18pt;">
<!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">1.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";">
</span></span></span><!--[endif]--><span style="font-family: Calibri;">Create a web part page using PowerShell:<o:p></o:p></span></div>
<br />
<div class="MsoNormal" style="margin: 0cm 0cm 8pt; text-indent: 36pt;">
<span style="font-family: Calibri;"><script src="https://gist.github.com/ishajain/7476301.js"></script><o:p></o:p></span><br /></div>
<br />
<div class="MsoListParagraphCxSpFirst" style="margin: 0cm 0cm 0pt 36pt; mso-list: l0 level1 lfo1; text-indent: -18pt;">
<!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">2.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";">
</span></span></span><!--[endif]--><span style="font-family: Calibri;">Add web part to this page:<o:p></o:p></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 36pt;">
<span style="font-family: Calibri;"><script src="https://gist.github.com/ishajain/7476450.js"></script><o:p></o:p></span><br /></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 36pt; mso-list: l0 level1 lfo1; text-indent: -18pt;">
<!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">3.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";">
</span></span></span><!--[endif]--><span style="font-family: Calibri;">Connect web parts in a page: In this script I
have shown how we can connect <o:p></o:p></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 72pt; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -18pt;">
<!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">a.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";">
</span></span></span><!--[endif]--><span style="font-family: Calibri;">Query String filter Web Part with Business Data List
Web Part<o:p></o:p></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 72pt; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -18pt;">
<!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">b.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";">
</span></span></span><!--[endif]--><span style="font-family: Calibri;">Query String filter Web Part with Business Data Item
Web Part<o:p></o:p></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 72pt; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -18pt;">
<!--[if !supportLists]--><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">c.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";">
</span></span></span><!--[endif]--><span style="font-family: Calibri;">Business data List Web Part with Business Data
Item Builder Web Part<o:p></o:p></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 72pt; mso-add-space: auto;">
<o:p><span style="font-family: Calibri;"> </span></o:p></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 36pt;">
<span style="font-family: Calibri;"><script src="https://gist.github.com/ishajain/7476790.js"></script><o:p></o:p></span><br /></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 36pt;">
<span style="font-family: Calibri;">Have Fun!<o:p></o:p></span></div>
<br />
<div class="MsoListParagraphCxSpLast" style="margin: 0cm 0cm 8pt 36pt;">
<span style="font-family: Calibri;">Isha Jain<o:p></o:p></span></div>
</div>
Isha Jainhttp://www.blogger.com/profile/10869794228243405007noreply@blogger.com4tag:blogger.com,1999:blog-3236363911118700344.post-25958849697356324422013-04-25T21:43:00.001+10:002013-04-25T21:43:36.197+10:00Paste content into SharePoint with no formatting<div dir="ltr" style="text-align: left;" trbidi="on">
Hello Again,<br />
<br />
These days I am working heavily into SharePoint Ribbon customization. If you have not read my previous blog on this, I would recommend you to read <a href="http://meandmysharepoint.blogspot.com.au/2013/03/sharepoint-ribbon-customization.html" target="_blank">Previous Ribbon Blog</a> before reading this one.<br />
<br />
SharePoint 2010 brings the new evolution in user interface and have brought common functionalities into same page by introducing the Ribbon concept.<br />
<br />
In SharePoint user is allowed to copy content from various sources like email, office applications like word, excel and paste into SharePoint.<br />
<br />
By default there are two ways to paste content into SharePoint from ribbon.<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYTNXcyZpi7NXKlmc3PpWu2AuZoY1grN8XhavsXJnBuBDes1nc6dpq5WFNDUg-fNluIgFiUgcWNGV4S90exNWd3Ja2po1TgbXxRddBoK-qwUCPV9UZ6zViw9qB5-ISLvC8LIjWQ1TaNvw/s1600/Paste.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="105" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYTNXcyZpi7NXKlmc3PpWu2AuZoY1grN8XhavsXJnBuBDes1nc6dpq5WFNDUg-fNluIgFiUgcWNGV4S90exNWd3Ja2po1TgbXxRddBoK-qwUCPV9UZ6zViw9qB5-ISLvC8LIjWQ1TaNvw/s640/Paste.png" width="640" /></a><br />
1. Paste (paste content with styles and formatting)<br />
2. Paste palintext (paste content without styles but keeps the formatting)<br />
<br />
<br />
However; pasting the content even as Plain text from word and other sources into SharePoint introduces breaks and other markup issues in Html.<br />
<br />
<strong>Paste </strong> (format:break line and color:Blue)<br />
<span style="color: blue;">Add-PSSnapIn</span> Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue | <span style="color: blue;">out-null</span><span style="color: blue;"><br /></span><span style="color: blue;">Write-Host</span> "Hello All"<br />
<br />
<strong>Paste Plaintext </strong>(only format:break line)<br />
Add-PSSnapIn Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue | out-null<br />
Write-Host "Hello All"<br />
<br />
I wanted to achive something shown below.<br />
<br />
<strong>Paste with no formatting</strong> (no format no color)<br />
Add-PSSnapIn Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue | out-null Write-Host "Hello All"<br />
<br />
<img entertime="1366885925081" fsetresizehandler="1" height="130" id="Picture_x0020_2" originalheight="105" originalwidth="513" showedtooltip="0" src="https://inside.obs.com.au/owa/attachment.ashx?id=RgAAAAAD8zTt0skzQZZDGSWipxqnBwBFyxwiF%2fZrSpc0qb35BqC%2bAAAApxXqAABFyxwiF%2fZrSpc0qb35BqC%2bAAAArmRsAAAJ&attcnt=1&attid0=EAD9YmzYSQ7gSYh4tNeX49SG&attcid0=image003.png%4001CE41E9.BB89D1C0" width="640" /><br />
<br />
I have created a sandbox solution and added element.xml as shown below.
<script src="https://gist.github.com/ishajain/5458891.js"></script>
On click of this flyout anchor menu I have called a javascript function as defined in commandaction attribute in the command handler.
<script src="https://gist.github.com/ishajain/5458932.js"></script>
<br />
<br />
Hope you find this useful.<br />
Cheers,<br />
Isha Jain
</div>
Isha Jainhttp://www.blogger.com/profile/10869794228243405007noreply@blogger.com0tag:blogger.com,1999:blog-3236363911118700344.post-36949729189198149622013-04-05T10:54:00.001+11:002013-04-05T10:54:31.702+11:00How to find a SharePoint field from GUID<div dir="ltr" style="text-align: left;" trbidi="on">
Hello,<br />
<br />
I have been in a scenario where I need to find one of the SPFields from its GUID. Its again PowerShell who saves my time.<br />
<br />
<br />
$site = Get-SPSite -Identity "http://Site"<br />
$web=$site.RootWeb<br />
$field=$web.Fields[[Guid]"E9359D15-261B-48f6-A302-01419A68D4DE"]<br />
<br />
That's it, I am done!!!<br />
<br />
Cheers,<br />
Isha Jain<br />
</div>
Isha Jainhttp://www.blogger.com/profile/10869794228243405007noreply@blogger.com0tag:blogger.com,1999:blog-3236363911118700344.post-8918336154193566592013-03-25T19:47:00.002+11:002013-03-25T19:47:28.169+11:00Find all the sites where the feature is activated<div dir="ltr" style="text-align: left;" trbidi="on">
Hi,<br />
<br />
I have been struggling how to find out the lists of sites where my feature is deployed.<br />
<br />
Below PowerShell command which helped me.<br />
<br />
<script src="https://gist.github.com/anonymous/5235737.js"></script>
<br />
<br />
Instead of using "Write-Host", I have used "Write-Output" which will give output in my output.txt file.<br />
<br />
Note: Write-Host will write the output in the console while Write-Output helps to write the output in some file.<br />
<br />
Hope this is useful.
<br />
Cheers,
<br />
Isha
</div>
Isha Jainhttp://www.blogger.com/profile/10869794228243405007noreply@blogger.com0tag:blogger.com,1999:blog-3236363911118700344.post-89375887696467220192013-03-11T08:48:00.004+11:002013-03-11T08:48:57.468+11:00Fetch Rss feeds into SharePoint List<div dir="ltr" style="text-align: left;" trbidi="on">
I had been into a scenario where I need to search the results from one of the Rss feeds into SharePoint search results page.<br />
<br />
This means the data from this Rss feeds had to be into SharePoint content database and then SharePoint search crawler will crawl the content and made the content search able into the results page. <br />
<br />
So I came up with a design of fetching the data from the Rss feeds into the SharePoint list in an hourly basis and will display the top 10 results into the home page and user can search on this Rss feeds.<br />
<br />
In this design I need<br />
1. Rss Feed link (http://feeds.bbci.co.uk/news/rss.xml)<br />
2. SharePoint Custom list which will store the content from Rss feed.<br />
3.Content Editor web part (CEWP) to display the top 10 results in to the home page.<br />
4.Fetch the latest results into the SharePoint list in every one hour. <br />
<br />
I am using SPServices to add/update the Rss Feeds into SharePoint list. In order to know more on SPServices and how to perform CRUD operations, Please visit my blog on CRUD operations using SPServices.<br />
<br />
Step1: Fetch the Rss Feeds <br />
<br />
At First, Created a Custom List called RSS Feed with the custom columns Content, PublishedDate, FeedLink and Title.<br />
<br />
<script src="https://gist.github.com/ishajain/5127793.js"></script>
So what I am doing here is, Calling Google feed api using jQuery ajax to fetch the Rss feed by passing query parameters, q as Rss Feed url link and num to -1 to fetch all the results back into json object and then iterating each object and storing into SharePoint list.<br />
<br />
Step2:Store the feeds into SharePoint List <br />
<br />
<script src="https://gist.github.com/ishajain/5127994.js"></script>
Step3: Display the content from SharePoint List in the home page using CEWP.<br />
<br />
<script src="https://gist.github.com/ishajain/5128017.js"></script>
Step4: Fetch the latest feed in every hour.
<br />
<script src="https://gist.github.com/ishajain/5128020.js"></script>
<br />
Hope you find this blog useful.<br />
<br />
Cheers,
<br />
Isha Jain
</div>
Isha Jainhttp://www.blogger.com/profile/10869794228243405007noreply@blogger.com4tag:blogger.com,1999:blog-3236363911118700344.post-61733506187601574192013-03-10T14:12:00.002+11:002013-03-10T14:20:13.205+11:00SharePoint Ribbon Customization<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
Ribbon is one of the new features introduced in SharePoint 2010. After office client, Microsoft introduced ribbon in the similar fashion in SharePoint.<br />
<br />
Ribbon in SharePoint 2010 provides the common place for most of the controls that you will need, Ribbon is divided into basic four sections as shown in Fig 1 below.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEga6Q1lu9KOhGiKNWDYLb39_UI01p5ZyQWcIpdyR5RlpAndqbGhy07min45ioJkIxYS1HDrfPG4scWF3CugIOBrrFTC5-NU9ELlXmQ-zTFqlBwt61DenLOVTWgsm-ZK5yEIsctQCDvVaCI/s1600/Ribbon.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="315" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEga6Q1lu9KOhGiKNWDYLb39_UI01p5ZyQWcIpdyR5RlpAndqbGhy07min45ioJkIxYS1HDrfPG4scWF3CugIOBrrFTC5-NU9ELlXmQ-zTFqlBwt61DenLOVTWgsm-ZK5yEIsctQCDvVaCI/s640/Ribbon.jpg" width="640" /></a></div>
<br />
<br />
<br />
<br />
<br />
1. Tab<br />
2. Group<br />
3. Controls<br />
4. Contexual Tab<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
The architecture of Ribbon allows you to customize by creating xml files.<br />
<br />
Inorder to understand how SharePoint implements its Ribbon, there is a XML element file at <br />
%Program Files %\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\GLOBAL\XML\CMDUI.XML<br />
<br />
If you open this xml file, you will see that its a huge file. Don't get afraid with this huge file.<br />
Lets understand how SharePoint implements the Ribbon functionality.<br />
<br />
The main element in the "CMDUI.xml" file is the "CommandUI" <commandui> <commandui> element, this element holds all the controls and the templates for the Ribbon. </commandui></commandui><br />
<br />
<script src="https://gist.github.com/ishajain/5126750.js"></script>
<b>Ribbon </b>element holds all the controls like Tabs, Group, Controls, Contextual Tab.<br />
<br />
<b>Templates </b>element has GroupTemplate element. Each GroupTemplate element specifies the mode in which the controls within that group will be rendered.<br />
<br />
<script src="https://gist.github.com/ishajain/5126333.js"></script>
As you can see in the ribbon image Fig 1, some of the controls are rendered as large icons whereas others like "Page History", "Delete Page" etc. (under Manage group) are rendered in medium size icons. All of these are controlled by GroupTemplate element.<br />
<br />
<br />
Now, Lets have a close look at Ribbon element. Ribbon element has two child elements "Tabs" and "ContexualTabs". Each of these element further has Groups and Controls element which hold the html contols like label, textbox , combobox, dropdown. etc.<br />
<br />
<script src="https://gist.github.com/ishajain/5126573.js"></script>
I hope you have got the clear understanding of the CMDUI.xml file.<br />
<br />
Now lets try to customize the ribbon. In this example I am going to add the caption to the table when a user inserts the table into the page. </div>
<br />
When a user edits the page and inserts the table into the page, "Table Tools" contextual tab shown below is displayed. What I am trying to achieve using this custom control is, when user enters some text into this highlighted textbox and hits save, I am adding the Caption child element to the table. This is achieved by specifying the custom .js code into the command handler element.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi16pEjqgQmRtLE6V05SvUu9oJ5cCLYW1Ktl_Zxqdqm2ZtBwTLfNH06BJXd7EAV3XkUZdslpou7-nVKde79O328HgNSfN6gzrX_KWcDST7in1bz8cm2BDRWoJE6QKlKZcaIL4ZkBEfo7I0/s1600/caption.PNG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="83" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi16pEjqgQmRtLE6V05SvUu9oJ5cCLYW1Ktl_Zxqdqm2ZtBwTLfNH06BJXd7EAV3XkUZdslpou7-nVKde79O328HgNSfN6gzrX_KWcDST7in1bz8cm2BDRWoJE6QKlKZcaIL4ZkBEfo7I0/s640/caption.PNG" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
Adding any custom controls into the ribbon can be achieved by creating custom action element.xml file in SharePoint 2010.<br />
<br />
The CustomAction element has two main elements: CommandUIDefinitions and CommandUIHandlers.<br />
<br />
CommandUIDefinitions hold all the custom controls definitions and the CommansUIHandlers hold the actions against each controls.<br />
<br />
<script src="https://gist.github.com/ishajain/5126641.js"></script>
There are few things to keep in mind.<br />
<b>CustomAction </b>Location="CommandUI.Ribbon" - tells SharePoint that you are adding controls into the Ribbon.<br />
<br />
<b>CommandUIDefination </b>Location="Ribbon.Table.Layout.Summary.Controls._children" - tells SharePoint that the controls need to be added into the "Ribbon.Table" contextual tab under "Layout" tab under "Properties" group.<br />
<br />
<b>Command </b>attribute of the control is the place you specify what action you need when a user clicks on the control. Action is specified in the <b>CommandUIHandler </b>element. In my example I am adding the caption element to the table.<br />
<br />
<b>QueryCommand </b>attribute of the control is fired when the page is rendered.
Action is specified in the <b>CommandUIHandler </b>element. In my example I am fetching the caption element of the table and storing into the textbox.<br />
<br />
There are few .js files for Ribbon which are present at 14 Hive layouts folder. These files hold the actions (CommandUIHandler) part of the ribbon.<br />
<br />
For Rich Text Editor : "SP.UI.RTE.js"<br />
For Publishing Site Rich Text Editor: "SP.UI.RTE.Publishing.js"<br />
<br />
<br />
Hope you find this blog useful.<br />
<br />
Cheers,<br />
Isha Jain
<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />
<br />
<br />
<br /></div>
Isha Jainhttp://www.blogger.com/profile/10869794228243405007noreply@blogger.com1tag:blogger.com,1999:blog-3236363911118700344.post-59385008704357367332013-02-23T15:05:00.000+11:002013-02-23T15:05:16.944+11:00CRUD operations using SPServices<div dir="ltr" style="text-align: left;" trbidi="on">
Hello,<br />
<br />
These days I am working on client side scripting in SharePoint 2010. I have heavily used SPServices. <br />
<br />
SPServices is a JQuery library which interacts with SharePoint web services. It is a script based technology which allows us to talk to SharePoint through its web services. <br />
<br />
The syntax is pretty simple, similar like JQuery and other scripting libraries. I have shown below the sample examples to achieve the CRUD operations using SPServices.<br />
<br />
<h3>
</h3>
<h3>
</h3>
<h3>
</h3>
<h3>
<span class="goog_qs-tidbit goog_qs-tidbit-0">Get All the items from the list based on the condition using GetListItems</span></h3>
<div style="background-color: white; color: black;">
<pre>function ProcessData(xData)
{
$("#content").html('');
var ulTag=$('<ul style="list-style:square;"></ul>');
$(xData.responseXML).SPFilterNode("z:row").each(function()
{
var liTag=$("<li></li>").append($(this).attr("ows_Title"))
ulTag.append(liTag);
});
$("#content").append(ulTag);
}
$().SPServices({
operation: "GetListItems",
async: false,
listName: "Announcements",
CAMLQuery: "<Query><Where><IsNotNull><FieldRef Name='Expires' /></IsNotNull></Where></Query>",
CAMLViewFields: "<ViewFields><FieldRef Name='Title' /><FieldRef Name='Expires' /><FieldRef Name='Body' /></ViewFields>",
completefunc: ProcessData
});
});
</pre>
</div>
<h3>
<span class="goog_qs-tidbit goog_qs-tidbit-0">Delete All the items from the list using SPUpdateMultipleListItems</span></h3>
<div style="background-color: white; color: black;">
<pre>function DeleteAllItemsFromList()
{
$.SPServices.SPUpdateMultipleListItems({
listName: "Announcements",
CAMLQuery: "<Query><Where><IsNotNull><FieldRef Name='Title' /></IsNotNull></Where></Query>",
batchCmd: "Delete"});
}</pre>
</div>
<h3>
Add item to a list using UpdateListItems </h3>
<div style="background-color: white; color: black;">
<pre>function AddItemsToList(title,content)
{ </pre>
<pre> $.SPServices({
operation: 'UpdateListItems',
listName: "Announcements",
updates: '<Batch OnError="Continue">' +
'<Method ID="1" Cmd="New">' +
'<Field Name="Title">'+ title +'</Field>' +
'<Field Name="Body">'+ content +'</Field>' +
'</Method>' +
'</Batch>',
completefunc: function(xData, Status)
{}});
}</pre>
</div>
<h3>
Update item in a list using UpdateListitems </h3>
<div style="background-color: white; color: black;">
<pre>$function UpdateListItem(itemID)
{
$().SPServices({</pre>
<pre> operation: 'UpdateListItems',</pre>
<pre> async: false,</pre>
<pre> listName: "Announcements", </pre>
<pre> updates: '<Batch OnError="Continue">' +
'<Method ID="1" Cmd="Update">' +
'<Field Name="ID">' + itemID + '</Field>' + //Specifying the item id is very important here
'<Field Name="Body">'+content+'</Field>' +
'</Method>' +
'</Batch>',
completefunc: function(xData, Status)
{}
});
}</pre>
<pre> </pre>
<pre> </pre>
</div>
<h3>
<span class="goog_qs-tidbit goog_qs-tidbit-0"> </span></h3>
<br /><br />
<br />Cheers,<br />
Isha Jain <br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhul5y8ZqsCldJkhO-cjvCuO507CbqJc13Qp-HIeOGGtT3ohnU4O6qhbcwW8LzUEFrlxOO-ad3cpX_CFKKMvAjBX6AxvHnuBjvZFVjfShxgAq7sCXmLh_Obbc-2-niZD_-lwF3bUuwRaFU/s1600/Capture.PNG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><br /></a></div>
</div>
Isha Jainhttp://www.blogger.com/profile/10869794228243405007noreply@blogger.com4tag:blogger.com,1999:blog-3236363911118700344.post-78784716539984445942013-01-04T10:29:00.001+11:002013-01-04T10:29:35.028+11:00PowerShell Basic - Speical Character<div dir="ltr" style="text-align: left;" trbidi="on">
Its very difficult to remember every syntax and what it refers to when you are working with myriad of languages.<br />
<br />
Below are the useful basic Characters which you need when you work in Power Shell.<br />
<br />
<h3>
</h3>
<h3>
<span style="font-weight: normal;">1. Single Line comment representation : #</span></h3>
<h3>
<span style="font-weight: normal;">Ex. # This is a single line comment </span></h3>
<h3>
<span style="font-weight: normal;"><br /></span></h3>
<h3>
<span style="font-weight: normal;">2. Multiple Line comments representation: <# #></span></h3>
<h3>
<span style="font-weight: normal;">Ex. <# This is a Multiple</span></h3>
<h3>
<span style="font-weight: normal;"> Line Comments #> </span></h3>
<h3>
<span style="font-weight: normal;"> </span></h3>
<h3>
<span style="font-weight: normal;">3.Declare a variable: $</span></h3>
<h3>
<span style="font-weight: normal;">Ex. $a=$null </span></h3>
<h3>
<span style="font-weight: normal;"> </span></h3>
<h3>
<span style="font-weight: normal;">4.Item inside for each loop or current pipeline object : $_</span></h3>
<h3>
<span style="font-weight: normal;">Ex. .... | Foreach {Write-Host $_} </span></h3>
<h3>
<span style="font-weight: normal;"> </span></h3>
<h3>
<span style="font-weight: normal;">5.Continue command on next line: `</span></h3>
<h3>
<span style="font-weight: normal;">Ex. Write-Host `</span></h3>
<h3>
<span style="font-weight: normal;"> "Hello World!!" </span></h3>
<h3>
<span style="font-weight: normal;"> </span></h3>
<h3>
<span style="font-weight: normal;">6.Where-Object shortcut : ? </span></h3>
<h3>
<span style="font-weight: normal;">Ex. .... | 1..5 | ? {Write-Host $_ % 2} # Here % represent mod</span></h3>
<h3>
<span style="font-weight: normal;"> </span></h3>
<h3>
<span style="font-weight: normal;">7.Not Shortcut : !</span></h3>
<h3>
<span style="font-weight: normal;">Ex. $a=$null | if($a) {Write-Host "$a is not null"}</span></h3>
<h3>
<span style="font-weight: normal;"> </span></h3>
<h3>
<span style="font-weight: normal;">8.For each Shortcut: %</span></h3>
<h3>
<span style="font-weight: normal;">Ex. .... | % {Write-Host $_}</span></h3>
<h3>
<span style="font-weight: normal;"> </span></h3>
<h3>
<span style="font-weight: normal;">9. To catch the output of the command and pass it to the another command: |</span></h3>
<h3>
<span style="font-weight: normal;">Ex. get-process | select-object -first 3</span></h3>
<h3>
<span style="font-weight: normal;"><br /></span></h3>
<h3>
<span style="font-weight: normal;">10. Declare Array: @()</span></h3>
<h3>
<span style="font-weight: normal;">Ex. $a= @("one" , "two" , "three")</span></h3>
<h3>
<span style="font-weight: normal;"><br /></span></h3>
<h3>
<span style="font-weight: normal;">11. Declare Hash table: @{}</span></h3>
<h3>
<span style="font-weight: normal;">Ex. $a= @{"1" = "one" ; "2" ="two" ; "3" ="three"} </span></h3>
<h3>
<span style="font-weight: normal;"><br /></span></h3>
<h3>
<span style="font-weight: normal;">12. To specify a range: ..</span></h3>
<h3>
<span style="font-weight: normal;">Ex. 1..5 | </span></h3>
<h3>
<span style="font-weight: normal;"><br /></span></h3>
<h3>
<span style="font-weight: normal;">Hope this help</span></h3>
<h3>
<span style="font-weight: normal;">Isha</span></h3>
<h3>
<span style="font-weight: normal;"><br /></span></h3>
<h3>
<span style="font-weight: normal;"> </span></h3>
<h3>
<span style="font-weight: normal;"> </span></h3>
<h3>
<br /></h3>
</div>
Isha Jainhttp://www.blogger.com/profile/10869794228243405007noreply@blogger.com0tag:blogger.com,1999:blog-3236363911118700344.post-90237699751731148502012-10-01T10:41:00.001+10:002012-10-01T10:41:28.645+10:00Internal server error in SharePoint search<div dir="ltr" style="text-align: left;" trbidi="on">
When running SharePoint search I stuck with the error saying nothing but Internal Server error.<br />
After much hit and try I found that below steps helped me in solving the error.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIHRi7c5nfrLJb4Ip9PA9oI612rxXOE-_VmVlA1mqCZfdQnquUHhnt9ygd8wPmpaSsWwftNHz_1fPOjFEtS_K-I5Wrs_n4HKjKgMK5KvYH9s_T6gaA0-5gj8XsM71yz8gCllU59ITJPJw/s1600/Capture1.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="183" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIHRi7c5nfrLJb4Ip9PA9oI612rxXOE-_VmVlA1mqCZfdQnquUHhnt9ygd8wPmpaSsWwftNHz_1fPOjFEtS_K-I5Wrs_n4HKjKgMK5KvYH9s_T6gaA0-5gj8XsM71yz8gCllU59ITJPJw/s400/Capture1.jpg" width="400" /></a></div>
<br />
<ul style="text-align: left;">
<li><div class="separator" style="clear: both; text-align: left;">
Restart the SharePoint timer services/ IIS/ SharePoint Search service / Restart Server</div>
</li>
<li><div class="separator" style="clear: both; text-align: left;">
Enable "Search Server WebParts" feature on the Site Collection level.</div>
</li>
<li><div class="separator" style="clear: both; text-align: left;">
Run the "Search and Process" Timer Job</div>
</li>
<li><div class="separator" style="clear: both; text-align: left;">
Make sure your search service application is associated with right proxy! (Go to Application Management >> Select Configure service application associations under the Service Application heading >>Select the default Application, select Your sevice app, Then click on set as default)</div>
</li>
<li><div class="separator" style="clear: both; text-align: left;">
ensure that the "SharePoint Server Search" and "Search Query and Site Settings Service" services are running </div>
</li>
<li><div class="separator" style="clear: both; text-align: left;">
Verify your AAM Settings</div>
</li>
<li><div class="separator" style="clear: both; text-align: left;">
ensuring that the application pool is assigned correctly</div>
</li>
<li><div class="separator" style="clear: both; text-align: left;">
Remove and reinstall the search application</div>
</li>
<li><div class="separator" style="clear: both; text-align: left;">
Install the Hot fix: <strong><span style="color: #669922;"><a href="http://support.microsoft.com/kb/976462">http://support.microsoft.com/kb/976462</a></span></strong></div>
</li>
</ul>
<span style="color: #669922;"></span><br />
<span style="color: #669922;"></span><br />
<span style="color: #669922;"></span> </div>
Isha Jainhttp://www.blogger.com/profile/10869794228243405007noreply@blogger.com0tag:blogger.com,1999:blog-3236363911118700344.post-67837004202689893612012-09-17T13:21:00.000+10:002012-09-17T13:21:02.830+10:00NetBiosDomainNamesEnabled and SharePoint User Profile Service Application<div dir="ltr" style="text-align: left;" trbidi="on">
NetBiosDomainNamesEnabled property is set for every UPA (User Profile Service Application). By default this property is set false. We need to enable NetBios Domain Names for UPA when Domain Fully Qualified Domain Name (FQDN/DNS) is different then NetBIOS name.<br />
<br />
Now the question araises how do we check whether the DNS and NetBIOS names.<br />
<br />
Open Active Directory Users and Computers, right click and choose Properties. <br />
you will see the below properties.<br />
<br />
1 is your DNS/FQDN and 2 is your NetBios Domain Name.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHByoVAvnKSCCx5Hw9Nw9tuIiu-5f8JUoB5orQqCAVNjd1aplAvA-GzkLi9yLzYDkpa7Q5lyIvF5BpKNMKqIVNYv_efvBKw7YIdyp8lxY_Tx-mcGrZF1nBS0khKPAliLggyK1qoG5ID_8/s1600/NETBIOS.png" imageanchor="1" style="clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" hea="true" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHByoVAvnKSCCx5Hw9Nw9tuIiu-5f8JUoB5orQqCAVNjd1aplAvA-GzkLi9yLzYDkpa7Q5lyIvF5BpKNMKqIVNYv_efvBKw7YIdyp8lxY_Tx-mcGrZF1nBS0khKPAliLggyK1qoG5ID_8/s400/NETBIOS.png" width="318" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
If you dont have access to your domain Active Directory you can get the information using PowerShell command.<br />
<br />
To find <strong>FQDN</strong> <br />
<br />
<div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 10pt;">
<span style="font-family: inherit;"><span>[System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain().Name</span></span></div>
<div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 10pt;">
<span style="font-family: inherit;"><span>To find <strong>NetBIOS</strong> name</span></span></div>
<div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 10pt;">
<span style="font-family: inherit;"><span>Get-ADDomain -Identity "YourFQDN"</span></span></div>
<div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 10pt;">
<span style="font-family: inherit;"><span>Now if you find that DNSRoot and NetBIOSName properties are not same then before synchronizing your UPA enable the NetBiosDomainNamesEnabled.</span></span></div>
<div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 10pt;">
<span style="font-family: inherit;"><span>Below is the PowerShell command to enable the import of NetBios Domain Names.</span></span><span style="font-family: inherit;"><span></span></span></div>
<pre>
Get-SPServiceApplication </pre>
</div>
(lists the Service Applications and their GUIDs)<br /><i>$UPA = Get-SPServiceApplication –Id <GUID of User Profile Service Application></i><br /><i>$UPA.NetBIOSDomainNamesEnabled=1</i><br /><i>$UPA.Update()</i><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 10pt;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 10pt;">
Then start the UPA synchronizartion.<br /><br />Hope this help!!</div>
<div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 10pt;">
Cheers!!</div>
<div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 10pt;">
Isha Jain</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />
<br />
<div class="separator" style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; clear: both; text-align: center;">
</div>
Isha Jainhttp://www.blogger.com/profile/10869794228243405007noreply@blogger.com0tag:blogger.com,1999:blog-3236363911118700344.post-21656810624870860052012-09-14T09:53:00.000+10:002012-09-14T11:14:12.467+10:00User Profile Synchonization Service Stuck on Starting<div dir="ltr" style="text-align: left;" trbidi="on">
Starting User Profile Synchonization Service in SharePoint is always a big pain. Most of the time it stuck on Starting mode and you dont have controll to stop this.<br />
<br />
You can stop the User profile Synchronization Service.<br />
<a href="http://donalconlon.wordpress.com/2010/08/27/deleting-the-search-service-application/">http://donalconlon.wordpress.com/2010/08/27/deleting-the-search-service-application/</a><br />
<br />
There are many reasons for this.<br />
<br />
1. The account which you are using to run the service might not have "Replicate Directory Changes" permission in your AD.<br />
<br />
Solution: <br />
<a href="http://www.codeproject.com/Articles/358855/user-profile-synchronization-service-not-starting">http://www.codeproject.com/Articles/358855/user-profile-synchronization-service-not-starting</a><br />
<br />
2. This account which you are using to run the service might not have explicit access to the folder C:\Program Files\Microsoft Office Servers\14.0.<br />
<br />
The reason we need to give explicit access to the folder is User Profile Synchronization service access AD through ForeFront Identity Manager Synchronization Service. <br />
<br />
Thus in order to start User Profile Synchronization Service, Microsoft Forefront Identity Manager Synchronization Service have full access and this Forefront Synchronization service sits at C:\Program Files\Microsoft Office Servers\14.0.\Synchronization Service\UIShell called as miisclient (Microsoft ForeFront Identity Manager). <br />
<br />
Solution: Give access<br />
<a href="http://melick-rajee.blogspot.com.au/2011/07/user-profile-synchronization-service.html">http://melick-rajee.blogspot.com.au/2011/07/user-profile-synchronization-service.html</a><br />
<br />
3.The password for the account which you are using to run the service is not correct.<br />
<br />
Solution: Enter proper password or if the password is expired reset the password in AD and then following the below link<br />
<a href="http://info.izzy.org/Blog/archive/2010/08/04/how-to-fix-an-out-of-sync-password-issue-in-sharepoint-2010.aspx">http://info.izzy.org/Blog/archive/2010/08/04/how-to-fix-an-out-of-sync-password-issue-in-sharepoint-2010.aspx</a><br />
<a href="http://blogs.technet.com/b/seanearp/archive/2011/01/25/updating-passwords-on-sharepoint-2010.aspx">http://blogs.technet.com/b/seanearp/archive/2011/01/25/updating-passwords-on-sharepoint-2010.aspx</a><br />
<br />
Hope this help.<br />
Cheers<br />
Isha<br />
</div>
Isha Jainhttp://www.blogger.com/profile/10869794228243405007noreply@blogger.com1tag:blogger.com,1999:blog-3236363911118700344.post-49911007545725264782012-09-13T14:31:00.000+10:002012-09-13T14:31:02.088+10:00Fix for SharePoint Search 2010 not able to connect to machine that hosts the admin component.<div dir="ltr" style="text-align: left;" trbidi="on">
I faced a ugly error today on my central admin says Search Service not able to connect to the machine that host the administration component.<br />
<br />
I read many blogs and mostly said create a new Search Service Application. I tried that but still the problem exists.<br />
<br />
Below are the steps I followed to solve the issue of Serch Service Application.<br />
<br />
1. Deleted the existing Search Service Application.<br />
<br />
a. Get-SPServiceApplication <br />
This will help to get the Search Service Application GUID.Copy the Search Service Application GUID <br />
b. stsadm -o deleteconfigurationobject -id <GUID> from step a.<br />
<br />
2. Delete the Application Pool for Search Service Application<br />
<br />
a. Get-SPServiceApplicationPool<br />
This will lists all the Service Application Pool. Find the one associated with Search Service Application<br />
b.Remove-SPServiceApplicationPool <ApplicationPoolName><br />
<br />
3.Delete the CrawlStoreDB, PopertyStoreDB and AdminDB from the SQL Server responsible for holding all information related to Search Service Application.<br />
<br />
Above three steps are just the clean up steps<br />
<br />
4.Now Create the Search Service Application using the below blog<br />
<a href="http://waelmohamed.wordpress.com/2011/05/31/configure-sharepoint-2010-search-service-application/">http://waelmohamed.wordpress.com/2011/05/31/configure-sharepoint-2010-search-service-application/</a><br />
<br />
5.Now If you still see the error then the trick is beloe simple STSADM command<br />
Resolution: Run the following stsadm command<br /><br />
stsadm -o provisionservice -action start -servicename osearch14
-servicetype
"Microsoft.Office.Server.Search.Administration.SearchService,
Microsoft.Office.Server.Search, Version=14.0.0.0, Culture=neutral,
PublicKeyToken=71e9bce111e9429c"<br /><br />
do a simple iisreset /noforce<br /><br />
Thats it!!! it will start working!!!<br /><br />
Hope this will help and fix the issue.<br />
</div>
Isha Jainhttp://www.blogger.com/profile/10869794228243405007noreply@blogger.com0tag:blogger.com,1999:blog-3236363911118700344.post-68205544621423302382012-09-11T17:28:00.000+10:002012-09-11T17:28:13.525+10:00How to split one file into many based on condition using PowerShell<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Calibri;">I have been in a scenario where I have to spilt the
CSV file content into many .CSVs based on some condition.</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Calibri;">Below are the steps I have followed to achieve this using PowerShell.<o:p></o:p></span></div>
<br />
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Calibri;">At First I import the CSV file which I need to spit and then
for each data row in the csv file call the function “CreateOrAppendCSV “ <span style="mso-spacerun: yes;"> </span>by passing two parameters each data row
entry and filename.<o:p></o:p></span></div>
<br />
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Calibri;">IMPORT-CSV “C:\Source.csv” | Foreach-Object { $path=$filePath+".csv";
select-object -input $_ -prop
@{Name='Name';expression={$_.Name;}},@{Name='Url';expression={$_.Url;}}
|<span style="mso-spacerun: yes;"> </span>CreateOrAppendCSV <span style="mso-spacerun: yes;"> </span>$_ $path } <o:p></o:p></span></div>
<br />
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Calibri;"># This will create the new csv file if not exists or append
to the existing csv file for position</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Calibri;">Function CreateOrAppendCSV</span><span style="font-family: Calibri;">{<o:p></o:p></span></div>
<span style="font-family: Calibri;">Param($item,$path)<o:p></o:p></span><br />
<span style="font-family: Calibri;">If(Test-Path
$path -PathType Leaf) # This Test-Path command checks for file exists or not</span><br />
<span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span>{<o:p></o:p></span><br />
<span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> # If file exists then append using ADD-Content Command </span></span><br />
<span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span>$fileImport= Import-Csv $path<o:p></o:p></span><br />
<span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span>$newItem= New-Object PsObject<span style="mso-spacerun: yes;"> </span><o:p></o:p></span><br />
<span style="font-family: Calibri;"><span style="mso-spacerun: yes;"> </span>$newItem |
Add-Member -MemberType NoteProperty -Name "Name" -Value $item.Name<o:p></o:p></span><br />
<span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span></span><span style="font-family: Calibri;"><span style="mso-spacerun: yes;"> </span>$newItem | Add-Member -MemberType NoteProperty
-Name "Url" -Value $item.Url</span><br />
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Calibri;"> $newItem | ConvertTo-Csv<span style="mso-spacerun: yes;"> </span>-NoTypeInformation|select -Skip 1 |
Add-Content $path<o:p></o:p></span></div>
<span style="font-family: Calibri;">}<o:p></o:p></span><br />
<span style="font-family: Calibri;">Else<o:p></o:p></span><br />
<span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span>{<o:p></o:p></span><br />
<span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span>$item | Export-Csv -Path $path -NoTypeInformation #Export if file not exists.</span><br />
<span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span>}<o:p></o:p></span><br />
<span style="font-family: Calibri;">}</span><br />
<span style="font-family: Calibri;"></span><br />
<span style="font-family: Calibri;"><o:p>Hope this help.</o:p></span><br />
<span style="font-family: Calibri;"><o:p>Isha Jain</o:p></span><br />
</div>
Isha Jainhttp://www.blogger.com/profile/10869794228243405007noreply@blogger.com0tag:blogger.com,1999:blog-3236363911118700344.post-69760166676520744842012-09-07T16:57:00.000+10:002012-09-10T09:55:58.077+10:00PowerShell with Exchange<div dir="ltr" style="text-align: left;" trbidi="on">
Here is something new I learnt today.<br />
<br />
In order to create a mailbox for an active directory user using powershell we need to Get-PSSnapin for Exchange and Import-Module for Active Directory.<br />
<br />
Clear-Host<br />
<br />
#SnapIn for Exchange Mailbox<br />
if(-not(Get-PSSnapin | Where-Object {$_.Name -eq "Microsoft.Exchange.Management.PowerShell.E2010"}))<br />
{<br />
Add-pssnapin Microsoft.Exchange.Management.PowerShell.E2010<br />
}<br />
<br />
#SanpIn For SharePoint<br />
if(-not(Get-PSSnapin | Where-Object {$_.Name -eq "Microsoft.SharePoint.PowerShell"})) {<br />
Add-PSSnapin Microsoft.SharePoint.PowerShell;<br />
}<br />
<br />
# Add Active Directory Snap-In<br />
Import-Module ServerManager<br />
Add-WindowsFeature RSAT-AD-PowerShell <br />
Import-Module ActiveDirectory<br />
<br />
Once this Import is done we can call the "New-Mailbox" command which will create the mailbox and AD user.<br />
<br />
This command will create mailbox along with user creation in AD.<br />
<br />
New-Mailbox -Name $displayName -Database $dbName -Password $password -UserPrincipalName $userPrincipalName -Alias $samAccountName -DisplayName $displayName -FirstName $givenName -LastName $surname -OrganizationalUnit $ouPath <br />
<br />
This command will create user in AD and then you can enable the mailbox<br />
<br />
New-ADUser -Enable $True -PasswordNeverExpires $enable -PassThru -Name $displayName -GivenName $givenName -Surname $surname -DisplayName $displayName -EmailAddress $emailAddress -SamAccountName $samAccountName -Title $title -Department $department -UserPrincipalName $userPrincipalName -Path $path -AccountPassword $password<br />
<br />
Enable-Mailbox $userPrincipalName –Database $dbName<br />
<br />
Hope this help.<br />
Isha <br />
</div>
Isha Jainhttp://www.blogger.com/profile/10869794228243405007noreply@blogger.com0tag:blogger.com,1999:blog-3236363911118700344.post-4468854115852311322012-08-30T09:39:00.000+10:002012-09-10T09:56:31.532+10:00Export SharePoint List data into CSV file<div dir="ltr" style="text-align: left;" trbidi="on">
Hi,<br />
<br />
I have found couple of blogs explaning the reverse way of expoting csv file data into SharePoint list. I have accomplished the other way around and hence thought of sharing this with you.<br />
<br />
InOrder to export data from SharePoint list into CSV file, lets first query SharePoint list and get the required items and then we will export these items into CSV file.<br />
<br />
<br />
$spSiteUrl = "<a href="http://sharepointwebapplication/">http://sharepointwebapplication</a>"<br />
$listtitle="My Custom List"<br />
$spWeb= Get-SPWeb -Identity $spSiteUrl<br />
Function ImportDataFromListToCSV<br />
{<br />
IF($spWeb -ne $null)<br />
{<br />
$list = $spWeb.Lists.TryGetList($listtitle)<br />
$exportlist = @()<br />
$items = $list.Items<br />
Write-Host "Exporting........" -ForegroundColor Yellow<br />
if($items -ne $null)<br />
{ <br />
#Here "givenName" column name for CSV file and "Given Name" column name SharePoint List<br />
$items | %{ select-object -input $_ -prop @{Name='givenName';expression={$_["Given Name"];}},@{Name='surname';expression={$_["Family Name"];}};}| Export-Csv -Path C:\Demo.csv -NoTypeInformation <br />
Write-Host "SharePoint list data is exported successfully." -ForegroundColor Green<br />
$spWeb.Dispose()<br />
}<br />
Else<br />
{Write-Host "No data found in the list "$listtitle -ForegroundColor Yellow}}<br />
}<br />
<br />
Enjoy PowerShell,<br />
Isha Jain<br />
</div>
Isha Jainhttp://www.blogger.com/profile/10869794228243405007noreply@blogger.com0tag:blogger.com,1999:blog-3236363911118700344.post-62024961010034118122012-08-29T16:39:00.000+10:002012-09-10T09:57:38.291+10:00SharePoint and PowerShell<div dir="ltr" style="text-align: left;" trbidi="on">
I have realised the importance and power of PowerShell and hence thought about sharing.<br />
<br />
These days I am working very deeply with PowerShell in SharePoint.<br />
<br />
Sending an email using PowerShell...<br />
<br />
Function SendMail<br />
{<br />
$smtpServer = "your SMTP server name"<br />
$logFileName= "C:\test.txt"<br />
$att = new-object Net.Mail.Attachment($logFileName)<br />
$msg = new-object Net.Mail.MailMessage<br />
$smtp = new-object Net.Mail.SmtpClient($smtpServer)<br />
$msg.From ="<a href="mailto:test@gmail.com">test@gmail.com</a>"<br />
$msg.To.Add("<a href="mailto:he@gmail.com">he@gmail.com</a>")<br />
$msg.To.Add("<a href="mailto:she@gmail.com">she@<a href="mailto:she@gmail.com">gmail.com</a>")</a><br />
$msg.Subject = "Test Mail"<br />
$msg.Body = "This is a test email.<br />
$msg.Attachments.Add($att) <br />
$smtp.Send($msg)<br />
$att.Dispose()<br />
}<br />
<br />
Power of SPQuery Object in SharePoint....<br />
<br />
$spSiteUrl = "<a href="http://webapplication/">http://webapplication</a>"<br />
$spWeb= Get-SPWeb -Identity $spSiteUrl<br />
<br />
Function EmptySPList<br />
{ Param($listname)<br />
IF($spWeb -ne $null)<br />
{<br />
$list = $spWeb.Lists.TryGetList($listname)<br />
$caml=""<br />
$query=new-object Microsoft.SharePoint.SPQuery<br />
$query.ViewAttributes = "Scope='Recursive'"<br />
$query.Query=$caml<br />
$items=$list.GetItems($query)<br />
$items | % { $list.GetItemById($_.Id).Delete() }<br />
Write-Host "Items from list '" $listname "' are deleted successfully." -ForegroundColor Green<br />
}}<br />
<br />
Function FindSpecificSPListItems<br />
{<br />
Param($list)<br />
$dateFrom=[Microsoft.SharePoint.Utilities.SPUtility]::CreateISO8601DateTimeFromSystemDateTime([DateTime]::Today)<br />
$dateTo=[Microsoft.SharePoint.Utilities.SPUtility]::CreateISO8601DateTimeFromSystemDateTime([DateTime]::Today.AddMonths(-3))<br />
$spQuery = New-Object Microsoft.SharePoint.SPQuery<br />
$spQuery.ViewAttributes = "Scope='Recursive'";<br />
$spQuery.RowLimit = 100<br />
$caml = '<Where><And><Leq><FieldRef Name="Date" /><Value Type="DateTime">'+$dateFrom+'</Value></Leq><Geq><FieldRef Name="Date" /><Value Type="DateTime">'+$dateTo+'</Value></Geq></And></Where><OrderBy><FieldRef Name="Title" Ascending="True" /></OrderBy>' <br />
$spQuery.Query = $caml<br />
$listItems = $list.GetItems($spQuery)<br />
if($listItems -ne $null)<br />
{<br />
#do some stuff<br />
}}<br />
<br />
Cheers,<br />
Isha </div>
Isha Jainhttp://www.blogger.com/profile/10869794228243405007noreply@blogger.com0tag:blogger.com,1999:blog-3236363911118700344.post-92049489735175197142012-03-17T12:01:00.025+11:002012-03-19T14:10:54.720+11:00Site Templates in MOSS 2007 and SharePoint Server 2010<div dir="ltr" style="text-align: left;" trbidi="on"><b><span class="Apple-style-span" style="color: #e06666;">The following are the list of Site Templates in MOSS 2007</span></b><br />
<br />
<b><span class="Apple-style-span" style="color: #f1c232;">Under Collaboration</span></b><br />
<br />
<ul style="text-align: left;"><li>Team Site (STS Template)</li>
<li>Blank Site (STS Template)</li>
<li>Document Workspace (STS Template)</li>
<li>Wiki (WIKI Template)</li>
<li>Blog (BLOG Template)</li>
</ul><div><b><span class="Apple-style-span" style="color: #f1c232;">Under Meeting</span></b></div><div><ul style="text-align: left;"><li>Basic Meeting Workspace (MPS Template)</li>
<li>Blank Meeting Workspace (MPS Template)</li>
<li>Decision Meeting (MPS Template)</li>
<li>Social Meeting (MPS Template)</li>
<li>Multipage Meeting (MPS Template)</li>
</ul><div><b><span class="Apple-style-span" style="color: #f1c232;">Under Enterprise</span></b></div></div><div><ul style="text-align: left;"><li>Document Center (BDR Template)</li>
<li>Record Center (OFFile Template)</li>
<li>Site Directory (SPSSITES Template)</li>
<li>Report Center (SPSREPORT CENTER Template)</li>
<li>Search Centre with Tabs (SPCHEN Template)</li>
<li>My Site Host (SPSMSITEHOST Template)</li>
<li>Search Center (SRCHCENTERLITE Template)</li>
</ul><div><b><span class="Apple-style-span" style="color: #f1c232;">Under Publishing</span></b></div></div><div><ul style="text-align: left;"><li>Collaboration Portal</li>
<li>Publishing Portal (BLANKINTERNETCONTAINER Template)</li>
</ul></div><div><div style="margin: 0px;"><b><span class="Apple-style-span" style="color: #e06666;"><br />
</span></b></div><div style="margin: 0px;"><b><span class="Apple-style-span" style="color: #e06666;">The following are the list of Site Templates in SharePoint Server 2010</span></b></div><div style="margin: 0px;"><br />
</div><div style="margin: 0px;"><b><span class="Apple-style-span" style="color: #f1c232;">Under Collaboration</span></b></div><div style="margin: 0px;"></div><ul style="text-align: left;"><li>Team Site (STS Template)</li>
<li>Blank Site (STS Template)</li>
<li>Document Workspace (STS Template)</li>
<li>Blog (BLOG Template)</li>
<li>Visio Process Repository (VISPRUSTemplate)</li>
<li>Group Work Site (SGSTemplate)</li>
</ul><div><b><span class="Apple-style-span" style="color: #f1c232;">Under Meeting</span></b></div><div><ul style="text-align: left;"><li>Basic Meeting Workspace (MPS Template)</li>
<li>Blank Meeting Workspace (MPS Template)</li>
<li>Decision Meeting (MPS Template)</li>
<li>Social Meeting (MPS Template)</li>
<li>Multipage Meeting (MPS Template)</li>
</ul><div><b><span class="Apple-style-span" style="color: #f1c232;">Under Content and Data</span></b></div><ul style="text-align: left;"><li>Document Center (BDR Template)</li>
<li>Record Center (OFFile Template)</li>
<li>Business Intelligence Centre (BICenterSite Template)</li>
<li>Report Center (SPSREPORT CENTER Template)</li>
<li>My Site Host (SPSMSITEHOST Template)</li>
<li>PowerPoint Broadcast Site (POWERPOINTBROADCAST Template)</li>
<li>Personalisation Site (SPSMSITE Template)</li>
</ul></div><div><div><b><span class="Apple-style-span" style="color: #f1c232;">Under Publishing</span></b></div></div><div><ul style="text-align: left;"><li>Enterprise Wiki (ENTERWIKI Template)</li>
<li>Publishing Portal (BLANKINTERNETCONTAINER Template)</li>
</ul></div></div><div><div><div><div><b><span class="Apple-style-span" style="color: #f1c232;">Under Web Database</span></b></div></div><div><ul style="text-align: left;"><li>Asserts Web Database (ACCSRV Template)</li>
<li>Charitable Contribution Web Database (ACCSRV Template)</li>
<li>Contacts Web Database (ACCSRV Template)</li>
<li>Issues Web Database (ACCSRV Template)</li>
<li>Projects Web Database (ACCSRV Template)</li>
</ul></div></div></div><div><div><div><b><span class="Apple-style-span" style="color: #f1c232;">Under Search</span></b></div></div><div><ul style="text-align: left;"><li>Basic Search Centre (SRCHCENTERLITE Template)</li>
<li>FAST Search Centre (SRCHCENTERFAST Template)</li>
<li>Enterprise Search Centre (SRCHCEN Template)</li>
</ul><div><div style="margin: 0px;"><b><span class="Apple-style-span" style="color: #e06666;">Below are the 10 newly added Site Templates and 4 removed Site Template List in SharePoint 2010</span></b></div><div style="margin: 0px;"><b><span class="Apple-style-span" style="color: #e06666;"><br />
</span></b></div><div style="margin: 0px;"></div><div><div><b><span class="Apple-style-span" style="color: #f1c232;">10 Newly Added Templates</span></b></div></div><div><ul style="text-align: left;"><li>Basic Search Centre</li>
<li>FAST Search Centre</li>
<li>Enterprise Search Center</li>
<li>Group Work site</li>
<li>Visio Process Repository</li>
<li>Charitable Contribution Web Database</li>
<li>Projects Web Database</li>
<li>Enterprise Wiki</li>
<li>PerformancePoint</li>
<li>Business Intelligence Center</li>
</ul></div><br />
<div style="margin: 0px;"></div><div><div><b><span class="Apple-style-span" style="color: #f1c232;">4 Removed Templates</span></b></div></div><div><ul style="text-align: left;"><li>Site Directory</li>
<li>Search Centre with Tabs</li>
<li>Search Center</li>
<li>Collaboration Portal</li>
</ul></div></div></div></div><div><b><span class="Apple-style-span" style="color: #e06666;"><br />
</span></b></div></div>Isha Jainhttp://www.blogger.com/profile/10869794228243405007noreply@blogger.com1tag:blogger.com,1999:blog-3236363911118700344.post-87866237333396162312012-03-16T09:10:00.000+11:002012-03-16T09:10:38.171+11:00SharePoint Server 2010 Feature GUIDs<div dir="ltr" style="text-align: left;" trbidi="on">Below are the list of the SharePoint Server 2010 Feature GUIDs<br />
<br />
<div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3SR3hZqpnM8Z4eecIaqk_hyEAXkwFXoLL70Ad-caoPpbcGBcJ1RiJRgQXeelI9HAUmIckxefeR4NLGlM1SzlAic8RArhj5nmldQrJIUpviKXa5yOkhmDlv0Rr_-JbF3Vim4b9KoIbRkM/s1600/GUIDs1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3SR3hZqpnM8Z4eecIaqk_hyEAXkwFXoLL70Ad-caoPpbcGBcJ1RiJRgQXeelI9HAUmIckxefeR4NLGlM1SzlAic8RArhj5nmldQrJIUpviKXa5yOkhmDlv0Rr_-JbF3Vim4b9KoIbRkM/s640/GUIDs1.png" width="640" /></a></div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4oHysPydspN7a6co8z7TR6tYQrji5vkzFHSZCbrQOA7bu2a4TYkHDwg4ySQHW2tVm6HAbO139ZwIhJB5DzzHv2lB7gTMTCUvgWcS6Cex1-6N7Z6hqkLKXxMqv-squ5bfCvQlqVA0dfGU/s1600/GUIDs2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4oHysPydspN7a6co8z7TR6tYQrji5vkzFHSZCbrQOA7bu2a4TYkHDwg4ySQHW2tVm6HAbO139ZwIhJB5DzzHv2lB7gTMTCUvgWcS6Cex1-6N7Z6hqkLKXxMqv-squ5bfCvQlqVA0dfGU/s640/GUIDs2.png" width="640" /></a></div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZTZqFQNXQjgsMPOqKF9QYmuLx08ntvogXofwvXxQQi0pEQBdv1p6WyyH5BZy3gG3-ys2IBH9TiJqooq42woUZXlRXQxwFjnP3pdcGyTI4_i6S-9kzyaIJLP63bH6jEgemTeTYrfCfVaQ/s1600/GUIDs3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZTZqFQNXQjgsMPOqKF9QYmuLx08ntvogXofwvXxQQi0pEQBdv1p6WyyH5BZy3gG3-ys2IBH9TiJqooq42woUZXlRXQxwFjnP3pdcGyTI4_i6S-9kzyaIJLP63bH6jEgemTeTYrfCfVaQ/s640/GUIDs3.png" width="640" /></a></div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKQq_le0fsRqe29ugEuqhn_7F8LiAj5BFhNMct4wo_0QrDll6485PmclTIha74tVcfXXhVhDWftICkOhoysAkzkha7FO5semjEaC6oTbF7PS9dufD-iAUt3FluUxwnr5kPtn8cQH22LA0/s1600/Guids4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKQq_le0fsRqe29ugEuqhn_7F8LiAj5BFhNMct4wo_0QrDll6485PmclTIha74tVcfXXhVhDWftICkOhoysAkzkha7FO5semjEaC6oTbF7PS9dufD-iAUt3FluUxwnr5kPtn8cQH22LA0/s640/Guids4.png" width="640" /></a></div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpictnuVo-LXaNcpENjJt5-eQ1-rG53BlsdueRbkMtwnUHLHIoynaJkAXq8Q6_QLG8G2fuXHKzPne_F61F9rHnEmff2cbQuZnoWBojHWf6RHi84JDBsiRn4YDhNP2yEYInSp887I8sVpc/s1600/GUIDs5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpictnuVo-LXaNcpENjJt5-eQ1-rG53BlsdueRbkMtwnUHLHIoynaJkAXq8Q6_QLG8G2fuXHKzPne_F61F9rHnEmff2cbQuZnoWBojHWf6RHi84JDBsiRn4YDhNP2yEYInSp887I8sVpc/s640/GUIDs5.png" width="640" /></a></div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjviyIwj_g114Ger6jMK4rWxQ23IPDlcohbLeby2P8T0XUZjxd5syzxN71zl9grYSKgzPk_w7yy2Cm6frUpjNRhdqo8Jym6bR0lutDIHQ79KtfiSmdp-pHbxZ98FzpCAKU-st9Mb3LKwLo/s1600/GUIDs6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjviyIwj_g114Ger6jMK4rWxQ23IPDlcohbLeby2P8T0XUZjxd5syzxN71zl9grYSKgzPk_w7yy2Cm6frUpjNRhdqo8Jym6bR0lutDIHQ79KtfiSmdp-pHbxZ98FzpCAKU-st9Mb3LKwLo/s640/GUIDs6.png" width="640" /></a></div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAT0Gg4nIYV4QOrPS5fUoeYqaR2KTF_UTsFP69HnDs7geclZ61yq_Nzp3GhpBpnGoK2YBNrpjhSa2M-RJbc-f32fT5Nj8Ae5nkSXQK4cArpOMZULFplnxAJX2DMf9STHT0OK9O64gXFro/s1600/Guids7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAT0Gg4nIYV4QOrPS5fUoeYqaR2KTF_UTsFP69HnDs7geclZ61yq_Nzp3GhpBpnGoK2YBNrpjhSa2M-RJbc-f32fT5Nj8Ae5nkSXQK4cArpOMZULFplnxAJX2DMf9STHT0OK9O64gXFro/s640/Guids7.png" width="640" /></a></div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxAg_52YqHPhLbipIvRd65oige5FyyklrbL7EL-02X722Nez8XXx9EtZn2vfkXcdnyJxw0l1yPisbKXq6SFuxpz6cBUTB3p3c9UA-rjLTqhvXVDII2Mjh2ikL_JBzB2mjpUlfa7yH9q4A/s1600/GUIDs.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxAg_52YqHPhLbipIvRd65oige5FyyklrbL7EL-02X722Nez8XXx9EtZn2vfkXcdnyJxw0l1yPisbKXq6SFuxpz6cBUTB3p3c9UA-rjLTqhvXVDII2Mjh2ikL_JBzB2mjpUlfa7yH9q4A/s640/GUIDs.png" width="640" /></a></div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfqNRFDBq0Jrw6qQvuTgFx23kyoQxzvbhYaOCI-dJjqZG2FSfeAGbO1M-k15uHOneQHfZYpB5oHvRmPCFhe3hmtcG0r08WY1OiPTBj4T60wpVLXg-0uljjJDf-mJ6BzL97I9zYWiGJ3Ig/s1600/GUIDs8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="254" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfqNRFDBq0Jrw6qQvuTgFx23kyoQxzvbhYaOCI-dJjqZG2FSfeAGbO1M-k15uHOneQHfZYpB5oHvRmPCFhe3hmtcG0r08WY1OiPTBj4T60wpVLXg-0uljjJDf-mJ6BzL97I9zYWiGJ3Ig/s640/GUIDs8.png" width="640" /></a></div><br />
Cheers!!<br />
Isha<br />
<div class="separator" style="clear: both; text-align: center;"></div></div>Isha Jainhttp://www.blogger.com/profile/10869794228243405007noreply@blogger.com0tag:blogger.com,1999:blog-3236363911118700344.post-30719564108474214462012-03-08T12:20:00.000+11:002012-03-08T12:20:39.464+11:00Yahoo! User Interface Library and Controls<div dir="ltr" style="text-align: left;" trbidi="on">YUI Library is a free open source JavaScript and CSS framework that helps in building rich interactive web applications.<br />
<br />
More Information is available at : <a href="http://developer/yahoo.com/yui/">http://developer/yahoo.com/yui/</a><br />
<br />
This library contains numerous controls like TabView,ProgressBar,Color Picker, TreeView etc.<br />
<br />
The YUI TreeView control provides rich visual presentation of hierarchical data representation.<br />
<br />
The following line of code will give the tree view output as shown below.<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_z8egl-jbVnGwaT6MCRGmmuBwAe7tqU3OmQt7qknljD83U9ErVwKuOxx9fMZqiyMyDFRuYEQ7xXRDpEEzLm_4ag3mUHOGDxAzGCQjQw0pu2nfkQU5-v9fuNQvflKFLKNE01LP6PV-wtw/s1600/TreeView.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_z8egl-jbVnGwaT6MCRGmmuBwAe7tqU3OmQt7qknljD83U9ErVwKuOxx9fMZqiyMyDFRuYEQ7xXRDpEEzLm_4ag3mUHOGDxAzGCQjQw0pu2nfkQU5-v9fuNQvflKFLKNE01LP6PV-wtw/s1600/TreeView.jpg" /></a></div><br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjO32NoYgt69S4E46aRdRBESiX5aLWM36lMR31dejgS0pPthm3pVtBtlcOyG9b-SAzsD8Vf8cH6acdHW6AFld6gJ57IcM_bnpD063ll3IqWO-kK4u51fbJ3PIWbUwy9Y8QBRcWCrwAJ9SQ/s1600/TreeViewCode.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="432" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjO32NoYgt69S4E46aRdRBESiX5aLWM36lMR31dejgS0pPthm3pVtBtlcOyG9b-SAzsD8Vf8cH6acdHW6AFld6gJ57IcM_bnpD063ll3IqWO-kK4u51fbJ3PIWbUwy9Y8QBRcWCrwAJ9SQ/s640/TreeViewCode.jpg" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"></div><br />
Cheers!!</div>Isha Jainhttp://www.blogger.com/profile/10869794228243405007noreply@blogger.com0tag:blogger.com,1999:blog-3236363911118700344.post-12548598934742673842011-11-28T14:03:00.000+11:002011-11-28T14:03:24.381+11:00Script to Automate the WSP deployment and to activate features<div dir="ltr" style="text-align: left;" trbidi="on">This post is regarding the usage of a simple script to automate the wsp installation and featue activation. Whenever we want to deploy components like custom web parts, custom user control and custom application pages etc. we use sharepoint solution packages for deployment and then we activate the respective features manually. It is a tediou job to install the wsps and activate the features manually, if we have multiple solution packages to be deployed. To automate this, we can use the the following script to install wsp and activate features.<br />
<br />
:begin<br />
@echo off<br />
<br />
set solutionName=Custom.MyTask<br />
set SolutionPath=D:\Custom\Custom.MyTask.wsp<br />
set featureSampleFeature1=Custom.MyTask<br />
set featureSampleFeature2=Custom.MyTaskWPDeployment<br />
set featureSampleFeature3=Custom.MyTask.WebConfigChange<br />
<br />
rem ** Replace this value with the URL of your site **<br />
@set url=http://vsalbtstwfe10:10110<br />
<br />
<br />
@set PATH=C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN;%path% <br />
<br />
stsadm -o retractsolution -name %solutionName%.wsp -immediate<br />
stsadm -o execadmsvcjobs<br />
stsadm -o deletesolution -name %solutionName%.wsp -override<br />
<br />
echo Adding solution %solutionName% to solution store...<br />
echo ----------------------------------------------------<br />
<br />
stsadm -o addsolution -filename %SolutionPath%<br />
if errorlevel == 0 goto :deploySolution<br />
<br />
echo ### Error adding solution %solutionName%<br />
echo .<br />
goto end<br />
<br />
:deploySolution<br />
echo Deploying solution %solutionName%...<br />
echo ----------------------------------------------------<br />
stsadm -o deploysolution -name %solutionName%.wsp -url %url% -immediate -allowGacDeployment -allowCasPolicies -force<br />
stsadm -o execadmsvcjobs <br />
<br />
if errorlevel == 0 goto :activateFeature<br />
<br />
echo ### Error deploying solution %solutionName%<br />
echo .<br />
goto end<br />
<br />
:activateFeature<br />
<br />
echo Activating feature %featureSampleFeature1% in solution %solutionName%...<br />
echo ----------------------------------------------------<br />
<br />
stsadm -o activatefeature -name %featureSampleFeature1% -url %url% -force<br />
<br />
echo Activating feature %featureSampleFeature2% in solution %solutionName%...<br />
echo ----------------------------------------------------<br />
<br />
stsadm -o activatefeature -name %featureSampleFeature2% -url %url% -force<br />
<br />
<br />
echo Activating feature %featureSampleFeature3% in solution %solutionName%...<br />
echo ----------------------------------------------------<br />
stsadm -o activatefeature -name %featureSampleFeature3% -url %url% -force<br />
<br />
if errorlevel == 0 goto :success<br />
<br />
echo ### Error activating features<br />
echo .<br />
goto end<br />
<br />
:success<br />
echo Successfully deployed solution and activated feature(s)..<br />
echo .<br />
goto end<br />
<br />
:end<br />
pause<br />
<br />
<br />
</div>Isha Jainhttp://www.blogger.com/profile/10869794228243405007noreply@blogger.com0