Home > EPM, Project Server, Project Server 2010, PS2010 > #ProjectServer 2010 / 2007 high-level Audit Export via #PowerShell #MSProject #PS2010 #EPM

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

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:

$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 "|"

For the full post please see:

http://pwmather.wordpress.com/2012/03/05/projectserver-2010-2007-high-level-audit-export-via-powershell-msproject-ps2010-epm/