Feeds:
Posts
Comments

Archive for September, 2012


Just wanted to share this link, in case you have started testing / working on 2013 & breaking your head on some issue which might be a known issue 😉

Project Server :: http://office.microsoft.com/en-us/help/project-server-2013-known-issues-HA102919020.aspx

Sharepoint Server :: http://office.microsoft.com/en-us/help/sharepoint-server-2013-known-issues-HA102919021.aspx

Read Full Post »


Yet another topic 🙂

Okay so there are many ways to do it even within powershell, for example use the project server commandlets & the same task i have done below in no of steps can be done in very short, however the idea to do this post is to showcase detailed way on how powershell can be leveraged to consume web services & relevant methods, so here it goes, have fun

This article can be also found at : http://gallery.technet.microsoft.com/office/Autopublish-All-Projects-3dc55f13


<#

Autopublish All Project Server Projects 🙂

#Author : : Sunil Kumar Singh

#>

<strong>CLS</strong>

# Set your variables

$PWAUrl = "http://ServerName/PWA"

# initiate the PSI Web Services

#Project Web Service

$ProjSvcURL = $PWAUrl + "/_vti_bin/PSI/Project.asmx?wsdl"

$ProjSvcProxy = <strong>New-WebServiceProxy</strong> <em>-uri</em> $ProjSvcURL <em>-useDefaultCredential</em> #-credential $Credential

#Queue web service

$QSvcUrl = $pwaUrl + "/_vti_bin/PSI/QueueSystem.asmx?wsdl"

$QSvcProxy = <strong>New-WebServiceProxy</strong> <em>-uri</em> $QSvcUrl <em>-useDefaultCredential</em> #-credential $Credential

#Create Dataset & Fill with Project List

$projDataSet = <strong>New-Object</strong> Microsoft.PowerShell.Commands.NewWebserviceProxy.AutogeneratedTypes.WebServiceProxy1_vti_bin_PSI_Project_asmx_wsdl.ProjectDataSet

$projDataSet = $ProjSvcProxy.ReadProjectList()

$PrjDS = $projDataSet.Project

#$projDataSet.Tables[0].Rows.Count

#CheckOut Project & Publish the Project#

foreach ($p in $PrjDS)

{

<strong>Write-host</strong> <em>-ForegroundColor</em> green  $p.PROJ_NAME ":: is being Checked Out for publishing" <strong>`</strong>

#Not required, just for illustration in case you would want to use it for update etc..

#$ProjSvcProxy.CheckOutProject($p.PROJ_UID, [System.Guid]::NewGuid(), "Checkout For AutoPublish via Powershell");

sleep 2

<strong>Write-host</strong> <em>-ForegroundColor</em> red  $p.PROJ_NAME ":: Will be published now, you may check the queue" <strong>`</strong>

$ProjSvcProxy.QueuePublish([System.Guid]::NewGuid(),$p.PROJ_UID, $true,"");

sleep 2

#$ProjSvcProxy.QueueCheckInProject([System.Guid]::NewGuid(),$p.PROJ_UID,$true,[System.Guid]::NewGuid(),"Checkin Post Autopublish");

<strong>Write-host</strong> <em>-ForegroundColor</em> yellow  $p.PROJ_NAME ":: is being checked in now" <strong>`</strong>

}

Read Full Post »


Often we are faced with situation where in we need to update certain list values to reflect new values 🙂 this time we had a requirement wherein we needed to replace item values in a list with an updated value, though there are many ways to do it for instance using sharepoint API or object model & use code to get it done 🙂 However interestingly we this time i thought of using powershell command to perform the same & i had to write a very small script to get the job done & here it goes

$sites = Get-SPSite ‘http://ServerName/PWA&#8217; | Get-SPWeb -Limit All
Foreach($site in $sites)
{
$site.title

$list = $site.Lists.TryGetList(“Risks”)

#Get all items in this list and save them to a variable
$items = $list.items

Foreach($item in $items)
{
#If the “Column” column value equals “Specified Value” Update with new Value
if($item[“Column Name”] -eq “Specified Value”)
{
#Change the value of the “Column Name” column
$item[“Column Name”] = “New Value”
#Update the item
$item.Update()

#Use this Optional Code to add new column to current list

#$myField = $list.Fields.Add(“Test5”, “Text”, 0)

#$list.Fields[$myField].Update()

#Write-host -ForegroundColor green “Column has been added”

}

}

}

Read Full Post »