I have about 1000 processes in my MS Dynamics CRM, in the Workflow, Active and Business Process categories.
These processes are currently assigned to different users but I want to reassign all of them to "System Account"
I was able to query for all the processes with the following function :
function getProcess() { $ErrorActionPreference = "ignore"; $processes = @("Workflow", "Action", "BusinessProcessFlow") $URL = "xxxxxxxxxxxxxxxxxxxxx"; Connect-CrmOrganization -Name "xxxxxxxxx" foreach($process in $processes){ Get-CrmProcess -ProcessType $process | Out-File .\output.txt -Append } }
I can filter all the processes that are not assigned to the "System Account"
upon further research, when i pipe
get-crmprocess -Id xxxxxxxxxxx | get-member, i get the following :
ownerid ............ Property System.Object ............... ownerid {get;set;}
owninguser .............. Property System.Object .............. owninguser {get;set;}
which means these values can be set from the powershell command line
My challenge now is, what would be the way to access the "Owner" parameter of each individual process from the list and reassign to "System Account"