Scripts/PWPS_DAB_DemoScript.ps1
Import-Module -Name pwps_dab -Verbose Open-PWConnection -DatasourceName DurhamAlias:NewSource -UserName pwadmin -Password pwadmin -Admin #Import-PWDocumentsBySpreadsheet -InputFile 'D:\_testExports\Metadata2.xlsx' -DefaultStorage Storage1 #$hash2 = @{Title = "My new title"; "Dwg_no" = "00000" } #Get-PWDocumentsBySearch -FolderPath 'Import Test PowerShell\Import Test' -GetVersionsToo | Update-PWDocumentAttributes -Attributes @{Title = "55 My new title"; Dwg_no = "00007"; SomeNumber = "555" } #Copy-PWFilesBySearch -SearchName "Airports 2" -FolderPath "Projects\From Mobile App\Copy Target" -Verbose #Remove-PWDocumentsBySearch -SearchName "Airports 2" -Verbose #Close-PWConnection #Get-PWRichProjectReport -OutputFileName c:\temp\richprojectreport0516B.xlsx -Verbose #New-PWRichProjectsFromSpreadsheet -InputFileName c:\temp\richprojectreport0516.xlsx -DefaultNewParentPath "Path Not Specified" -DefaultTemplateName "Civil Template" -DefaultStorageArea "Storage 2" #Get-PWRichProjects -FolderPath "PWPS Connected Project Test 2" | select {$_.ProjectProperties["PROJECT_Location"]} #New-PWRichProjectsFromSpreadsheet -InputFileName C:\temp\richprojectreport14.xlsx -DefaultNewParentPath "New Projects\Path Not Specified" -DefaultTemplateName "Civil" -DefaultStorageArea "Storage 2" -BlockSizeInSeconds 0.5 #Close-PWConnection #Set-PWUserRichProjectRights -UserName User1 -ProjectAccess ALL -Verbose #Get-PWGroupMember -GroupID 3 | Set-PWUserDisabled #$userObj = Get-PWUser -UserID 12 #Set-PWUserEnabled $userObj #Get-PWUser | Set-PWUserDisabled #Get-PWUser | Set-PWUserEnabled #Get-PWUserByLastLogin -DaysAgo 365 | Set-PWUserEnabled #Get-PWRichProjectReport -OutputFileName c:\temp\testreport4.xlsx #Get-PWDocumentsBySearch -SearchName "Bathrooms 1" | Update-PWDocumentProperties #Get-PWUserByLastLogin | where {$_.Description -eq "U2"} | select UserID, UserName #Get-PWUserByLastLogin -DaysAgo 365 | where {$_.Disabled -eq $False} | select Email, UserID, UserName, LastLogin #Get-PWStatistics | Select DatasourceName, LastUpdated, USER_COUNT, USERS_INACTIVE_30, USERS_INACTIVE_60 #Get-PWFolders -FolderPath 'PowerShell Test\Projects\Project 21' | Remove-PWFolder -RemoveFoldersBrutally -FullPathToFileRemovalScript 'c:\temp\removefilesx3.bat' -ProceedWithDelete -UseAdminPaths #Get-PWFolders -FolderPath 'PowerShell Test\Projects\Project 21' | Set-PW #Get-PWStatistics #Set-PWUserNewNameAndDomain -UserName Bono -Domain brumd09515rem -NewUserName LogicalBono -ChangeToLogical -PasswordPrefix lucifer #Get-PWRichProjectReport -OutputFileName c:\temp\richprojectreport17.xlsx -Verbose #New-PWRichProjectsFromSpreadsheet -InputFileName "C:\Users\dave.brumbaugh\Documents\PWPSScript01.xlsx" -DefaultNewParentPath "New Projects" -DefaultTemplateName Civil #New-PWRichProjectsFromSpreadsheet -InputFileName "C:\Users\dave.brumbaugh\Documents\PWPSScript01.xlsx" -DefaultNewParentPath "New Projects" -DefaultTemplateName Civil -DefaultStorageArea "Storage 2" #Get-PWRichProjectStateCount -KeyProjectProperty PROJECT_Project_Number #Get-PWRichProjectScalar -KeyProjectProperty PROJECT_Project_Number -DocumentAttributeName PctComplete #Get-PWFolders -FolderPath "MicroStation V8 XM Edition" -JustOne | Get-PWFolderTreeDocumentStateCount #Get-PWFolders -FolderPath "MicroStation V8 XM Edition" -JustOne | Get-PWFolderTreeScalar -DocumentAttributeName PctComple #Export-PWDocuments -ProjectWiseFolder "From Spreadsheet" -OutputFolder "d:\Export Test From Spreadsheet" -ExportMetadata -ExportVersions -ExportMetaDataFile "D:\From Spreadsheet.xlsx" #Export-PWDocuments -ProjectWiseFolder "From Spreadsheet\New Building Folders\Project D" -OutputFolder "d:\Export Test From Spreadsheet" -ExportMetadata -ExportVersions -ExportMetaDataFile "D:\From Spreadsheet.xlsx" #Export-PWDocuments -ProjectWiseFolder "From Spreadsheet\New Building Folders\Project D" -OutputFolder "d:\Export Test From Spreadsheet 8" -ExportMetadata -ExportVersions -ExportMetaDataFile "D:\From Spreadsheet8.xlsx" #Import-PWDocumentsBySpreadsheet -InputFile 'D:\From Spreadsheet 6.xlsx' -TargetProjectWiseFolder 'Import from Spreadsheet' -DefaultStorage 'Storage 3' -DefaultWorkflow 'Default Workflow' -DefaultEnvironment 'Titleblock' #Export-PWDocuments -ProjectWiseFolder "MicroStation V8 XM Edition\Plant" -OutputFolder "d:\Export Test From Spreadsheet 23" -ExportMetadata -ExportVersions -ExportMetaDataFile "D:\From Spreadsheet23.xlsx" |