19. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 11/9/2018 12:16:34 PM Eastern Standard Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

19.1 Files compared

# Location File Last Modified
1 RAMS-2.3.0.zip\RAMS-2.3.0\ps getWorkflows.V3.ps1 Tue Aug 21 23:34:48 2018 UTC
2 RAMS-2.3.0.zip\RAMS-2.3.0\ps getWorkflows.V3.ps1 Thu Nov 8 21:18:20 2018 UTC

19.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 2 418
Changed 1 2
Inserted 0 0
Removed 0 0

19.3 Comparison options

Whitespace
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Not shown in the comparison detail

19.4 Active regular expressions

No regular expressions were active.

19.5 Comparison detail

  1   <#
  2  
  3   .SYNOPSIS
  4       report s all Site  and List  Workflows  from Share Point.
  5  
  6   .DESCRIPTI ON
  7       Loops  through al l the webs , building  a list of  all the w orkflows p resent and  prints th e subscrip tion and 
  8       defini tion from  the workfl ow manager .
  9  
  10   .EXAMPLE
  11       #when  run from d eploymentD river.ps1
  12       Run-Sc ript 450 g etWorkflow s.V3.ps1
  13  
  14  
  15   .EXAMPLE
  16       #when  run from c ommand lin e
  17       .\getW orkflows.V 3.ps1
  18   #>
  19   $StopWatch  = [System .Diagnosti cs.Stopwat ch]::Start New()
  20   #$url = "h ttps:// DNS . URL /sites/IRB Applicatio ns"
  21  
  22   if ((get-m odule | Wh ere-Object ({$_.Name  -eq 'RAMS_ Module_Uti l'}) ) -eq  $null) {
  23       if ($G lobal:dire toryName - eq $null) 
  24           $G lobal:dire toryName =  "D:\RAMS- 2.3.0\LogF iles"
  25           $G lobal:logF ileName =  "getWorkfl ows.V3.log "
  26           Im port-Modul e .\module \RAMS_Modu le_Util.ps d1
  27       }
  28   }
  29  
  30   $url = (Ge t-SiteWeb) .Url
  31   $site=Get- SPSite($ur l);
  32   $deploymen ts = New-O bject Syst em.Collect ions.Array List
  33   $subscript ions = New -Object Sy stem.Colle ctions.Arr ayList
  34   $featureTo Delete = @ {}
  35  
  36       #write -log -mess age "Web`t Definition .DisplayNa me`tSubscr iptionName `tSPDConfi g.StartOnC reate`tSPD Config.Sta rtManually `tSPDConfi g.StartOnC hange`tWSP ublishStat e" -consol eForegroun d Cyan
  37  
  38   foreach($w eb in $sit e.AllWebs) {
  39       #write -log -mess age "Workf lows in we b $web" -c onsoleFore ground Yel low
  40       $wfm =  New-objec t Microsof t.SharePoi nt.Workflo wServices. WorkflowSe rvicesMana ger($web)
  41       $wfds  = $wfm.Get WorkflowDe ploymentSe rvice()
  42           $w fss =$wfm. GetWorkflo wSubscript ionService ()
  43       #$wfis =$wfm.GetW orkflowIns tanceServi ce()
  44  
  45       #write -log -mess age " " -c onsoleFore ground Yel low
  46       #write -log -mess age "Workf low Subscr iptions" - consoleFor eground Ye llow
  47       $wfDef s = $wfss. EnumerateS ubscriptio ns()
  48       foreac h ($wfDef  in $wfDefs ){
  49           #$ wfDef.prop erties
  50           #$ hash = @{" [Definitio n.DisplayN ame]"=$wfD ef.propert ies['Defin ition.Disp layName']; "[Subscrip tionName]" =$wfDef.pr operties[' Subscripti onName'];" [WSPublish State]"=$w fDef.prope rties['WSP ublishStat e'];"[SPDC onfig.Star tOnCreate] "=$wfDef.p roperties[ 'SPDConfig .StartOnCr eate'];"[S PDConfig.S tartOnChan ge]"=$wfDe f.properti es['SPDCon fig.StartO nChange']; "[SPDConfi g.StartMan ually]"=$w fDef.prope rties['SPD Config.Sta rtManually ']}
  51           #$ coll = @{" [$item]",
  52           #N ew-Object  PSObject - Property $ hash | Sel ect-Object  -Property  Definitio n.DisplayN ame, Subsc riptionNam e, SPDConf ig.StartOn Create, SP DConfig.St artManuall y, SPDConf ig.StartOn Change, WS PublishSta te | Sort  Definition .DisplayNa me | Forma t-Table -W rap
  53           #w rite-log - message "$ ($web)`t$( $wfDef.pro perties['D efinition. DisplayNam e'])`t$($w fDef.prope rties['Sub scriptionN ame'])`t$( $wfDef.pro perties['S PDConfig.S tartOnCrea te'])`t$($ wfDef.prop erties['SP DConfig.St artManuall y'])`t$($w fDef.prope rties['SPD Config.Sta rtOnChange '])`t$($wf Def.proper ties['WSPu blishState '])" -cons oleForegro und Gray
  54           #$ wfds.Delet eDefinitio n($wfDef.I d)
  55           $o utput = Ne w-Object - TypeName " System.Obj ect";
  56                    Add- Member -In putObject  $output -M emberType  NoteProper ty -Name " WebName" - Value "";
  57                    Add- Member -In putObject  $output -M emberType  NoteProper ty -Name " DisplayNam e" -Value  "";
  58                    Add- Member -In putObject  $output -M emberType  NoteProper ty -Name " Definition Id" -Value  "";
  59                    Add- Member -In putObject  $output -M emberType  NoteProper ty -Name " Id" -Value  "";
  60                    Add- Member -In putObject  $output -M emberType  NoteProper ty -Name " StatusFiel dName" -Va lue "";
  61                    Add- Member -In putObject  $output -M emberType  NoteProper ty -Name " pdGUID" -V alue "";
  62                    Add- Member -In putObject  $output -M emberType  NoteProper ty -Name " ActivatedL istName" - Value "";
  63                    Add- Member -In putObject  $output -M emberType  NoteProper ty -Name " WSPublishS tate" -Val ue "";
  64                    Add- Member -In putObject  $output -M emberType  NoteProper ty -Name " WSEnabled"  -Value "" ;
  65                    $out put.WebNam e = $web.N ame
  66                    $out put.Displa yName = $w fDef.Name
  67                    $out put.Defini tionId = $ wfDef.Defi nitionId
  68                    $out put.Id = $ wfDef.Id
  69                    $out put.Status FieldName  = $wfDef.S tatusField Name
  70                    $out put.pdGUID  = $wfDef. PropertyDe finitions[ 'GUID']
  71                    $out put.Activa tedListNam e = $wfDef .PropertyD efinitions ['Microsof t.SharePoi nt.Activat ionPropert ies.ListNa me']
  72                    $out put.WSPubl ishState =  $wfDef.Pr opertyDefi nitions['W SPublishSt ate']
  73                    $out put.WSEnab led = $wfD ef.Propert yDefinitio ns['WSEnab led']
  74           $s ubscriptio ns.Add($ou tput) | Ou t-Null
  75  
  76           $f eatureToDe lete[$wfDe f.Name] =  $wfDef.Def initionId   
  77           
  78           <#
  79           $w fss.Delete Subscripti on($wfDef. Id)
  80           if ($wfss.Get Subscripti on($wfDef. Id) -ne $n ull) {
  81                write-lo g -message  " Delete  subscripti on of $($w fDef.Name)  on site $ ($web.Name ) FAILED"  -consoleFo reground R ed
  82           }  else {
  83                write-lo g -message  " Delete  subscripti on of $($w fDef.Name)  on site $ ($web.Name ) SUCCEEDE D" -consol eForegroun d Green
  84           }
  85           #>
  86  
  87       }
  88  
  89       $wfDef s = $wfds. EnumerateD efinitions ($false)
  90       #write -log -mess age "Workf low Deploy ments" -co nsoleForeg round Yell ow
  91       foreac h ($wfDef  in $wfDefs ){
  92           #$ wfDef.prop erties
  93           #$ hash = @{" [Definitio n.DisplayN ame]"=$wfD ef.propert ies['Defin ition.Disp layName']; "[Subscrip tionName]" =$wfDef.pr operties[' Subscripti onName'];" [WSPublish State]"=$w fDef.prope rties['WSP ublishStat e'];"[SPDC onfig.Star tOnCreate] "=$wfDef.p roperties[ 'SPDConfig .StartOnCr eate'];"[S PDConfig.S tartOnChan ge]"=$wfDe f.properti es['SPDCon fig.StartO nChange']; "[SPDConfi g.StartMan ually]"=$w fDef.prope rties['SPD Config.Sta rtManually ']}
  94           #$ coll = @{" [$item]",
  95           #N ew-Object  PSObject - Property $ hash | Sel ect-Object  -Property  Definitio n.DisplayN ame, Subsc riptionNam e, SPDConf ig.StartOn Create, SP DConfig.St artManuall y, SPDConf ig.StartOn Change, WS PublishSta te | Sort  Definition .DisplayNa me | Forma t-Table -W rap
  96           #w rite-log - message "$ ($web)`t$( $wfDef.pro perties['D efinition. DisplayNam e'])`t$($w fDef.prope rties['Sub scriptionN ame'])`t$( $wfDef.pro perties['S PDConfig.S tartOnCrea te'])`t$($ wfDef.prop erties['SP DConfig.St artManuall y'])`t$($w fDef.prope rties['SPD Config.Sta rtOnChange '])`t$($wf Def.proper ties['WSPu blishState '])" -cons oleForegro und Gray
  97           #$ wfds.Delet eDefinitio n($wfDef.I d)
  98                    $out put = New- Object -Ty peName "Sy stem.Objec t";
  99                    Add- Member -In putObject  $output -M emberType  NoteProper ty -Name " WebName" - Value "";
  100                    Add- Member -In putObject  $output -M emberType  NoteProper ty -Name " DisplayNam e" -Value  "";
  101                    Add- Member -In putObject  $output -M emberType  NoteProper ty -Name " Definition Id" -Value  "";
  102                    Add- Member -In putObject  $output -M emberType  NoteProper ty -Name " Subscripti onName" -V alue "";
  103                    Add- Member -In putObject  $output -M emberType  NoteProper ty -Name " Subscripti onId" -Val ue "";
  104                    Add- Member -In putObject  $output -M emberType  NoteProper ty -Name " StartOnCre ate" -Valu e "";
  105                    Add- Member -In putObject  $output -M emberType  NoteProper ty -Name " StartOnCha nge" -Valu e "";
  106                    Add- Member -In putObject  $output -M emberType  NoteProper ty -Name " StartManua lly" -Valu e "";
  107                    Add- Member -In putObject  $output -M emberType  NoteProper ty -Name " WSPublishS tate" -Val ue "";
  108                    Add- Member -In putObject  $output -M emberType  NoteProper ty -Name " GUID" -Val ue "";
  109                    $out put.WebNam e = $web.N ame
  110                    $out put.Displa yName = $w fDef.prope rties['Def inition.Di splayName' ]
  111                    $out put.Defini tionId = $ wfDef.prop erties['De finition.I d']
  112                    $out put.Subscr iptionName  = $wfDef. properties ['Subscrip tionName']
  113                    $out put.Subscr iptionId =  $wfDef.pr operties[' Subscripti onId']
  114                    $out put.StartO nCreate =  $wfDef.pro perties['S PDConfig.S tartOnCrea te']
  115                    $out put.StartO nChange =  $wfDef.pro perties['S PDConfig.S tartOnChan ge']
  116                    $out put.StartM anually =  $wfDef.pro perties['S PDConfig.S tartManual ly']
  117                    $out put.WSPubl ishState =  $wfDef.pr operties[' WSPublishS tate']
  118                    $out put.guid =  $wfDef.pr operties[' GUID']
  119           $d eployments .Add($outp ut) | Out- Null
  120           
  121           $f eatureToDe lete[($wfD ef).proper ties['Defi nition.Dis playName'] ] = $wfDef .propertie s['Definit ion.Id']  
  122           
  123           <#
  124           $w fds.Delete Definition (($wfDef). properties ['Definiti on.Id'])
  125           if ($wfds.Get Definition (($wfDef). properties ['Definiti on.Id']) - ne $null)  {
  126                write-lo g -message  " Delete  definition  of $($wfD ef.propert ies['Defin ition.Disp layName'])  on site $ ($web.Name ) FAILED"  -consoleFo reground R ed
  127           }  else {
  128                write-lo g -message  " Delete  definition  of $($wfD ef.propert ies['Defin ition.Disp layName'])  on site $ ($web.Name ) SUCCEEDE D" -consol eForegroun d Green
  129           }
  130           #>
  131       }
  132    
  133   }
  134  
  135   $featureTo Delete["Ap plication  Status Und er Review  WF"] = '87 8a4805-218 2-4c1c-b66 e-6447cf75 313e'
  136   $featureTo Delete["Ap plication  Type Chang e WF"] = ' 784aa20f-9 1e0-4a0e-a f36-378271 80855a'
  137   $featureTo Delete["Ap proved App lication S ubmitted N otificatio n WF"] = ' 62f47062-4 bf5-4ba8-8 1e8-3ae186 bc66f6'  
  138   $featureTo Delete["Co py Agenda  To Minutes  WF.wsp"]  = '4ba23df 0-9051-43c a-b475-490 d59051cd8'
  139  
  140   write-log  -message "  " -consol eForegroun d White
  141   write-log  -message " Workflow D eployments " -console Foreground  Yellow
  142   $deploymen tsFile = " .\wfDeploy ments.csv"
  143   $deploymen ts | Sort  WebName, D isplayName  | format- table -pro perty WebN ame, Displ ayName, De finitionId , guid, Su bscription Name,Subsc riptionId  -AutoSize
  144   $deploymen ts | Selec t-Object W ebName, Di splayName,  Definitio nId, guid,  Subscript ionName, S ubscriptio nId, Start OnCreate,  StartOnCha nge, Start Manually,  WSPublishS tate | Exp ort-Csv -P ath $deplo ymentsFile  -Encoding  ascii -No TypeInform ation
  145   write-log  -message " Workflow D eployments  file writ ten to $de ploymentsF ile" -cons oleForegro und Yellow
  146       
  147   write-log  -message "  " -consol eForegroun d White
  148   write-log  -message " Workflow S ubscriptio ns" -conso leForegrou nd Yellow
  149   $subscript ionsFile =  ".\wfSubs criptions. csv"
  150   $subscript ions | Sor t WebName,  DisplayNa me | forma t-table -p roperty We bName, Dis playName,  Definition Id, Id, St atusFieldN ame,pdGUID , Activate dlistName, WSPublishS tate,WSEna bled -Auto Size
  151   $subscript ions | Sel ect-Object  WebName,  DisplayNam e, Definit ionId, Id,  StatusFie ldName,pdG UID, Activ atedlistNa me,WSPubli shState,WS Enabled |  Export-Csv  -Path $su bscription sFile -Enc oding asci i -NoTypeI nformation
  152   write-log  -message " Workflow S ubscriptio ns file wr itten to $ subscripti onsFile" - consoleFor eground Ye llow
  153   <#
  154   write-log  -message "  " -consol eForegroun d White
  155   write-log  -message " Workflow F eatures To  Delete be fore remov al" -conso leForegrou nd Yellow
  156   Get-SPFeat ure -Limit  ALL | Whe re-Object  {$_.Scope  -eq $null  } | Sort S cope, Disp layName |  ft -AutoSi ze
  157   Get-SPUser Solution - Site $site .Url | Sor t Name | f t -AutoSiz e
  158   foreach($f td in $fea tureToDele te.Keys){
  159       write- log -messa ge "$ftd :  $($featur eToDelete[ $ftd])" -c onsoleFore ground Whi te
  160          
  161       write- log -messa ge "  Remo ve-WorkFlo w Feature:  $ftd on s ite: $($si te.Url)" - consoleFor eground Ye llow
  162       write- log -messa ge "    Di sable-SPFe ature $ftd  $($featur eToDelete[ $ftd])" -c onsoleFore ground Gra y
  163       Disabl e-SPFeatur e -Identit y $feature ToDelete[$ ftd] -Url  $site.Url  -Confirm:$ false -For ce -ErrorA ction Sile ntlyContin ue  
  164           
  165       $check SPFeature  = Get-SPFe ature -Lim it ALL | W here-Objec t {$_.Disp layName -e q "$ftd"+" ListInstan ces" } 
  166       if($ch eckSPFeatu re -ne $nu ll){
  167           wr ite-log -m essage "       After  Disable-SP Feature: T he feature : $ftd is  not disabl ed" -conso leForegrou nd Red
  168       } else  {
  169           wr ite-log -m essage "       After  Disable-SP Feature: T he feature : $ftd is  not found"  -consoleF oreground  Green
  170       }
  171           
  172       $spus  = Get-SPUs erSolution  -Site $si te.Url -Id entity "$f td.wsp" -E rrorAction  SilentlyC ontinue
  173       $spusN ame = $spu s.Name
  174       $spusS olutionId  = $spus.So lutionId
  175       if($sp us -ne $nu ll) {
  176           wr ite-log -m essage "     Uninstal l-SPUserSo lution $sp usName $sp usSolution Id" -conso leForegrou nd Gray
  177           Un install-SP UserSoluti on -Identi ty $spusNa me -Site $ site.Url - Confirm:$f alse 
  178           
  179           $c heckSPUser Solution =  Get-SPUse rSolution  -Site $sit e.Url -Ide ntity $spu sName
  180           if ($checkSPU serSolutio n -eq $nul l) {
  181                write-lo g -message  "      Af ter Uninst all: The S PUserSolut ion: $spus Name is no t found" - consoleFor eground Re d
  182           }  else {
  183                if($chec kSPUserSol ution.Stat us -ne "Ac tivated"){
  184                    writ e-log -mes sage "       After Un install: T he SPUserS olution: $ spusName i s not Acti vated" -co nsoleForeg round Gree n
  185                } else {
  186                    writ e-log -mes sage "       After Un install: T he SPUserS olution: $ spusName i s still Ac tivated" - consoleFor eground Re d
  187                }
  188           }
  189  
  190           wr ite-log -m essage "     Remove-S PUserSolut ion $spusN ame" -cons oleForegro und Gray 
  191           Re move-SPUse rSolution  -Identity  $spusName  -Site $sit e -Confirm :$false 
  192                
  193           $c heckSPUser Solution =  Get-SPUse rSolution  -Site $sit e.Url -Ide ntity $spu sName -Err orAction S ilentlyCon tinue
  194           if ($checkSPU serSolutio n -ne $nul l){
  195                write-lo g -message  "      Af ter Remove : The SPUs erSolution : $spusNam e is not R emoved" -c onsoleFore ground Red
  196           }  else {
  197                write-lo g -message  "      Af ter Remove : The SPUs erSolution : $spusNam e is Remov ed" -conso leForegrou nd Green
  198           }
  199  
  200       } else  {
  201           wr ite-log -m essage "Ge t-SPUserSo lution did  not find  solution $ ftd" -cons oleForegro und Magent a
  202       }
  203          
  204   }#>
  205   write-log  -message " Workflow F eatures To  Delete af ter remova l" -consol eForegroun d Yellow
  206   Get-SPFeat ure -Limit  ALL | Whe re-Object  {$_.Scope  -eq $null  } | Sort S cope, Disp layName |  ft -AutoSi ze
  207   Get-SPUser Solution - Site $site .Url | Sor t Name | f t -AutoSiz e
  208  
  209   $StopWatch .Stop()
  210   $StopWatch .Elapsed