#ProjectServer 2013 / 2010 / 2007 high-level Audit Export via #PowerShell #MSProject #PS2010 #EPM

March 5, 2012 at 6:15 pm | Posted in Add-on, Administration, PowerShell, PSI, Reporting | 1 Comment
Tags: , , , , , , ,

Quite often there is a request for audit information from Project Server but unfortunately there is nothing available out of the box. This post covers a very high-level solution to this using the Project Server PSI and PowerShell.

Most actions in Project Server are processed via the Project Server queue, one simple way to get high-level audit information is to extract the queue information. The following PowerShell script uses the ReadAllJobStatusSimple method from the Queue System web service to export yesterdays processed jobs into a txt file with yesterday date appended to the filename:

The script can be downloaded from the script center:

http://gallery.technet.microsoft.com/scriptcenter/Server-2010-High-level-e9c6ad09

$Today = Get-Date
$Yesterday = $Today.AddDays(-1).ToString(“yyyy-MM-d”)
$Filename = “C:\PSAuditExport\QueueExport-”
$filetype = “.txt”
$svcPSProxy = New-WebServiceProxy -uri “http://vm353/pwa/_vti_bin/PSI/QueueSystem.asmx?wsdl” -useDefaultCredential
$svcPSProxy.ReadAllJobStatusSimple(“$Yesterday 00:00:01”, “$Yesterday 23:59:59”, “200”, “0”, “QueueCompletedTime” ,”Ascending”).Status | Export-CSV $Filename$Yesterday$filetype -Delimiter “|”

Update the filename variable and PWA URL, save the script and execute using a batch file that is scheduled via the Windows task scheduler sometime after midnight to get yesterdays jobs. An example command needed in the batch file is below:

“%SYSTEMROOT%\system32\windowspowershell\v1.0\powershell.exe” -command “& ‘C:\QueuejobstatusAudit.ps1′”

Once executed this will export all of the jobs for that day to a text file in the specified location, in this case C:\PSAuditExport as shown below:

image

An example export looks like this:

image

The export could then be used for auditing purposes. For example, to see who saved or published a particular project you could search for the Project GUID in the export file and find the GUID’s of the Resources / users that saved or published that project on that particular day.

This is a very simple solution that I put together for the purpose of this post, this could be taken a lot further and made into a production solution.

Advertisements

1 Comment »

RSS feed for comments on this post. TrackBack URI

  1. […] https://pwmather.wordpress.com/2012/03/05/projectserver-2010-2007-high-level-audit-export-via-powersh… Rate this: EmailLike this:LikeBe the first to like this post. Categories: EPM, Project Server, Project Server 2010, PS2010 Tags: Project 2007, Project 2010, Project Server 2007, Project Server 2010, PS2007, PS2010 Comments (0) Trackbacks (0) Leave a comment Trackback […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.
Entries and comments feeds.

%d bloggers like this: