Friday, November 8, 2013
Monday, November 4, 2013
Powershell script to go through all lists in a website and update the field value if a field exists
##Go through all lists in a website and update the field value if a field exists
$web = get-spweb http://webSite/ITSprojects/ERP/
foreach ($list in $web.lists)
{
if( $list.Fields.ContainsField("Required for Round 6") -eq $true)
{
Write-Host "Required for Round 6 found and updating value in " $list.title
$listItms = $list.Items
foreach ($item in $listItms)
{
$item["Required for Round 6"]="0";
$item.Update();
}
Write-Host "Required for Round 6 update completed-------" $list.title
}
else
{
Write-Host "Required for Round 6 not found in " $list.title
}
if( $list.Fields.ContainsField("Round 6 Result") -eq $true)
{
Write-Host "Round 6 Result found and updating value in " $list.title
$listItms = $list.Items
foreach ($item in $listItms)
{
$item["Round 6 Result"]="Not Tested";
$item.Update();
}
Write-Host "Round 6 Result update completed-------" $list.title
}
else
{
Write-Host "Round 6 Result not found in " $list.title
}
}
$web = get-spweb http://webSite/ITSprojects/ERP/
foreach ($list in $web.lists)
{
if( $list.Fields.ContainsField("Required for Round 6") -eq $true)
{
Write-Host "Required for Round 6 found and updating value in " $list.title
$listItms = $list.Items
foreach ($item in $listItms)
{
$item["Required for Round 6"]="0";
$item.Update();
}
Write-Host "Required for Round 6 update completed-------" $list.title
}
else
{
Write-Host "Required for Round 6 not found in " $list.title
}
if( $list.Fields.ContainsField("Round 6 Result") -eq $true)
{
Write-Host "Round 6 Result found and updating value in " $list.title
$listItms = $list.Items
foreach ($item in $listItms)
{
$item["Round 6 Result"]="Not Tested";
$item.Update();
}
Write-Host "Round 6 Result update completed-------" $list.title
}
else
{
Write-Host "Round 6 Result not found in " $list.title
}
}
Friday, November 1, 2013
Display Native mode in SharePoint
To display SSRS reports running in native (Not Integrated mode) we have to follow these steps
For Integrated mode, it is pretty straight forward.Intergrated mode is recommended way to go for most of scenarios.
For the native mode reports showing them is not straight forward
- Copy RSWebPArts.cab found in \\DatabaseServer\c$\Program Files (x86)\Microsoft SQL Server\100\Tools\Reporting Services\SharePoint to SharePoint server.
- Run following stsadm command or equivalent Powershell command
STSADM.EXE -o addwppack -filename "local directory\RSWebParts.cab" -globalinstall
Install-SPWebPartPack -LiteralPath "localdirectory/RSwebparts.cab" -GlobalInstall
- In the sharePoint page that you want to show the report, clikc on page -> Edit to edit page
- Insert Report viewer webpart by selecting it from Miscellaneous group
- Edit the webpart and enter the URL for Reports, for ex: http://RSserver/Reports
- and in the ReportPath enter /Report (without the .RDL extension)
Monday, October 28, 2013
Anonymous access to a site
- Goto Central and click on Webapplication in which you want anonymous access
- Click on Authentication Providers and click on Default Zone
- Select "Enable Anonymous Access
- click OK
- click on Anonymous Policy
- and select "Deny - Write" in my case I dont want anonymous users to modify the site.
- select the site in the webapplication which you want "Anonymous access" enabled and got Site Permissions. Clikc on "Anaonymous Access " button on top
- Choose "Entire Website" and click OK.
Friday, October 25, 2013
Integration of Project Server with Team Foundation Server in simple steps and solutions to most common issues
Integration of Project Server 2010,
TFS 2010 tips and tricks - Part 1
- Softwares required
TFS 2010 server (with SP1), Visual
Studio 2010 (with SP1), Project Professional 2010, Project Server 2010
(with SP1), make sure the webapp for the instance of PWA is set to classic mode
authentication. The way to check it is
PS
C:\Users\PS_FarmAdmin_SVC> $web = Get-SpWebApplication
"http://mismsprojsrv/"
PS
C:\Users\PS_FarmAdmin_SVC> $web.UseClaimsAuthentication
False {False value
indicates that is classic mode, not claims based}
Need to download 64-bit Feature Pack
for TFS and Project Server integration. We already had couple of Visual Studio
Ultimate licenses , so we could download it from MSDN.
- Modify the
C:\inetpub\wwwroot\wss\VirtualDirectories\80\web.config for SharePoint
site of Project server (My webapp for PS was running on port 80). Add
dependentAssembly for Project.Server.Library
<runtime>
<assemblyBinding
xmlns="urn:schemas-microsoft-com:asm.v1">
...........
................
<dependentAssembly xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity name="Microsoft.Office.Project.Server.Library"
publicKeyToken="71e9bce111e9429c" culture="neutral" />
<bindingRedirect oldVersion="12.0.0.0"
newVersion="14.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
- If you Project server was installed on existing farm on
multiple application servers of the farm, Run the SharePoint configuration
wizard on all of them. If you have an independent server for Project
server, you just run the wizard on that server after all the updates and
SP's are installed.
- I create a separate PWA called PEIMS for this
- Goto SharePoint Admin,
Project Server Service application
- Create Project WebApp Site PWAPEIMS
- I also created a Project called "Magnet" in
Project Professional and published it to Project Server
- Created a Team Project Collection, using the create
Team Project collection on TFS Admin Console
·
The TFS server URL is http://mistfs:8080/tfs, the URL for the Project Web App instance used for this integration is http://mismsprojsrv/PWAPEIMS/ and the team project collection we are going
to use is http://mistfs:8080/tfs/PEIMS
·
This is the most important part of
the integration, Tasks in Project Server are synchronized with types of work
items in TFS
o
Team project types of work items to
synchronize Project server tasks. Let’s synchronize User Stories and Tasks, as
those are the most common types that are synchronized in team projects that are
based on the process template for agile projects.
o
The synchronization and field
mapping are specified in Part 2 and posted separately in the Part #2.
Friday, February 8, 2013
Powershell script to modify links in SharePoint 2010 list
#To change List Items with Hyperlinks
$webURL = "http://website URL/"
$listName = "VendorContracts"
$fieldName = "File Link"
$web = Get-SpWeb $webURL
$list = $web.Lists[$listName]
foreach ($item in $list.Items)
{
$url = $item[$fieldName]
write-host $url
$url = $url -replace "string to be replace" , "new string"
$item[$fieldName] = $url
$item.Update()
write-host $item[$fieldName]
}
Subscribe to:
Posts (Atom)