@antonytm/mcp-sitecore-server 1.0.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. package/README.md +3 -0
  2. package/dist/bundle.js +106 -12
  3. package/dist/register.js +7 -0
  4. package/dist/register.js.map +1 -1
  5. package/dist/tools/powershell/documentation/add-basetemplate.md +137 -0
  6. package/dist/tools/powershell/documentation/add-itemacl.md +254 -0
  7. package/dist/tools/powershell/documentation/add-itemversion.md +231 -0
  8. package/dist/tools/powershell/documentation/add-placeholdersetting.md +410 -0
  9. package/dist/tools/powershell/documentation/add-rendering.md +217 -0
  10. package/dist/tools/powershell/documentation/add-rolemember.md +88 -0
  11. package/dist/tools/powershell/documentation/clear-itemacl.md +131 -0
  12. package/dist/tools/powershell/documentation/close-window.md +32 -0
  13. package/dist/tools/powershell/documentation/commands-list.md +134 -0
  14. package/dist/tools/powershell/documentation/convertfrom-clixml.md +67 -0
  15. package/dist/tools/powershell/documentation/convertfrom-itemclone.md +118 -0
  16. package/dist/tools/powershell/documentation/convertto-clixml.md +66 -0
  17. package/dist/tools/powershell/documentation/disable-user.md +89 -0
  18. package/dist/tools/powershell/documentation/enable-user.md +89 -0
  19. package/dist/tools/powershell/documentation/expand-token.md +144 -0
  20. package/dist/tools/powershell/documentation/export-item.md +165 -0
  21. package/dist/tools/powershell/documentation/export-package.md +129 -0
  22. package/dist/tools/powershell/documentation/export-role.md +150 -0
  23. package/dist/tools/powershell/documentation/export-updatepackage.md +111 -0
  24. package/dist/tools/powershell/documentation/export-user.md +147 -0
  25. package/dist/tools/powershell/documentation/find-item.md +718 -0
  26. package/dist/tools/powershell/documentation/get-archive.md +73 -0
  27. package/dist/tools/powershell/documentation/get-archiveitem.md +138 -0
  28. package/dist/tools/powershell/documentation/get-cache.md +62 -0
  29. package/dist/tools/powershell/documentation/get-database.md +96 -0
  30. package/dist/tools/powershell/documentation/get-domain.md +75 -0
  31. package/dist/tools/powershell/documentation/get-item.md +186 -0
  32. package/dist/tools/powershell/documentation/get-itemacl.md +168 -0
  33. package/dist/tools/powershell/documentation/get-itemclone.md +100 -0
  34. package/dist/tools/powershell/documentation/get-itemclonenotification.md +95 -0
  35. package/dist/tools/powershell/documentation/get-itemfield.md +182 -0
  36. package/dist/tools/powershell/documentation/get-itemreference.md +152 -0
  37. package/dist/tools/powershell/documentation/get-itemreferrer.md +154 -0
  38. package/dist/tools/powershell/documentation/get-itemtemplate.md +152 -0
  39. package/dist/tools/powershell/documentation/get-itemworkflowevent.md +133 -0
  40. package/dist/tools/powershell/documentation/get-layout.md +142 -0
  41. package/dist/tools/powershell/documentation/get-layoutdevice.md +97 -0
  42. package/dist/tools/powershell/documentation/get-package.md +63 -0
  43. package/dist/tools/powershell/documentation/get-placeholdersetting.md +477 -0
  44. package/dist/tools/powershell/documentation/get-preset.md +70 -0
  45. package/dist/tools/powershell/documentation/get-rendering.md +248 -0
  46. package/dist/tools/powershell/documentation/get-renderingparameter.md +84 -0
  47. package/dist/tools/powershell/documentation/get-role.md +134 -0
  48. package/dist/tools/powershell/documentation/get-rolemember.md +131 -0
  49. package/dist/tools/powershell/documentation/get-scriptsession.md +128 -0
  50. package/dist/tools/powershell/documentation/get-searchindex.md +92 -0
  51. package/dist/tools/powershell/documentation/get-session.md +107 -0
  52. package/dist/tools/powershell/documentation/get-sitecorejob.md +102 -0
  53. package/dist/tools/powershell/documentation/get-spemodule.md +134 -0
  54. package/dist/tools/powershell/documentation/get-spemodulefeatureroot.md +113 -0
  55. package/dist/tools/powershell/documentation/get-taskschedule.md +136 -0
  56. package/dist/tools/powershell/documentation/get-updatepackagediff.md +110 -0
  57. package/dist/tools/powershell/documentation/get-user.md +193 -0
  58. package/dist/tools/powershell/documentation/get-useragent.md +38 -0
  59. package/dist/tools/powershell/documentation/import-function.md +83 -0
  60. package/dist/tools/powershell/documentation/import-item-1.md +180 -0
  61. package/dist/tools/powershell/documentation/import-item.md +180 -0
  62. package/dist/tools/powershell/documentation/import-role.md +137 -0
  63. package/dist/tools/powershell/documentation/import-user.md +137 -0
  64. package/dist/tools/powershell/documentation/initialize-item.md +87 -0
  65. package/dist/tools/powershell/documentation/initialize-searchindex.md +116 -0
  66. package/dist/tools/powershell/documentation/initialize-searchindexitem.md +85 -0
  67. package/dist/tools/powershell/documentation/install-package.md +95 -0
  68. package/dist/tools/powershell/documentation/install-updatepackage.md +90 -0
  69. package/dist/tools/powershell/documentation/invoke-javascript.md +22 -0
  70. package/dist/tools/powershell/documentation/invoke-script.md +111 -0
  71. package/dist/tools/powershell/documentation/invoke-shellcommand.md +144 -0
  72. package/dist/tools/powershell/documentation/invoke-workflow.md +142 -0
  73. package/dist/tools/powershell/documentation/lock-item.md +157 -0
  74. package/dist/tools/powershell/documentation/login-user.md +56 -0
  75. package/dist/tools/powershell/documentation/logout-user.md +30 -0
  76. package/dist/tools/powershell/documentation/merge-layout.md +102 -0
  77. package/dist/tools/powershell/documentation/new-domain.md +72 -0
  78. package/dist/tools/powershell/documentation/new-explicitfilesource.md +104 -0
  79. package/dist/tools/powershell/documentation/new-explicititemsource.md +146 -0
  80. package/dist/tools/powershell/documentation/new-filesource.md +128 -0
  81. package/dist/tools/powershell/documentation/new-itemacl.md +175 -0
  82. package/dist/tools/powershell/documentation/new-itemclone.md +139 -0
  83. package/dist/tools/powershell/documentation/new-itemsource.md +171 -0
  84. package/dist/tools/powershell/documentation/new-itemworkflowevent.md +140 -0
  85. package/dist/tools/powershell/documentation/new-package.md +81 -0
  86. package/dist/tools/powershell/documentation/new-placeholdersetting.md +255 -0
  87. package/dist/tools/powershell/documentation/new-rendering.md +243 -0
  88. package/dist/tools/powershell/documentation/new-role.md +56 -0
  89. package/dist/tools/powershell/documentation/new-securitysource.md +176 -0
  90. package/dist/tools/powershell/documentation/new-user.md +161 -0
  91. package/dist/tools/powershell/documentation/new-usingblock.md +95 -0
  92. package/dist/tools/powershell/documentation/out-download.md +123 -0
  93. package/dist/tools/powershell/documentation/protect-item.md +120 -0
  94. package/dist/tools/powershell/documentation/publish-item.md +224 -0
  95. package/dist/tools/powershell/documentation/read-variable.md +252 -0
  96. package/dist/tools/powershell/documentation/receive-file.md +244 -0
  97. package/dist/tools/powershell/documentation/receive-itemclonenotification.md +116 -0
  98. package/dist/tools/powershell/documentation/receive-scriptsession.md +108 -0
  99. package/dist/tools/powershell/documentation/remove-archiveitem.md +125 -0
  100. package/dist/tools/powershell/documentation/remove-basetemplate.md +137 -0
  101. package/dist/tools/powershell/documentation/remove-domain.md +70 -0
  102. package/dist/tools/powershell/documentation/remove-itemversion.md +209 -0
  103. package/dist/tools/powershell/documentation/remove-layout.md +151 -0
  104. package/dist/tools/powershell/documentation/remove-placeholdersetting.md +478 -0
  105. package/dist/tools/powershell/documentation/remove-rendering.md +253 -0
  106. package/dist/tools/powershell/documentation/remove-renderingparameter.md +83 -0
  107. package/dist/tools/powershell/documentation/remove-role.md +70 -0
  108. package/dist/tools/powershell/documentation/remove-rolemember.md +79 -0
  109. package/dist/tools/powershell/documentation/remove-scriptsession.md +72 -0
  110. package/dist/tools/powershell/documentation/remove-searchindexitem.md +79 -0
  111. package/dist/tools/powershell/documentation/remove-session.md +77 -0
  112. package/dist/tools/powershell/documentation/remove-user.md +97 -0
  113. package/dist/tools/powershell/documentation/reset-itemfield.md +149 -0
  114. package/dist/tools/powershell/documentation/reset-layout.md +130 -0
  115. package/dist/tools/powershell/documentation/restart-application.md +30 -0
  116. package/dist/tools/powershell/documentation/restore-archiveitem.md +126 -0
  117. package/dist/tools/powershell/documentation/resume-searchindex.md +84 -0
  118. package/dist/tools/powershell/documentation/send-file.md +160 -0
  119. package/dist/tools/powershell/documentation/send-sheermessage.md +66 -0
  120. package/dist/tools/powershell/documentation/set-hostproperty.md +90 -0
  121. package/dist/tools/powershell/documentation/set-itemacl.md +158 -0
  122. package/dist/tools/powershell/documentation/set-itemtemplate.md +156 -0
  123. package/dist/tools/powershell/documentation/set-layout.md +166 -0
  124. package/dist/tools/powershell/documentation/set-rendering.md +213 -0
  125. package/dist/tools/powershell/documentation/set-renderingparameter.md +97 -0
  126. package/dist/tools/powershell/documentation/set-user.md +221 -0
  127. package/dist/tools/powershell/documentation/set-userpassword.md +109 -0
  128. package/dist/tools/powershell/documentation/show-alert.md +53 -0
  129. package/dist/tools/powershell/documentation/show-application.md +150 -0
  130. package/dist/tools/powershell/documentation/show-confirm.md +61 -0
  131. package/dist/tools/powershell/documentation/show-fieldeditor.md +231 -0
  132. package/dist/tools/powershell/documentation/show-input.md +129 -0
  133. package/dist/tools/powershell/documentation/show-listview.md +276 -0
  134. package/dist/tools/powershell/documentation/show-modaldialog.md +137 -0
  135. package/dist/tools/powershell/documentation/show-result.md +158 -0
  136. package/dist/tools/powershell/documentation/show-yesnocancel.md +92 -0
  137. package/dist/tools/powershell/documentation/start-scriptsession.md +230 -0
  138. package/dist/tools/powershell/documentation/start-taskschedule.md +124 -0
  139. package/dist/tools/powershell/documentation/stop-scriptsession.md +78 -0
  140. package/dist/tools/powershell/documentation/stop-searchindex.md +84 -0
  141. package/dist/tools/powershell/documentation/suspend-searchindex.md +84 -0
  142. package/dist/tools/powershell/documentation/switch-rendering.md +248 -0
  143. package/dist/tools/powershell/documentation/test-account.md +74 -0
  144. package/dist/tools/powershell/documentation/test-basetemplate.md +97 -0
  145. package/dist/tools/powershell/documentation/test-itemacl.md +182 -0
  146. package/dist/tools/powershell/documentation/test-rule.md +111 -0
  147. package/dist/tools/powershell/documentation/unlock-item.md +124 -0
  148. package/dist/tools/powershell/documentation/unlock-user.md +84 -0
  149. package/dist/tools/powershell/documentation/unprotect-item.md +124 -0
  150. package/dist/tools/powershell/documentation/update-itemreferrer.md +234 -0
  151. package/dist/tools/powershell/documentation/update-listview.md +139 -0
  152. package/dist/tools/powershell/documentation/update-searchindexitem.md +79 -0
  153. package/dist/tools/powershell/documentation/wait-scriptsession.md +100 -0
  154. package/dist/tools/powershell/documentation/write-log.md +82 -0
  155. package/dist/tools/powershell/get-powershell-documentation.d.ts +2 -0
  156. package/dist/tools/powershell/get-powershell-documentation.js +47 -0
  157. package/dist/tools/powershell/get-powershell-documentation.js.map +1 -0
  158. package/dist/tools/powershell/run-powershell-script.d.ts +3 -0
  159. package/dist/tools/powershell/run-powershell-script.js +13 -0
  160. package/dist/tools/powershell/run-powershell-script.js.map +1 -0
  161. package/dist/tools/sitecore-cli/get-sitecore-cli-documentation.d.ts +3 -0
  162. package/dist/tools/sitecore-cli/get-sitecore-cli-documentation.js +24 -0
  163. package/dist/tools/sitecore-cli/get-sitecore-cli-documentation.js.map +1 -0
  164. package/dist/tools/sitecore-cli/sitecore-cli-documentation.md +70 -0
  165. package/package.json +8 -8
