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.
# | Location | File | Last Modified |
---|---|---|---|
1 | RAMS-2.3.0.zip\RAMS-2.3.0\ps | CreateInvestigatorDocumentLibrary.ps1 | Sun Aug 19 23:03:26 2018 UTC |
2 | RAMS-2.3.0.zip\RAMS-2.3.0\ps | CreateInvestigatorDocumentLibrary.ps1 | Fri Nov 9 14:54:12 2018 UTC |
Description | Between Files 1 and 2 |
|
---|---|---|
Text Blocks | Lines | |
Unchanged | 2 | 142 |
Changed | 1 | 2 |
Inserted | 0 | 0 |
Removed | 0 | 0 |
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 |
No regular expressions were active.
1 | <# | |
2 | .SYNOPSIS | |
3 | Delete s and recr eates the Investigat or Documen t Library . | |
4 | ||
5 | .DESCRIPTI ON | |
6 | Loops through al l facility webs and deletes an y existing Investiga tor Docume nt Library and then recreates it. | |
7 | ||
8 | .EXAMPLE | |
9 | #when run from d eploymentD river.ps1 | |
10 | Run-Sc ript 120 C reateInves tigatorDoc umentLibra ry.ps1 | |
11 | ||
12 | .EXAMPLE | |
13 | #when run from t he powersh ell comman d prompt. | |
14 | .\Crea teInvestig atorDocume ntLibrary. ps1 | |
15 | #> | |
16 | Add-PSSnap in Microso ft.SharePo int.Powers hell | |
17 | #Chita ple ase turn v ersioning on for doc ument libr ary | |
18 | ||
19 | function G etAllWebs( $url){ | |
20 | try { | |
21 | wr ite-log -m essage "$( [String]:: Format("Pr ocesing we b {0}",$w. Url))" -co nsoleForeg round Cyan | |
22 | if ($w.Webs.C ount -gt 0 ){ | |
23 | foreach( $web in $w .Webs){ | |
24 | Delete Investigat orDocument Library $w eb; | |
25 | Create Investigat orDocument Library $w eb; | |
26 | } | |
27 | } | |
28 | } catc h { | |
29 | wr ite-log -m essage "$( [String]:: Format("Er ror proces sing web a t $url, wi th Excepti on: {0}", $_.Excepti on.Message ))" -conso leForegrou nd Red | |
30 | if ($($_.Exc eption.Err orRecord)) { write-l og -messag e "$($_.Ex ception.Er rorRecord) " -console Foreground Red } | |
31 | if ($($_.Exc eption.sta cktrace)) { write-lo g -message "$($_.Exc eption.sta cktrace)" -consoleFo reground R ed } | |
32 | if ($($_.Scr iptStackTr ace)) { wr ite-log -m essage "$( $_.ScriptS tackTrace) " -console Foreground Red } | |
33 | } | |
34 | } | |
35 | ||
36 | function D eleteInves tigatorDoc umentLibra ry($web) { | |
37 | $list = $web.Lists .TryGetLis t("Investi gator Docu ments") | |
38 | if($li st -ne $nu ll){ | |
39 | # The list a lready exi sts | |
40 | $L istToDelet eName = "I nvestigato r Document s" | |
41 | ||
42 | #G et Web and List obje cts | |
43 | $l ist = $web .Lists[$Li stToDelete Name] | |
44 | ||
45 | #R eset the " Allow Dele tion" Flag | |
46 | $l ist.AllowD eletion = $true | |
47 | ||
48 | $l ist.Update () | |
49 | $l ist.Delete () | |
50 | wr ite-log -m essage "De leted Inve stigator D ocuments $ ListToDele teName Lib rary on $( $web.url)" -consoleF oreground Yellow | |
51 | } | |
52 | } | |
53 | ||
54 | function C reateInves tigatorDoc umentLibra ry($web) { | |
55 | $SPTem plate = [M icrosoft.S harepoint. SPListTemp lateType]: :DocumentL ibrary | |
56 | $web.L ists.Add(" Investigat orDocument s","Invest igatorDocu ments",$SP Template) | |
57 | ||
58 | $list = $web.Lis ts.TryGetL ist("Inves tigatorDoc uments") | |
59 | ||
60 | if($li st -ne $nu ll){ | |
61 | $l ist.Title= "Investiga tor Docume nts" | |
62 | $l ist.Update () | |
63 | wr ite-log -m essage "In vestigator Documents Library $ ($list.Tit le) is cre ated on $( $web.url)" -consoleF oreground Green | |
64 | } else { | |
65 | wr ite-log -m essage "Co uld not cr eate Inves tigator Do cuments Li brary on $ ($web.url) " -console Foreground Red | |
66 | } | |
67 | } | |
68 | ||
69 | #This is t o test the driver co ntains a $ siteUrl | |
70 | #$siteUrl= "https:// DNS . URL /sites/IRB Applicatio ns/"; | |
71 | $w = Get-S PWeb $site Url; | |
72 | GetAllWebs ($siteUrl) |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.