#PowerShell, #PowerWiseScripting, #ProjectWise, PWPS_DAB

How To: Free Documents Not Checked In

Be sure to check out my Scripting4Crypto initiative. It’s a fun way to get into using cryptocurrencies all while getting your PowerShell needs met.

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.