Trying to clean up our Applications list and I'd like to be able to change the application on files in Final status (without first removing the status) and on older versions.
Set-PWDocumentState allows this with 2 attributes:
I'd like both those options on Set-PWDocumentApplication. Same caveat of requiring admin would apply.
I agree, this would be very helpful with clean up.
The switches -ChangeVersionApplications and -ChangeFinalStatusApplications have been added to the Set-PWDocumentApplication cmdlet in the latest release of PWPS_DAB (188.8.131.52). They function as requested.
Mark Weisman | Bentley Systems
Thanks. What is the fastest way to get the application association of a collection of documents?
Get-PWDocumentsBySearch -GetAttributes will fill in the ApplicationID & ApplicationName for each document. So does -Slow but -PopulatePath does not. GetAttributes seems the faster one in my limited testing.
If you want to search for documents by the application name Get-PWDocumentsBySearchExtended can do it. It automatically fills in the ApplicationID and ApplicationName.
$pwDocs = Get-PWDocumentsBySearchExtended -Applications 'OpenRoads Designer'
Don't forget to include -GetVersionsToo if you want to change the application on versions as well.
I couldn't find a way with Get-PWDocumentsBySearchExtended to search on documents that have no application assigned. I tried $null, the empty string '', and '<none>'
Give this a try:
$pwDocs = Get-PWDocumentsBySearchExtended | Where-Object ApplicationName -eq $null