@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,248 @@
1
+ # Switch-Rendering
2
+
3
+ Switches an existing rendering with an alternate one to a chosen device for the presentation of an item.
4
+
5
+ ## Syntax
6
+
7
+ ```powershell
8
+ Switch-Rendering -NewRendering <RenderingDefinition> -Item <Item> [-DataSource <string>] [-Rendering <Item>] [-Index <int>] [-PlaceHolder <string>] [-Parameter <hashtable>] [-Device <DeviceItem>] [-FinalLayout] [-Language <string[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
9
+
10
+ Switch-Rendering -NewRendering <RenderingDefinition> -Item <Item> -Instance <RenderingDefinition> [-Device <DeviceItem>] [-FinalLayout] [-Language <string[]>] [-WhatIf] [-Confirm][<CommonParameters>]
11
+
12
+ Switch-Rendering -NewRendering <RenderingDefinition> -Item <Item> -UniqueId <string> [-Device <DeviceItem>] [-FinalLayout] [-Language <string[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
13
+
14
+ Switch-Rendering -NewRendering <RenderingDefinition> -Path <string> [-DataSource <string>] [-Rendering <Item>] [-Index <int>] [-PlaceHolder <string>] [-Parameter <hashtable>] [-Device <DeviceItem>] [-FinalLayout] [-Language <string[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
15
+
16
+ Switch-Rendering -NewRendering <RenderingDefinition> -Path <string> -Instance <RenderingDefinition> [-Device <DeviceItem>] [-FinalLayout] [-Language <string[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
17
+
18
+ Switch-Rendering -NewRendering <RenderingDefinition> -Path <string> -UniqueId <string> [-Device <DeviceItem>] [-FinalLayout] [-Language <string[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
19
+
20
+ Switch-Rendering -NewRendering <RenderingDefinition> [-Id <string>] [-Database <string>] [-DataSource <string>] [-Rendering <Item>] [-Index <int>] [-PlaceHolder <string>] [-Parameter <hashtable>] [-Device <DeviceItem>] [-FinalLayout] [-Language <string[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
21
+
22
+ Switch-Rendering -NewRendering <RenderingDefinition> -Instance <RenderingDefinition> [-Id <string>] [-Database <string>] [-Device <DeviceItem>] [-FinalLayout] [-Language <string[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
23
+
24
+ Switch-Rendering -NewRendering <RenderingDefinition> -UniqueId <string> [-Id <string>] [-Database <string>] [-Device <DeviceItem>] [-FinalLayout] [-Language <string[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
25
+ ```
26
+
27
+ ## Detailed Description
28
+
29
+ Switches an existing rendering with an alternate one to a chosen device for the presentation of an item.
30
+
31
+ © 2010-2022 Adam Najmanowicz, Michael West. All rights reserved. Sitecore PowerShell Extensions
32
+
33
+ ## Parameters
34
+
35
+ ### -Instance &lt;RenderingDefinition&gt;
36
+
37
+ Existing rendering definition to be swapped on the item
38
+
39
+ | Aliases | |
40
+ | :--- | :--- |
41
+ | Required? | true |
42
+ | Position? | named |
43
+ | Default Value | |
44
+ | Accept Pipeline Input? | false |
45
+ | Accept Wildcard Characters? | false |
46
+
47
+ ### -NewRendering &lt;RenderingDefinition&gt;
48
+
49
+ New rendering definition to be swapped on the item
50
+
51
+ | Aliases | |
52
+ | :--- | :--- |
53
+ | Required? | true |
54
+ | Position? | named |
55
+ | Default Value | |
56
+ | Accept Pipeline Input? | false |
57
+ | Accept Wildcard Characters? | false |
58
+
59
+ ### -Parameter &lt;Hashtable&gt;
60
+
61
+ Rendering Parameters to be overriden on the Rendering that is being updated - if not specified the value provided in rendering definition specified in the Instance parameter will be used.
62
+
63
+ | Aliases | |
64
+ | :--- | :--- |
65
+ | Required? | false |
66
+ | Position? | named |
67
+ | Default Value | |
68
+ | Accept Pipeline Input? | false |
69
+ | Accept Wildcard Characters? | false |
70
+
71
+ ### -PlaceHolder &lt;String&gt;
72
+
73
+ Placeholder path the Rendering should be added to - if not specified the value provided in rendering definition specified in the Instance parameter will be used.
74
+
75
+ | Aliases | |
76
+ | :--- | :--- |
77
+ | Required? | true |
78
+ | Position? | named |
79
+ | Default Value | |
80
+ | Accept Pipeline Input? | false |
81
+ | Accept Wildcard Characters? | false |
82
+
83
+ ### -DataSource &lt;String&gt;
84
+
85
+ Data source of the Rendering - if not specified the value provided in rendering definition specified in the Instance parameter will be used.
86
+
87
+ | Aliases | |
88
+ | :--- | :--- |
89
+ | Required? | false |
90
+ | Position? | named |
91
+ | Default Value | |
92
+ | Accept Pipeline Input? | false |
93
+ | Accept Wildcard Characters? | false |
94
+
95
+ ### -Index &lt;Int32&gt;
96
+
97
+ Index at which the Rendering should be inserted. If not provided the rendering will be appended at the end of the list.
98
+
99
+ | Aliases | |
100
+ | :--- | :--- |
101
+ | Required? | false |
102
+ | Position? | named |
103
+ | Default Value | |
104
+ | Accept Pipeline Input? | false |
105
+ | Accept Wildcard Characters? | false |
106
+
107
+ ### -Device &lt;DeviceItem&gt;
108
+
109
+ Device the rendering is assigned to. If not specified - default device will be used.
110
+
111
+ | Aliases | |
112
+ | :--- | :--- |
113
+ | Required? | false |
114
+ | Position? | named |
115
+ | Default Value | |
116
+ | Accept Pipeline Input? | false |
117
+ | Accept Wildcard Characters? | false |
118
+
119
+ ### -FinalLayout &lt;SwitchParameter&gt;
120
+
121
+ Targets the Final Layout. If not provided, the Shared Layout will be targeted. Applies to Sitecore 8.0 and higher only.
122
+
123
+ | Aliases | |
124
+ | :--- | :--- |
125
+ | Required? | false |
126
+ | Position? | named |
127
+ | Default Value | |
128
+ | Accept Pipeline Input? | false |
129
+ | Accept Wildcard Characters? | false |
130
+
131
+ ### -Language &lt;String\[\]&gt;
132
+
133
+ | Aliases | |
134
+ | :--- | :--- |
135
+ | Required? | false |
136
+ | Position? | named |
137
+ | Default Value | |
138
+ | Accept Pipeline Input? | false |
139
+ | Accept Wildcard Characters? | false |
140
+
141
+ ### -Item &lt;Item&gt;
142
+
143
+ The item to be processed.
144
+
145
+ | Aliases | |
146
+ | :--- | :--- |
147
+ | Required? | true |
148
+ | Position? | 1 |
149
+ | Default Value | |
150
+ | Accept Pipeline Input? | true \(ByValue, ByPropertyName\) |
151
+ | Accept Wildcard Characters? | false |
152
+
153
+ ### -Path &lt;String&gt;
154
+
155
+ Path to the item to be processed - can work with Language parameter to narrow the publication scope.
156
+
157
+ | Aliases | |
158
+ | :--- | :--- |
159
+ | Required? | true |
160
+ | Position? | 1 |
161
+ | Default Value | |
162
+ | Accept Pipeline Input? | false |
163
+ | Accept Wildcard Characters? | false |
164
+
165
+ ### -Id &lt;String&gt;
166
+
167
+ Id of the item to be processed - can work with Language parameter to narrow the publication scope.
168
+
169
+ | Aliases | |
170
+ | :--- | :--- |
171
+ | Required? | true |
172
+ | Position? | named |
173
+ | Default Value | |
174
+ | Accept Pipeline Input? | false |
175
+ | Accept Wildcard Characters? | false |
176
+
177
+ ### -Database &lt;String&gt;
178
+
179
+ Database containing the item to be processed - can work with Language parameter to narrow the publication scope.
180
+
181
+ | Aliases | |
182
+ | :--- | :--- |
183
+ | Required? | false |
184
+ | Position? | named |
185
+ | Default Value | |
186
+ | Accept Pipeline Input? | false |
187
+ | Accept Wildcard Characters? | false |
188
+
189
+ ### -PassThru &lt;SwitchParameter&gt;
190
+
191
+ | Aliases | |
192
+ | :--- | :--- |
193
+ | Required? | false |
194
+ | Position? | named |
195
+ | Default Value | |
196
+ | Accept Pipeline Input? | false |
197
+ | Accept Wildcard Characters? | false |
198
+
199
+ ## Inputs
200
+
201
+ The input type is the type of the objects that you can pipe to the cmdlet.
202
+
203
+ * Sitecore.Data.Items.Item
204
+
205
+ ## Outputs
206
+
207
+ The output type is the type of the objects that the cmdlet emits.
208
+
209
+ * System.Void
210
+
211
+ ## Notes
212
+
213
+ Help Author: Adam Najmanowicz, Michael West
214
+
215
+ ## Examples
216
+
217
+ ### EXAMPLE 1
218
+
219
+ Switch an old rendering for the new.
220
+
221
+ ```powershell
222
+ $itemId = "{110D559F-DEA5-42EA-9C1C-8A5DF7E70EF9}"
223
+ $item = Get-Item -Path "master:" -ID $itemId
224
+ $defaultLayout = Get-LayoutDevice "Default"
225
+
226
+ $sourceRenderingId = "{37F58448-7460-4AD2-B0FB-67C85C2A49CB}"
227
+ $targetRenderingId = "{90A9C167-5714-481F-82E4-29E394D12614}"
228
+
229
+ $sourceRenderings = Get-Rendering -Item $item -Device $defaultLayout -FinalLayout |
230
+ Where-Object { $_.ItemID -eq $sourceRenderingId }
231
+ $targetRendering = Get-Item -Path "master:" -ID $targetRenderingId | New-Rendering
232
+
233
+ # Replace all instances of the old rendering with the new rendering
234
+ foreach($sourceRendering in $sourceRenderings) {
235
+ $item | Switch-Rendering -Instance $sourceRendering -Device $defaultLayout -FinalLayout -NewRendering $targetRendering
236
+ }
237
+ ```
238
+
239
+ ## Related Topics
240
+
241
+ * [#1110](https://github.com/SitecorePowerShell/Console/issues/1110) Switch-Rendering added in 6.0
242
+ * [New-Rendering](new-rendering.md)
243
+ * [Set-Rendering](set-rendering.md)
244
+ * [Get-Rendering](get-rendering.md)
245
+ * [Get-LayoutDevice](get-layoutdevice.md)
246
+ * [Remove-Rendering](remove-rendering.md)
247
+ * [Get-Layout](get-layout.md)
248
+ * [Set-Layout](set-layout.md)
@@ -0,0 +1,74 @@
1
+ # Test-Account
2
+
3
+ Determines if the Sitecore role or user account exists.
4
+
5
+ ## Syntax
6
+
7
+ Test-Account \[-Identity\] &lt;AccountIdentity&gt; \[-AccountType &lt;String&gt;\]
8
+
9
+ ## Detailed Description
10
+
11
+ The Test-Account command determines if a Sitecore role or user account exists.
12
+
13
+ © 2010-2019 Adam Najmanowicz, Michael West. All rights reserved. Sitecore PowerShell Extensions
14
+
15
+ ## Parameters
16
+
17
+ ### -Identity &lt;AccountIdentity&gt;
18
+
19
+ Role or User name including domain. If no domain is specified - 'sitecore' will be used as the default value
20
+
21
+ | Aliases | |
22
+ | :--- | :--- |
23
+ | Required? | true |
24
+ | Position? | 1 |
25
+ | Default Value | |
26
+ | Accept Pipeline Input? | true \(ByValue\) |
27
+ | Accept Wildcard Characters? | false |
28
+
29
+ ### -AccountType &lt;String&gt;
30
+
31
+ Specifies which account to check existence.
32
+
33
+ * All
34
+ * Role
35
+ * User
36
+
37
+ | Aliases | |
38
+ | :--- | :--- |
39
+ | Required? | false |
40
+ | Position? | named |
41
+ | Default Value | |
42
+ | Accept Pipeline Input? | false |
43
+ | Accept Wildcard Characters? | false |
44
+
45
+ ## Inputs
46
+
47
+ The input type is the type of the objects that you can pipe to the cmdlet.
48
+
49
+ * System.String
50
+
51
+ ## Outputs
52
+
53
+ The output type is the type of the objects that the cmdlet emits.
54
+
55
+ * True or False
56
+
57
+ ## Notes
58
+
59
+ Help Author: Adam Najmanowicz, Michael West
60
+
61
+ ## Examples
62
+
63
+ ### EXAMPLE
64
+
65
+ ```powershell
66
+ PS master:\> Test-Account -Identity Michael
67
+
68
+ True
69
+ ```
70
+
71
+ ## Related Topics
72
+
73
+ * [https://github.com/SitecorePowerShell/Console/](https://github.com/SitecorePowerShell/Console/)
74
+
@@ -0,0 +1,97 @@
1
+ # Test-BaseTemplate
2
+
3
+ ## Syntax
4
+
5
+ ```powershell
6
+ Test-BaseTemplate -Item <Item> -TemplateItem <TemplateItem[]>
7
+ Test-BaseTemplate -Item <Item> -Template <String[]>
8
+ Test-BaseTemplate -Path <String> -TemplateItem <TemplateItem[]>
9
+ Test-BaseTemplate -Path <String> -Template <String[]>
10
+ Test-BaseTemplate -Id <String> -TemplateItem <TemplateItem[]>
11
+ Test-BaseTemplate -Id <String> -Template <String[]>
12
+ Test-BaseTemplate [-Database <String>]
13
+ ```
14
+
15
+ ## Detailed Description
16
+
17
+ © 2010-2019 Adam Najmanowicz, Michael West. All rights reserved. Sitecore PowerShell Extensions
18
+
19
+ ## Parameters
20
+
21
+ ### -Item  &lt;Item&gt;
22
+
23
+ | Aliases | |
24
+ | :--- | :--- |
25
+ | Required? | true |
26
+ | Position? | named |
27
+ | Default Value | |
28
+ | Accept Pipeline Input? | true \(ByValue\) |
29
+ | Accept Wildcard Characters? | false |
30
+
31
+ ### -Path  &lt;String&gt;
32
+
33
+ | Aliases | |
34
+ | :--- | :--- |
35
+ | Required? | true |
36
+ | Position? | named |
37
+ | Default Value | |
38
+ | Accept Pipeline Input? | false |
39
+ | Accept Wildcard Characters? | false |
40
+
41
+ ### -Id  &lt;String&gt;
42
+
43
+ | Aliases | |
44
+ | :--- | :--- |
45
+ | Required? | true |
46
+ | Position? | named |
47
+ | Default Value | |
48
+ | Accept Pipeline Input? | false |
49
+ | Accept Wildcard Characters? | false |
50
+
51
+ ### -TemplateItem  &lt;TemplateItem\[\]&gt;
52
+
53
+ | Aliases | |
54
+ | :--- | :--- |
55
+ | Required? | true |
56
+ | Position? | named |
57
+ | Default Value | |
58
+ | Accept Pipeline Input? | false |
59
+ | Accept Wildcard Characters? | false |
60
+
61
+ ### -Template  &lt;String\[\]&gt;
62
+
63
+ | Aliases | |
64
+ | :--- | :--- |
65
+ | Required? | true |
66
+ | Position? | named |
67
+ | Default Value | |
68
+ | Accept Pipeline Input? | false |
69
+ | Accept Wildcard Characters? | false |
70
+
71
+ ### -Database  &lt;String&gt;
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
+ ## Notes
82
+
83
+ Help Author: Adam Najmanowicz, Michael West
84
+
85
+ ## Examples
86
+
87
+ ### EXAMPLE 1
88
+
89
+ The following example determines if the item inherits from the specified template.
90
+
91
+ ```powershell
92
+ $item = Get-Item -Path "master:\content\home"
93
+ Test-BaseTemplate -Item $item -Template "Sample/Sample Content"
94
+
95
+ # Alternatively you can use the Template Id
96
+ Test-BaseTemplate -Item $item -Template "{76036F5E-CBCE-46D1-AF0A-4143F9B557AA}"
97
+ ```
@@ -0,0 +1,182 @@
1
+ # Test-ItemAcl
2
+
3
+ Tests a specific access right for a specified user against the provided item
4
+
5
+ ## Syntax
6
+
7
+ Test-ItemAcl -Item &lt;Item&gt;
8
+
9
+ Test-ItemAcl -Item &lt;Item&gt; -AccessRight &lt;String&gt; -Identity &lt;AccountIdentity&gt;
10
+
11
+ Test-ItemAcl -Path &lt;String&gt;
12
+
13
+ Test-ItemAcl -Path &lt;String&gt; -AccessRight &lt;String&gt; -Identity &lt;AccountIdentity&gt;
14
+
15
+ Test-ItemAcl -Id &lt;String&gt;
16
+
17
+ Test-ItemAcl -Id &lt;String&gt; \[-Database &lt;String&gt;\] -AccessRight &lt;String&gt; -Identity &lt;AccountIdentity&gt;
18
+
19
+ ## Detailed Description
20
+
21
+ Checks if a user can perform an operation on an item.
22
+
23
+ © 2010-2019 Adam Najmanowicz, Michael West. All rights reserved. Sitecore PowerShell Extensions
24
+
25
+ ## Parameters
26
+
27
+ ### -Item &lt;Item&gt;
28
+
29
+ The item to be tested against.
30
+
31
+ | Aliases | |
32
+ | :--- | :--- |
33
+ | Required? | true |
34
+ | Position? | named |
35
+ | Default Value | |
36
+ | Accept Pipeline Input? | true \(ByValue\) |
37
+ | Accept Wildcard Characters? | false |
38
+
39
+ ### -Path &lt;String&gt;
40
+
41
+ Path to the item to be tested against.
42
+
43
+ | Aliases | |
44
+ | :--- | :--- |
45
+ | Required? | true |
46
+ | Position? | named |
47
+ | Default Value | |
48
+ | Accept Pipeline Input? | false |
49
+ | Accept Wildcard Characters? | false |
50
+
51
+ ### -Id &lt;String&gt;
52
+
53
+ Id of the item to be tested against. Requires the Database parameter to be specified.
54
+
55
+ | Aliases | |
56
+ | :--- | :--- |
57
+ | Required? | true |
58
+ | Position? | named |
59
+ | Default Value | |
60
+ | Accept Pipeline Input? | false |
61
+ | Accept Wildcard Characters? | false |
62
+
63
+ ### -Database &lt;String&gt;
64
+
65
+ Database containing the item to be fetched with Id parameter.
66
+
67
+ | Aliases | |
68
+ | :--- | :--- |
69
+ | Required? | false |
70
+ | Position? | named |
71
+ | Default Value | |
72
+ | Accept Pipeline Input? | false |
73
+ | Accept Wildcard Characters? | false |
74
+
75
+ ### -AccessRight &lt;String&gt;
76
+
77
+ The access right to grand or deny. Well known rights are:
78
+
79
+ * field:read - "Field Read" - controls whether an account can read a specific field on an item..
80
+ * field:write - "Field Write" - controls whether an account can update a specific field on an item.
81
+ * item:read - "Read" - controls whether an account can see an item in the content tree and/or on the published Web site, including all of its properties and field values.
82
+ * item:write - "Write" - controls whether an account can update field values. The write access right requires the read access right and field read and field write access rights for individual fields \(field read and field write are allowed by default\).
83
+ * item:rename - "Rename" - controls whether an account can change the name of an item. The rename access right requires the read access right.
84
+ * item:create - "Create" - controls whether an account can create child items. The create access right requires the read access right.
85
+ * item:delete - "Delete" - Delete right for items. controls whether an account can delete an item. The delete access right requires the read access right
86
+
87
+ Important!
88
+
89
+ The Delete command also deletes all child items, even if the account has been denied Delete
90
+
91
+ rights for one or more of the subitems.
92
+
93
+ * item:admin - "Administer" - controls whether an account can configure access rights on an item. The administer access right requires the read and write access rights.
94
+ * language:read - "Language Read" - controls whether a user can read a specific language version of items.
95
+ * language:write - "Language Write" - controls whether a user can update a specific language version of items.
96
+ * site:enter - controls whether a user can access a specific site.
97
+ * insert:show - "Show in Insert" - Determines if the user can see the insert option
98
+ * workflowState:delete - "Workflow State Delete" - controls whether a user can delete items which are currently associated with a specific workflow state.
99
+ * workflowState:write - "Workflow State Write" - controls whether a user can update items which are currently associated with a specific workflow state.
100
+ * workflowCommand:execute - "Workflow Command Execute" - — controls whether a user is shown specific workflow commands.
101
+ * profile:customize - "Customize Profile Key Values" - The right to input out of range values of profile keys, that belong to this profile.
102
+ * bucket:makebucket - "Create Bucket" - convert item to bucket.
103
+ * bucket:unmake - "Revert Bucket" - convert item back from bucket.
104
+ * remote:fieldread - "Field Remote Read" - Field Read right for remoted clients.
105
+
106
+ | Aliases | |
107
+ | :--- | :--- |
108
+ | Required? | true |
109
+ | Position? | named |
110
+ | Default Value | |
111
+ | Accept Pipeline Input? | false |
112
+ | Accept Wildcard Characters? | false |
113
+
114
+ ### -Identity &lt;AccountIdentity&gt;
115
+
116
+ User name including domain for which the access rule is being created. If no domain is specified - 'sitecore' will be used as the default domain.
117
+
118
+ Specifies the Sitecore user by providing one of the following values.
119
+
120
+ ```powershell
121
+ Local Name
122
+ Example: adam
123
+ Fully Qualified Name
124
+ Example: sitecore\adam
125
+ ```
126
+
127
+ | Aliases | |
128
+ | :--- | :--- |
129
+ | Required? | true |
130
+ | Position? | named |
131
+ | Default Value | |
132
+ | Accept Pipeline Input? | false |
133
+ | Accept Wildcard Characters? | false |
134
+
135
+ ## Inputs
136
+
137
+ The input type is the type of the objects that you can pipe to the cmdlet.
138
+
139
+ * Sitecore.Data.Items.Item
140
+
141
+ ## Outputs
142
+
143
+ The output type is the type of the objects that the cmdlet emits.
144
+
145
+ * System.Boolea
146
+
147
+ ## Notes
148
+
149
+ Help Author: Adam Najmanowicz, Michael West
150
+
151
+ ## Examples
152
+
153
+ ### EXAMPLE
154
+
155
+ Denies the "sitecore\author2" user renaming the descendants of the Home item. The security info is created prior to adding it to the item. The item is delivered to the Add-ItemAcl from the pipeline and returned to the pipeline after processing due to the -PassThru parameter.
156
+
157
+ ```powershell
158
+ PS master:\> $acl = New-ItemAcl -AccessRight item:rename -PropagationType Descendants -SecurityPermission AllowAccess -Identity "sitecore\author2"
159
+ PS master:\> Get-Item -Path master:\content\home | Set-ItemAcl -AccessRules $acl
160
+
161
+ # Assuming the Home item has one child and author2 does not have rename rights granted above in the tree and is not an administrator
162
+ PS master:\> Get-Item master:\content\home | Test-ItemAcl -Identity "sitecore\author2" -AccessRight item:rename
163
+ False
164
+
165
+ PS master:\> Get-ChildItem master:\content\home | Test-ItemAcl -Identity "sitecore\author2" -AccessRight item:rename
166
+ True
167
+ ```
168
+
169
+ ## Related Topics
170
+
171
+ * [https://github.com/SitecorePowerShell/Console/](https://github.com/SitecorePowerShell/Console/)
172
+ * [Add-ItemAcl](add-itemacl.md)
173
+ * [Clear-ItemAcl](clear-itemacl.md)
174
+ * [Get-ItemAcl](get-itemacl.md)
175
+ * [New-ItemAcl](new-itemacl.md)
176
+ * [Set-ItemAcl](set-itemacl.md)
177
+ * [https://sdn.sitecore.net/upload/sitecore6/security\_administrators\_cookbook\_a4.pdf](https://sdn.sitecore.net/upload/sitecore6/security_administrators_cookbook_a4.pdf)
178
+ * [https://sdn.sitecore.net/upload/sitecore6/61/security\_reference-a4.pdf](https://sdn.sitecore.net/upload/sitecore6/61/security_reference-a4.pdf)
179
+ * [https://sdn.sitecore.net/upload/sitecore6/64/content\_api\_cookbook\_sc64\_and\_later-a4.pdf](https://sdn.sitecore.net/upload/sitecore6/64/content_api_cookbook_sc64_and_later-a4.pdf)
180
+ * [https://www.sitecore.net/learn/blogs/technical-blogs/john-west-sitecore-blog/posts/2013/01/sitecore-security-access-rights.aspx](https://www.sitecore.net/learn/blogs/technical-blogs/john-west-sitecore-blog/posts/2013/01/sitecore-security-access-rights.aspx)
181
+ * [https://briancaos.wordpress.com/2009/10/02/assigning-security-to-items-in-sitecore-6-programatically/](https://briancaos.wordpress.com/2009/10/02/assigning-security-to-items-in-sitecore-6-programatically/)
182
+