#PowerShell, #PowerWiseScripting, #ProjectWise, PWPS_DAB

How To: Free Documents Not Checked In

Here is a simple way to obtain all ProjectWise documents within a Project that are not checked in, and then free them.

The Get-PWDocumentsBySearch will return all ProjectWise documents within the specified folder and all sub-folders that do not match the Document Status ‘Checked In’. The returned document objects will then be piped to the CheckIn-PWDocumentsOrFree cmdlet and finally freed.

# Folder Containing documents to free.
$PWFolder = 'Test'
Get-PWDocumentsBySearch -FolderPath $PWFolder -Slow -Verbose |
Where-Object { $_.DocumentStatus -ne 'Checked In' } |
CheckIn-PWDocumentsOrFree -Free -Verbose

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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s