diff --git a/Workflows/Get workflow report for all site collections/README.md b/Workflows/Get workflow report for all site collections/README.md new file mode 100644 index 00000000..b9dda8a0 --- /dev/null +++ b/Workflows/Get workflow report for all site collections/README.md @@ -0,0 +1,206 @@ +Powershell script. Creates a .csv file with a report on all workflows in all site collections, their sites and subsites. + +Before you run the script, open ```.ps1``` file and edit all necessary information: + +```PowerShell +# Paths to SDK. Please verify location on your computer. +Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.dll" +Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.Runtime.dll" + +# Insert the credentials and the name of the admin site +$Username="user@tenant.onmicrosoft.com" +$AdminPassword=Read-Host -Prompt "Password" -AsSecureString +$AdminUrl="https://tenant-admin.sharepoint.com" +$CSVPath="C:\Users\ivo\Desktop\SomePath.csv" +``` + +It requires installed [SharePoint Online SDK](https://www.microsoft.com/en-us/download/details.aspx?id=42038) + +As the script runs you will see how many workflows each list has: + + + +### Sample report + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#TYPE Microsoft.SharePoint.Client.Workflow.WorkflowAssociation                       
Site UrlList TitleAllowManualAssociationDataAutoStartChangeAutoStartCreateBaseIdCreatedDescriptionEnabledHistoryListTitleIdInstantiationUrlInternalNameIsDeclarativeListIdModifiedNameTaskListTitleWebIdContextTagPathObjectVersionServerObjectIsNullTypedObject
https://tenant.sharepoint.comDocumentsTrue<dfs:myFields xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:dms="http://schemas.microsoft.com/office/2009/documentManagement/types" xmlns:dfs="http://schemas.microsoft.com/office/infopath/2003/dataFormSolution" xmlns:q="http://schemas.microsoft.com/office/infopath/2009/WSSList/queryFields" + xmlns:d="http://schemas.microsoft.com/office/infopath/2009/WSSList/dataFields" xmlns:ma="http://schemas.microsoft.com/office/2009/metadata/properties/metaAttributes" xmlns:pc="http://schemas.microsoft.com/office/infopath/2007/PartnerControls" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><dfs:queryFields></dfs:queryFields><dfs:dataFields><d:SharePointListItem_RW><d:Approvers><d:Assignment><d:Assignee><pc:Person><pc:DisplayName>Arleta + Wanat</pc:DisplayName><pc:AccountId>i:0#.f|membership|2190@tenant.onmicrosoft.com</pc:AccountId><pc:AccountType>User</pc:AccountType></pc:Person></d:Assignee><d:Stage xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + /><d:AssignmentType>Serial</d:AssignmentType></d:Assignment><d:Assignment><d:Assignee><pc:Person><pc:DisplayName>Arleta Wanat</pc:DisplayName><pc:AccountId>i:0#.f|membership|2190@tenant.onmicrosoft.com</pc:AccountId><pc:AccountType>User</pc:AccountType></pc:Person></d:Assignee><d:Stage + xsi:nil="true" /><d:AssignmentType>Serial</d:AssignmentType></d:Assignment></d:Approvers><d:ExpandGroups>true</d:ExpandGroups><d:NotificationMessage>hf</d:NotificationMessage><d:DueDateforAllTasks xsi:nil="true" + /><d:DurationforSerialTasks xsi:nil="true" /><d:DurationUnits>Day</d:DurationUnits><d:CC /><d:CancelonRejection>false</d:CancelonRejection><d:CancelonChange>false</d:CancelonChange><d:EnableContentApproval>false</d:EnableContentApproval></d:SharePointListItem_RW></dfs:dataFields></dfs:myFields>FalseFalse8ad4d8f0-93a7-4941-9657-cf3706f00409########Routes a document for approval. Approvers can approve or reject the document, reassign the approval task, or request changes to the document.TrueWorkflow Historye76e75fe-1622-4c26-a5fa-7e6178c61ae9_layouts/15/IniWrkflIP.aspxoo
+
+<Cfg.d3a8e0e9_03da_4f32_99c9_f778c1d5d560.4.512.>
True19e3d565-15c5-4a89-b95a-626b48ff0bcc########ooTask List with 14 elementsb05b85f0-c7fe-4646-ac41-4fde2db44f3bMicrosoft.SharePoint.Client.ClientContextMicrosoft.SharePoint.Client.ObjectPathIdentityFalseMicrosoft.SharePoint.Client.Workflow.WorkflowAssociation
https://tenant.sharepoint.com/nowanowaSite PagesTrue TrueTruedd19a800-37c1-43c0-816d-f8eb5f4a4145########Manages document expiration and retention by allowing participants to decide whether to retain or delete expired documents.TrueWorkflow History139a534e-abe6-4862-b19e-895eac1e0cbcmjyfFalsec6e865a5-b992-4a51-ba25-9ecd76ba336f########mjyfTasks0a2bec62-9fd7-44a4-b1bb-eacc553b3cd2Microsoft.SharePoint.Client.ClientContextMicrosoft.SharePoint.Client.ObjectPathIdentityFalseMicrosoft.SharePoint.Client.Workflow.WorkflowAssociation
https://tenant.sharepoint.com/newSiteCollectionDocumentsTrue TrueTruedd19a800-37c1-43c0-816d-f8eb5f4a4145########Manages document expiration and retention by allowing participants to decide whether to retain or delete expired documents.TrueWorkflow Historye9dd54d1-27db-4ca9-8a84-6266ab3e824fapp2False62a23f97-fe21-4142-b485-9805474162b1########app2Tasks051be499-7633-4837-a3d6-68fc68ca0bcbMicrosoft.SharePoint.Client.ClientContextMicrosoft.SharePoint.Client.ObjectPathIdentityFalseMicrosoft.SharePoint.Client.Workflow.WorkflowAssociation
https://tenant.sharepoint.com/vs20072153Site PagesTrue TrueTruedd19a800-37c1-43c0-816d-f8eb5f4a4145########Manages document expiration and retention by allowing participants to decide whether to retain or delete expired documents.TrueWorkflow Historyc7cd1221-4dd7-4e0c-953b-aee71519116buoiioFalse545e45b7-6c2d-4378-9d23-cd08acf7ce19########uoiioTasksd7275f5e-6ec5-4f67-a817-dc3d694027edMicrosoft.SharePoint.Client.ClientContextMicrosoft.SharePoint.Client.ObjectPathIdentityFalseMicrosoft.SharePoint.Client.Workflow.WorkflowAssociation
https://tenant.sharepoint.com/TeamsitewithListsGeneric List With GeolocationColumnFalse 
+ +### Related scripts + + +[Get workflow report for one site](https://gallery.technet.microsoft.com/scriptcenter/Get-workflow-report-for-one-a326c22b) + +[Get workflow report for a site collection](https://gallery.technet.microsoft.com/scriptcenter/Get-workflow-report-for-a-c9c50672)