@@ -0,0 +1,111 @@
1
+ # Test-Rule
2
+
3
+ Tests item against a sitecore serialized rules engine rule set.
4
+
5
+ ## Syntax
6
+
7
+ Test-Rule \[-Rule <String>\] \[-InputObject <PSObject>\] \[-RuleDatabase <String>\]
8
+
9
+ ## Detailed Description
10
+
11
+ Tests item or a stream of items against a sitecore serialized rules engine rule set.
12
+
13
+ © 2010-2019 Adam Najmanowicz, Michael West. All rights reserved. Sitecore PowerShell Extensions
14
+
15
+ ## Parameters
16
+
17
+ ### -Rule <String>
18
+
19
+ Serialized sitecore rules engine rule. Such rules can be read from rule fields or created by user with the Read-Variable cmdlet.
20
+
21
+ | Aliases | |
22
+ | :--- | :--- |
23
+ | Required? | false |
24
+ | Position? | named |
25
+ | Default Value | |
26
+ | Accept Pipeline Input? | false |
27
+ | Accept Wildcard Characters? | false |
28
+
29
+ ### -InputObject <PSObject>
30
+
31
+ Item to be tested
32
+
33
+ | Aliases | |
34
+ | :--- | :--- |
35
+ | Required? | false |
36
+ | Position? | named |
37
+ | Default Value | |
38
+ | Accept Pipeline Input? | false |
39
+ | Accept Wildcard Characters? | false |
40
+
41
+ ### -RuleDatabase <String>
42
+
43
+ Name of the database from which rules are pulled.
44
+
45
+ | Aliases | |
46
+ | :--- | :--- |
47
+ | Required? | false |
48
+ | Position? | named |
49
+ | Default Value | |
50
+ | Accept Pipeline Input? | false |
51
+ | Accept Wildcard Characters? | false |
52
+
53
+ ## Inputs
54
+
55
+ The input type is the type of the objects that you can pipe to the cmdlet.
56
+
57
+ * Sitecore.Data.Items.Item
58
+
59
+ ## Outputs
60
+
61
+ The output type is the type of the objects that the cmdlet emits.
62
+
63
+ * System.Boolea
64
+
65
+ ## Notes
66
+
67
+ Help Author: Adam Najmanowicz, Michael West
68
+
69
+ ## Examples
70
+
71
+ ### EXAMPLE 1
72
+
73
+ Specifies a rule as "items that have layout" and runs the rule againste all items under the ome Item
74
+
75
+ ```powershell
76
+ $rule = '<ruleset>
77
+ <rule uid="{9CF02118-F189-49C4-9F2B-6698D64ACF23}">
78
+ <conditions>
79
+ <condition id="{A45DBBAE-F74F-4EFE-BBD5-24395E0AF945}" uid="ED10990E15EB4E1E8FCFD33F441588A1" />
80
+ </conditions>
81
+ </rule>
82
+ </ruleset>'
83
+
84
+ Get-ChildItem master:\content\Home -Recurse | ? { Test-Rule -InputObject $_ -Rule $rule -RuleDatabase master}
85
+ ```
86
+
87
+ ### EXAMPLE 2
88
+
89
+ Asks user for the rule and root under which items should be filtered, and lists all items fulfilling the rule under the selected path
90
+
91
+ ```powershell
92
+ $rule = '<ruleset></ruleset>'
93
+ $root = Get-Item master:\content\home\
94
+
95
+ $result = Read-Variable -Parameters `
96
+ @{Name="root"; title="Items under"; Tooltip="Items under the selected item will be considered for evaluation"}, `
97
+ @{Name="rule"; Editor="rule"; title="Filter rules"; Tooltip="Only items conforming to this rule will be displayed."} `
98
+ -Description "This dialog shows editor how a rule can be taken from an item and edited using the Read-Variable cmdlet." `
99
+ -Title "Sample rule editing" -Width 600 -Height 600 -ShowHints
100
+
101
+ if($result -eq "cancel"){
102
+ exit;
103
+ }
104
+
105
+ Get-ChildItem $root.ProviderPath | ? { Test-Rule -InputObject $_ -Rule $rule -RuleDatabase master}
106
+ ```
107
+
108
+ ## Related Topics
109
+
110
+ * [https://github.com/SitecorePowerShell/Console/](https://github.com/SitecorePowerShell/Console/)
111
+
@@ -0,0 +1,124 @@
1
+ # Unlock-Item
2
+
3
+ Unlocks the specified Sitecore item.
4
+
5
+ ## Syntax
6
+
7
+ Unlock-Item \[-Item\] &lt;Item&gt; \[-PassThru\]
8
+
9
+ Unlock-Item \[-Path\] &lt;String&gt; \[-PassThru\]
10
+
11
+ Unlock-Item -Id &lt;String&gt; \[-Database &lt;String&gt;\] \[-PassThru\]
12
+
13
+ ## Detailed Description
14
+
15
+ The Unlock-Item command unlocks the item specified with parameters.
16
+
17
+ © 2010-2019 Adam Najmanowicz, Michael West. All rights reserved. Sitecore PowerShell Extensions
18
+
19
+ ## Parameters
20
+
21
+ ### -PassThru &lt;SwitchParameter&gt;
22
+
23
+ Passes the unlocked item back into the pipeline.
24
+
25
+ | Aliases | |
26
+ | :--- | :--- |
27
+ | Required? | false |
28
+ | Position? | named |
29
+ | Default Value | |
30
+ | Accept Pipeline Input? | false |
31
+ | Accept Wildcard Characters? | false |
32
+
33
+ ### -Item &lt;Item&gt;
34
+
35
+ The item to be unlocked.
36
+
37
+ | Aliases | |
38
+ | :--- | :--- |
39
+ | Required? | true |
40
+ | Position? | 1 |
41
+ | Default Value | |
42
+ | Accept Pipeline Input? | true \(ByValue, ByPropertyName\) |
43
+ | Accept Wildcard Characters? | false |
44
+
45
+ ### -Path &lt;String&gt;
46
+
47
+ Path to the item to be unlocked - can work with Language parameter to specify the language other than current session language.
48
+
49
+ | Aliases | |
50
+ | :--- | :--- |
51
+ | Required? | true |
52
+ | Position? | 1 |
53
+ | Default Value | |
54
+ | Accept Pipeline Input? | false |
55
+ | Accept Wildcard Characters? | false |
56
+
57
+ ### -Id &lt;String&gt;
58
+
59
+ Id of the item to be unlocked.
60
+
61
+ | Aliases | |
62
+ | :--- | :--- |
63
+ | Required? | true |
64
+ | Position? | named |
65
+ | Default Value | |
66
+ | Accept Pipeline Input? | false |
67
+ | Accept Wildcard Characters? | false |
68
+
69
+ ### -Database &lt;String&gt;
70
+
71
+ Database containing the item to be fetched with Id parameter.
72
+
73
+ | Aliases | |
74
+ | :--- | :--- |
75
+ | Required? | false |
76
+ | Position? | named |
77
+ | Default Value | |
78
+ | Accept Pipeline Input? | false |
79
+ | Accept Wildcard Characters? | false |
80
+
81
+ ## Inputs
82
+
83
+ The input type is the type of the objects that you can pipe to the cmdlet.
84
+
85
+ * can be piped from another cmdlet\* Sitecore.Data.Items.Item
86
+
87
+ ## Outputs
88
+
89
+ The output type is the type of the objects that the cmdlet emits.
90
+
91
+ * Only if -PassThru is used\* Sitecore.Data.Items.Item
92
+
93
+ ## Notes
94
+
95
+ Help Author: Adam Najmanowicz, Michael West
96
+
97
+ ## Examples
98
+
99
+ ### EXAMPLE 1
100
+
101
+ Unlock the Home item providing its path
102
+
103
+ ```powershell
104
+ PS master:\> Unlock-Item -Path master:\content\home
105
+ ```
106
+
107
+ ### EXAMPLE 2
108
+
109
+ Unlock the Home item providing it from the pipeline and passing it back to the pipeline
110
+
111
+ ```powershell
112
+ PS master:\> Get-Item -Path master:\content\home | Unlock-Item -PassThru
113
+
114
+ Name Children Languages Id TemplateName
115
+ ---- -------- --------- -- ------------
116
+ Home False {en, ja-JP, de-DE, da} {110D559F-DEA5-42EA-9C1C-8A5DF7E70EF9} Sample Item
117
+ ```
118
+
119
+ ## Related Topics
120
+
121
+ * [https://github.com/SitecorePowerShell/Console/](https://github.com/SitecorePowerShell/Console/)
122
+ * [Lock-Item](https://github.com/sitecorepowershell/sitecore-powershell-extensions/tree/b6365f8ecf54966c2e1757f549f543976500aa52/appendix/commands/Lock-Item.md)
123
+ * Get-Item
124
+
@@ -0,0 +1,84 @@
1
+ # Unlock-User
2
+
3
+ Unlocks a Sitecore user using the specified criteria.
4
+
5
+ ## Syntax
6
+
7
+ Unlock-User \[-Identity\] &lt;AccountIdentity&gt;
8
+
9
+ Unlock-User -Instance &lt;User&gt;
10
+
11
+ ## Detailed Description
12
+
13
+ The Unlock-User command gets a user and unlocks the account in Sitecore.
14
+
15
+ The Identity parameter specifies the Sitecore user to get. You can specify a user by its local name or fully qualified name. You can also specify user object variable, such as $&lt;user&gt;.
16
+
17
+ © 2010-2019 Adam Najmanowicz, Michael West. All rights reserved. Sitecore PowerShell Extensions
18
+
19
+ ## Parameters
20
+
21
+ ### -Identity &lt;AccountIdentity&gt;
22
+
23
+ | Aliases | |
24
+ | :--- | :--- |
25
+ | Required? | true |
26
+ | Position? | 1 |
27
+ | Default Value | |
28
+ | Accept Pipeline Input? | true \(ByValue\) |
29
+ | Accept Wildcard Characters? | false |
30
+
31
+ ### -Instance &lt;User&gt;
32
+
33
+ Specifies the Sitecore user by providing an instance of a user.
34
+
35
+ | Aliases | |
36
+ | :--- | :--- |
37
+ | Required? | true |
38
+ | Position? | named |
39
+ | Default Value | |
40
+ | Accept Pipeline Input? | true \(ByValue\) |
41
+ | Accept Wildcard Characters? | false |
42
+
43
+ ## Inputs
44
+
45
+ The input type is the type of the objects that you can pipe to the cmdlet.
46
+
47
+ * System.String
48
+
49
+ Represents the identity of a user.
50
+
51
+ Sitecore.Security.Accounts.User One or more user instances.
52
+
53
+ ## Outputs
54
+
55
+ The output type is the type of the objects that the cmdlet emits.
56
+
57
+ * None.
58
+
59
+ ## Notes
60
+
61
+ Help Author: Adam Najmanowicz, Michael West
62
+
63
+ ## Examples
64
+
65
+ ### EXAMPLE 1
66
+
67
+ ```powershell
68
+ PS master:\> Unlock-User -Identity michael
69
+ ```
70
+
71
+ ### EXAMPLE 2
72
+
73
+ ```powershell
74
+ PS master:\> Get-User -Filter * | Unlock-User
75
+ ```
76
+
77
+ ## Related Topics
78
+
79
+ * [https://github.com/SitecorePowerShell/Console/](https://github.com/SitecorePowerShell/Console/)
80
+ * [Get-User](get-user.md)
81
+ * [New-User](new-user.md)
82
+ * [Remove-User](remove-user.md)
83
+ * [Set-User](set-user.md)
84
+
@@ -0,0 +1,124 @@
1
+ # Unprotect-Item
2
+
3
+ Unprotects the specified Sitecore item.
4
+
5
+ ## Syntax
6
+
7
+ Unprotect-Item \[-Item\] &lt;Item&gt; \[-PassThru\]
8
+
9
+ Unprotect-Item \[-Path\] &lt;String&gt; \[-PassThru\]
10
+
11
+ Unprotect-Item -Id &lt;String&gt; \[-Database &lt;String&gt;\] \[-PassThru\]
12
+
13
+ ## Detailed Description
14
+
15
+ The Unprotect-Item command removes protection from the item provided to it.
16
+
17
+ © 2010-2019 Adam Najmanowicz, Michael West. All rights reserved. Sitecore PowerShell Extensions
18
+
19
+ ## Parameters
20
+
21
+ ### -PassThru &lt;SwitchParameter&gt;
22
+
23
+ Passes the unprotected item back into the pipeline.
24
+
25
+ | Aliases | |
26
+ | :--- | :--- |
27
+ | Required? | false |
28
+ | Position? | named |
29
+ | Default Value | |
30
+ | Accept Pipeline Input? | false |
31
+ | Accept Wildcard Characters? | false |
32
+
33
+ ### -Item &lt;Item&gt;
34
+
35
+ The item to be unprotected.
36
+
37
+ | Aliases | |
38
+ | :--- | :--- |
39
+ | Required? | true |
40
+ | Position? | 1 |
41
+ | Default Value | |
42
+ | Accept Pipeline Input? | true \(ByValue, ByPropertyName\) |
43
+ | Accept Wildcard Characters? | false |
44
+
45
+ ### -Path &lt;String&gt;
46
+
47
+ Path to the item to be unprotected - can work with Language parameter to specify the language other than current session language.
48
+
49
+ | Aliases | |
50
+ | :--- | :--- |
51
+ | Required? | true |
52
+ | Position? | 1 |
53
+ | Default Value | |
54
+ | Accept Pipeline Input? | false |
55
+ | Accept Wildcard Characters? | false |
56
+
57
+ ### -Id &lt;String&gt;
58
+
59
+ Id of the item to be unprotected.
60
+
61
+ | Aliases | |
62
+ | :--- | :--- |
63
+ | Required? | true |
64
+ | Position? | named |
65
+ | Default Value | |
66
+ | Accept Pipeline Input? | false |
67
+ | Accept Wildcard Characters? | false |
68
+
69
+ ### -Database &lt;String&gt;
70
+
71
+ Database containing the item to be fetched with Id parameter.
72
+
73
+ | Aliases | |
74
+ | :--- | :--- |
75
+ | Required? | false |
76
+ | Position? | named |
77
+ | Default Value | |
78
+ | Accept Pipeline Input? | false |
79
+ | Accept Wildcard Characters? | false |
80
+
81
+ ## Inputs
82
+
83
+ The input type is the type of the objects that you can pipe to the cmdlet.
84
+
85
+ * can be piped from another cmdlet\* Sitecore.Data.Items.Item
86
+
87
+ ## Outputs
88
+
89
+ The output type is the type of the objects that the cmdlet emits.
90
+
91
+ * Only if -PassThru is used\* Sitecore.Data.Items.Item
92
+
93
+ ## Notes
94
+
95
+ Help Author: Adam Najmanowicz, Michael West
96
+
97
+ ## Examples
98
+
99
+ ### EXAMPLE 1
100
+
101
+ Unprotect the Home item providing its path
102
+
103
+ ```powershell
104
+ PS master:\> Unprotect-Item -Path master:\content\home
105
+ ```
106
+
107
+ ### EXAMPLE 2
108
+
109
+ Unprotect the Home item providing it from the pipeline and passing it back to the pipeline
110
+
111
+ ```powershell
112
+ PS master:\> Get-Item -Path master:\content\home | Unprotect-Item -PassThru
113
+
114
+ Name Children Languages Id TemplateName
115
+ ---- -------- --------- -- ------------
116
+ Home False {en, ja-JP, de-DE, da} {110D559F-DEA5-42EA-9C1C-8A5DF7E70EF9} Sample Item
117
+ ```
118
+
119
+ ## Related Topics
120
+
121
+ * [https://github.com/SitecorePowerShell/Console/](https://github.com/SitecorePowerShell/Console/)
122
+ * [Protect-Item](protect-item.md)
123
+ * Get-Item
124
+
@@ -0,0 +1,234 @@
1
+ # Update-ItemReferrer
2
+
3
+ Updates references to specified item to point to a new provided in the -NewTarget or removes links to the item.
4
+
5
+ ## Syntax
6
+
7
+ Update-ItemReferrer \[-Link\] &lt;ItemLink&gt; \[-NewTarget\] &lt;Item&gt;
8
+
9
+ Update-ItemReferrer \[-Link\] &lt;ItemLink&gt; -RemoveLink
10
+
11
+ Update-ItemReferrer \[-NewTarget\] &lt;Item&gt; \[-Item\] &lt;Item&gt;
12
+
13
+ Update-ItemReferrer -NewTarget &lt;Item&gt; -Path &lt;String&gt; \[-Language &lt;String\[\]&gt;\]
14
+
15
+ Update-ItemReferrer -NewTarget &lt;Item&gt; -Id &lt;String&gt; \[-Database &lt;String&gt;\] \[-Language &lt;String\[\]&gt;\]
16
+
17
+ Update-ItemReferrer -RemoveLink \[-Item\] &lt;Item&gt;
18
+
19
+ Update-ItemReferrer -RemoveLink -Path &lt;String&gt; \[-Language &lt;String\[\]&gt;\]
20
+
21
+ Update-ItemReferrer -RemoveLink -Id &lt;String&gt; \[-Database &lt;String&gt;\] \[-Language &lt;String\[\]&gt;\]
22
+
23
+ ## Detailed Description
24
+
25
+ The cmdlet manipulates link to a specific item. The target item can be provided as an Item object or through Path/ID. it does not modifies the item itself but rather other items that link to it. If the -RemoveLink parameter is used the link will be removed rather than modified. To deliver more fine grained filtering you can provide ItemLink using the -Link parameter. You can obtain ItemLinks using Get-ItemReferrer or Get-ItemReference cmdlets. Consult Examples for specific use cases of each approach.
26
+
27
+ © 2010-2019 Adam Najmanowicz, Michael West. All rights reserved. Sitecore PowerShell Extensions
28
+
29
+ ## Parameters
30
+
31
+ ### -Link &lt;ItemLink&gt;
32
+
33
+ ItemLink retrieved from the Link database. Use this parameter to do more granular filtering.
34
+
35
+ | Aliases | |
36
+ | :--- | :--- |
37
+ | Required? | true |
38
+ | Position? | 1 |
39
+ | Default Value | |
40
+ | Accept Pipeline Input? | true \(ByValue\) |
41
+ | Accept Wildcard Characters? | false |
42
+
43
+ ### -NewTarget &lt;Item&gt;
44
+
45
+ New item the links should be pointing to
46
+
47
+ | Aliases | |
48
+ | :--- | :--- |
49
+ | Required? | true |
50
+ | Position? | 2 |
51
+ | Default Value | |
52
+ | Accept Pipeline Input? | false |
53
+ | Accept Wildcard Characters? | false |
54
+
55
+ ### -RemoveLink &lt;SwitchParameter&gt;
56
+
57
+ If provided, removes all links to the current target item.
58
+
59
+ | Aliases | |
60
+ | :--- | :--- |
61
+ | Required? | true |
62
+ | Position? | named |
63
+ | Default Value | |
64
+ | Accept Pipeline Input? | false |
65
+ | Accept Wildcard Characters? | false |
66
+
67
+ ### -Item &lt;Item&gt;
68
+
69
+ The current item to be relinked.
70
+
71
+ | Aliases | |
72
+ | :--- | :--- |
73
+ | Required? | true |
74
+ | Position? | 1 |
75
+ | Default Value | |
76
+ | Accept Pipeline Input? | true \(ByValue, ByPropertyName\) |
77
+ | Accept Wildcard Characters? | false |
78
+
79
+ ### -Path &lt;String&gt;
80
+
81
+ Path to the current item to be relinked - can work with Language parameter to narrow the publication scope.
82
+
83
+ | Aliases | |
84
+ | :--- | :--- |
85
+ | Required? | true |
86
+ | Position? | named |
87
+ | Default Value | |
88
+ | Accept Pipeline Input? | false |
89
+ | Accept Wildcard Characters? | false |
90
+
91
+ ### -Id &lt;String&gt;
92
+
93
+ Id of the current item to be relinked - can work with Language parameter to specify the language other than current session language. Requires the Database parameter to be specified.
94
+
95
+ | Aliases | |
96
+ | :--- | :--- |
97
+ | Required? | true |
98
+ | Position? | named |
99
+ | Default Value | |
100
+ | Accept Pipeline Input? | false |
101
+ | Accept Wildcard Characters? | false |
102
+
103
+ ### -Database &lt;String&gt;
104
+
105
+ Database containing the current item to be relinked.
106
+
107
+ | Aliases | |
108
+ | :--- | :--- |
109
+ | Required? | false |
110
+ | Position? | named |
111
+ | Default Value | |
112
+ | Accept Pipeline Input? | false |
113
+ | Accept Wildcard Characters? | false |
114
+
115
+ ### -Language &lt;String\[\]&gt;
116
+
117
+ If you need the current item to be relinked in specific Language You can specify it with this parameter. Globbing/wildcard supported.
118
+
119
+ | Aliases | |
120
+ | :--- | :--- |
121
+ | Required? | false |
122
+ | Position? | named |
123
+ | Default Value | |
124
+ | Accept Pipeline Input? | false |
125
+ | Accept Wildcard Characters? | false |
126
+
127
+ ## Inputs
128
+
129
+ The input type is the type of the objects that you can pipe to the cmdlet.
130
+
131
+ * Sitecore.Data.Items.Item
132
+
133
+ ## Notes
134
+
135
+ Help Author: Adam Najmanowicz, Michael West
136
+
137
+ ## Examples
138
+
139
+ ### EXAMPLE 1
140
+
141
+ This example covers global operations
142
+
143
+ Assuming Sitecore PowerShell Extensions 4.2 or newer is installed Assuming your Home has an "Image" field of type "Image" Assuming you have second item next to Home called Home2 that has an "Image" field of type "Image"
144
+
145
+ ```powershell
146
+ $coverImage = Get-Item 'master:\media library\Default Website\cover'
147
+ $scLogoImage = Get-item 'master:\media library\Default Website\sc_logo'
148
+
149
+ Write-Host "`nReset 'home', 'child' and 'home2' to link to 'cover'- 3 items" -Foreground Magenta
150
+ (Get-item master:\content\home).Image = $coverImage
151
+ (Get-item master:\content\Home\child).Image = $coverImage
152
+ (Get-item master:\content\home2).Image = $coverImage
153
+
154
+ Get-ItemReferrer -Item $coverImage
155
+
156
+ Write-Host "`nRelinking all instances of 'cover' image to 'sc_logo'" -Foreground Yellow
157
+ $coverImage | Update-ItemReferrer -NewTarget $scLogoImage
158
+
159
+ Write-Host "`n'cover' should no longer have links leading to it - 0 items " -Foreground Red
160
+ $coverImage | Get-ItemReferrer
161
+
162
+ Write-Host "`n'sc_logo' should now be linked from all - 3 items" -Foreground Green
163
+ $scLogoImage | Get-ItemReferrer
164
+
165
+ Write-Host "`nRemoving links to 'sc_logo' from all items" -Foreground Yellow
166
+ $scLogoImage | Update-ItemReferrer -RemoveLink
167
+
168
+ Write-Host "`n'sc_logo' should have no links to it - 0 items" -Foreground Red
169
+ $scLogoImage | Get-ItemReferrer
170
+ ```
171
+
172
+ ### EXAMPLE 2
173
+
174
+ This example covers more fine-grained filtered approach to removing links
175
+
176
+ Assuming Sitecore PowerShell Extensions 4.2 or newer is installed Assuming your Home has an "Image" field of type "Image" Assuming you have second item next to Home called Home2 that has an "Image" field of type "Image"
177
+
178
+ ```powershell
179
+ $coverImage = Get-Item 'master:\media library\Default Website\cover'
180
+ $scLogoImage = Get-item 'master:\media library\Default Website\sc_logo'
181
+
182
+ Write-Host "`nReset 'home', 'child' and 'home2' to link to 'cover'- 3 items" -Foreground Magenta
183
+ (Get-item master:\content\home).Image = $coverImage
184
+ (Get-item master:\content\Home\child).Image = $coverImage
185
+ (Get-item master:\content\home2).Image = $coverImage
186
+
187
+ Get-ItemReferrer -Item $coverImage
188
+
189
+ Write-Host "`nRemove links to the 'cover' image from all items under 'master:\content\home'" -Foreground Yellow
190
+ Get-ChildItem master:\content\home -WithParent -Recurse | # get items under home
191
+ Get-ItemReference -ItemLink | # get all items that they are refering to
192
+ ? { $_.TargetItemID -eq $coverImage.ID } | # filter only references to $coverImage
193
+ Update-ItemReferrer -RemoveLink # remove links
194
+
195
+ Write-Host "`n'cover' should have 1 link leading from 'home2'" -Foreground Green
196
+ $coverImage | Get-ItemReferrer
197
+ ```
198
+
199
+ ### EXAMPLE 3
200
+
201
+ This example covers more fine-grained filtered approach to removing links
202
+
203
+ Assuming Sitecore PowerShell Extensions 4.2 or newer is installed Assuming your Home has an "Image" field of type "Image" Assuming you have second item next to Home called Home2 that has an "Image" field of type "Image"
204
+
205
+ ```powershell
206
+ $coverImage = Get-Item 'master:\media library\Default Website\cover'
207
+ $scLogoImage = Get-item 'master:\media library\Default Website\sc_logo'
208
+
209
+ Write-Host "`nReset 'home', 'child' and 'home2' to link to 'cover'- 3 items" -Foreground Magenta
210
+ (Get-item master:\content\home).Image = $coverImage
211
+ (Get-item master:\content\Home\child).Image = $coverImage
212
+ (Get-item master:\content\home2).Image = $coverImage
213
+
214
+ Get-ItemReferrer -Item $coverImage
215
+
216
+ Write-Host "`nUpdate all links to 'cover' image to point to 'sc_logo' from all immediate children of /sitecore/content" -Foreground Yellow
217
+ Get-ChildItem master:\content | # get items immediately under 'under home'content'
218
+ Get-ItemReference -ItemLink | # get all items that they are refering to
219
+ ? { $_.TargetItemID -eq $coverImage.ID } | # filter only references to $coverImage
220
+ Update-ItemReferrer -NewTarget $scLogoImage # point them to 'sc_logo' image
221
+
222
+ Write-Host "`n'cover' should have link from home2/child - 1 item" -Foreground Green
223
+ $coverImage | Get-ItemReferrer
224
+
225
+ Write-Host "`n'sc_logo' should have links leading from 'home' and 'home2' - 2 items" -Foreground Green
226
+ $scLogoImage | Get-ItemReferrer
227
+ ```
228
+
229
+ ## Related Topics
230
+
231
+ * [Get-ItemReferrer](get-itemreferrer.md)
232
+ * [Get-ItemReference](get-itemreference.md)
233
+ * [https://github.com/SitecorePowerShell/Console/](https://github.com/SitecorePowerShell/Console/)
234
+