@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,95 @@
1
+ # New-UsingBlock
2
+
3
+ New-UsingBlock.
4
+
5
+ ## Syntax
6
+
7
+ New-UsingBlock \[-InputObject\] <IDisposable> \[-ScriptBlock\] <ScriptBlock>
8
+
9
+ ## Detailed Description
10
+
11
+ The `New-UsingBlock` command disposes of the provided input object after the specified scriptblock completes execution. You may find the data returned by the scriptblock is contained within the following object `System.Collections.ObjectModel.Collection`1[[System.Management.Automation.PSObject, System.Management.Automation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]`. This helps when multiple objects are returned and is [known behavior](https://stackoverflow.com/questions/9028804/why-does-invoking-a-powershell-script-block-with-invoke-return-a-collection).
12
+
13
+ © 2010-2019 Adam Najmanowicz, Michael West. All rights reserved. Sitecore PowerShell Extensions
14
+
15
+ ## Parameters
16
+
17
+ ### -InputObject <IDisposable>
18
+
19
+ Object that should be disposed after the Script block is executed.
20
+
21
+ | Aliases | |
22
+ | :--- | :--- |
23
+ | Required? | true |
24
+ | Position? | 1 |
25
+ | Default Value | |
26
+ | Accept Pipeline Input? | false |
27
+ | Accept Wildcard Characters? | false |
28
+
29
+ ### -ScriptBlock <ScriptBlock>
30
+
31
+ Script to be executed within the "Using" context.
32
+
33
+ | Aliases | |
34
+ | :--- | :--- |
35
+ | Required? | true |
36
+ | Position? | 2 |
37
+ | Default Value | |
38
+ | Accept Pipeline Input? | false |
39
+ | Accept Wildcard Characters? | false |
40
+
41
+ ## Inputs
42
+
43
+ The input type is the type of the objects that you can pipe to the cmdlet.
44
+
45
+ * System.IDisposable
46
+
47
+ ## Outputs
48
+
49
+ The output type is the type of the objects that the cmdlet emits.
50
+
51
+ * void
52
+
53
+ ## Notes
54
+
55
+ Help Author: Adam Najmanowicz, Michael West
56
+
57
+ ## Examples
58
+
59
+ ### EXAMPLE 1
60
+
61
+ Assuming all items under /sitecore/content/home have both 'Title' and 'MetaTitle' fields... Using New-UsingBlock to bulk update items under /sitecore/Content/ to have their 'MetaTitle' field to be equal to the 'Title' field
62
+
63
+ ```powershell
64
+ New-UsingBlock (New-Object Sitecore.Data.BulkUpdateContext) {
65
+ foreach ( $item in (Get-ChildItem -Path master:\Content\Home -Recurse -WithParent) ) {
66
+ $item."MetaTitle" = $item.Title
67
+ }
68
+ }
69
+ ```
70
+
71
+ ### EXAMPLE 2
72
+
73
+ Using New-UsingBlock to perform a test with UserSwitcher - checking whether an anonymous user can change a field The test should end up showing the error as below and the Title should not be changed!
74
+
75
+ ```powershell
76
+ $anonymous = Get-User -Identity "extranet\Anonymous"
77
+ $testItem = Get-Item -Path master:\Content\Home
78
+
79
+ New-UsingBlock (New-Object Sitecore.Security.Accounts.UserSwitcher $anonymous) {
80
+ $testItem.Title = "If you can see this title it means that anonymous users can change this item!"
81
+ }
82
+
83
+
84
+ New-UsingBlock : Exception setting "Title": "Exception calling "Modify" with "3" argument(s): "The current user does not have write access to this item. User: extranet\Anonymous, Item: Home ({110D559F-DEA5-42EA-9C1C-8A5DF7E70EF9})""
85
+ At line:3 char:1
86
+ + New-UsingBlock (New-Object Sitecore.Security.Accounts.UserSwitcher $a ...
87
+ + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
88
+ + CategoryInfo : NotSpecified: (:) [New-UsingBlock], SetValueInvocationException
89
+ + FullyQualifiedErrorId : ScriptSetValueRuntimeException,Spe.Commands.Data.NewUsingBlockCommand
90
+ ```
91
+
92
+ ## Related Topics
93
+
94
+ * [https://github.com/SitecorePowerShell/Console/](https://github.com/SitecorePowerShell/Console/)
95
+
@@ -0,0 +1,123 @@
1
+ # Out-Download
2
+
3
+ Send an object content to the client
4
+
5
+ ## Syntax
6
+
7
+ Out-Download -InputObject <Object> \[-ContentType <String>\] \[-Name <String>\]
8
+
9
+ ## Detailed Description
10
+
11
+ The cmdlet allows to send content of an object \(FileInfo, Stream, String, String\[\] or Byte\[\]\) to the client. This is used for example by report scripts to send the report in HTML, Json or Excel without saving the content of the object to the disk drive. You can specify an object type and file name to make sure the downloaded file is interpreted properly by the browser.
12
+
13
+ © 2010-2019 Adam Najmanowicz, Michael West. All rights reserved. Sitecore PowerShell Extensions
14
+
15
+ ## Parameters
16
+
17
+ ### -InputObject <Object>
18
+
19
+ Object content to be sent to the client. Object must be of one of the following types:
20
+
21
+ * FileInfo,
22
+ * Stream,
23
+ * String,
24
+ * String\[\],
25
+ * Byte\[\]
26
+
27
+ | Aliases | |
28
+ | :--- | :--- |
29
+ | Required? | true |
30
+ | Position? | named |
31
+ | Default Value | |
32
+ | Accept Pipeline Input? | true \(ByValue\) |
33
+ | Accept Wildcard Characters? | false |
34
+
35
+ ### -ContentType <String>
36
+
37
+ The MIME content type of the object. In most cases you can skip this parameter and still have the content type be deduced by the browser from the
38
+
39
+ Common examples \(after Wikipedia\)
40
+
41
+ * application/json
42
+ * application/x-www-form-urlencoded
43
+ * application/pdf
44
+ * application/octet-stream
45
+ * multipart/form-data
46
+ * text/html
47
+ * image/png
48
+ * image/jpg
49
+
50
+ | Aliases | |
51
+ | :--- | :--- |
52
+ | Required? | false |
53
+ | Position? | named |
54
+ | Default Value | |
55
+ | Accept Pipeline Input? | false |
56
+ | Accept Wildcard Characters? | false |
57
+
58
+ ### -Name <String>
59
+
60
+ Name of the file you want the user browser to save the object as.
61
+
62
+ | Aliases | |
63
+ | :--- | :--- |
64
+ | Required? | false |
65
+ | Position? | named |
66
+ | Default Value | |
67
+ | Accept Pipeline Input? | true \(ByPropertyName\) |
68
+ | Accept Wildcard Characters? | false |
69
+
70
+ ## Inputs
71
+
72
+ The input type is the type of the objects that you can pipe to the cmdlet.
73
+
74
+ * System.Object
75
+
76
+ ## Outputs
77
+
78
+ The output type is the type of the objects that the cmdlet emits.
79
+
80
+ * System.Boolea
81
+
82
+ ## Notes
83
+
84
+ Help Author: Adam Najmanowicz, Michael West
85
+
86
+ ## Examples
87
+
88
+ ### EXAMPLE 1
89
+
90
+ Send first log file to the user
91
+
92
+ ```powershell
93
+ Get-Item "$SitecoreLogFolder\*.*" | select -first 1 | Out-Download
94
+ ```
95
+
96
+ ### EXAMPLE 2
97
+
98
+ Send Hello World text file to the user
99
+
100
+ ```powershell
101
+ "Hello World!" | Out-Download -Name hello-world.txt
102
+ ```
103
+
104
+ ### EXAMPLE 3
105
+
106
+ Get a list of sitecore branches under root item in the master database and send the list to user as excel file
107
+
108
+ ```powershell
109
+ Import-Function -Name ConvertTo-Xlsx
110
+
111
+ [byte[]]$outobject = Get-ChildItem master:\ |
112
+ Select-Object -Property Name, ProviderPath, Language, Varsion |
113
+ ConvertTo-Xlsx
114
+
115
+ Out-Download -Name "report-$datetime.xlsx" -InputObject $outobject
116
+ ```
117
+
118
+ ## Related Topics
119
+
120
+ * [Send-File](send-file.md)
121
+ * [Receive-File](receive-file.md)
122
+ * [https://github.com/SitecorePowerShell/Console/](https://github.com/SitecorePowerShell/Console/)
123
+
@@ -0,0 +1,120 @@
1
+ # Protect-Item
2
+
3
+ Protects the Sitecore item.
4
+
5
+ ## Syntax
6
+
7
+ Protect-Item \[-Item\] <Item> \[-PassThru\]
8
+
9
+ Protect-Item \[-Path\] <String> \[-PassThru\]
10
+
11
+ Protect-Item -Id <String> \[-Database <String>\] \[-PassThru\]
12
+
13
+ ## Detailed Description
14
+
15
+ The Protect-Item command protects the item by making it read-only.
16
+
17
+ © 2010-2019 Adam Najmanowicz, Michael West. All rights reserved. Sitecore PowerShell Extensions
18
+
19
+ ## Parameters
20
+
21
+ ### -PassThru <SwitchParameter>
22
+
23
+ Passes the processed 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 <Item>
34
+
35
+ The item to be processed.
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 <String>
46
+
47
+ Path to the item to be processed - 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 <String>
58
+
59
+ Id of the item to be processed.
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 <String>
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
+ ```powershell
102
+ PS master:\> Protect-Item -Path master:\content\home
103
+ ```
104
+
105
+ ### EXAMPLE 2
106
+
107
+ ```powershell
108
+ PS master:\> Get-Item -Path master:\content\home | Protect-Item -PassThru
109
+
110
+ Name Children Languages Id TemplateName
111
+ ---- -------- --------- -- ------------
112
+ Home False {en, ja-JP, de-DE, da} {110D559F-DEA5-42EA-9C1C-8A5DF7E70EF9} Sample Item
113
+ ```
114
+
115
+ ## Related Topics
116
+
117
+ * [https://github.com/SitecorePowerShell/Console/](https://github.com/SitecorePowerShell/Console/)
118
+ * [Unprotect-Item](unprotect-item.md)
119
+ * Get-Item
120
+
@@ -0,0 +1,224 @@
1
+ # Publish-Item
2
+
3
+ Publishes a Sitecore item.
4
+
5
+ ## Syntax
6
+
7
+ Publish-Item \[-Item\] <Item> \[-Recurse\] \[-Target <String\[\]>\] \[-PublishMode <Unknown \| Full \| Incremental \| SingleItem \| Smart>\] \[-PublishRelatedItems\] \[-RepublishAll\] \[-CompareRevisions\] \[-FromDate <DateTime>\] \[-AsJob\] \[-Language <String\[\]>\]
8
+
9
+ Publish-Item \[-Path\] <String> \[-Recurse\] \[-Target <String\[\]>\] \[-PublishMode <Unknown \| Full \| Incremental \| SingleItem \| Smart>\] \[-PublishRelatedItems\] \[-RepublishAll\] \[-CompareRevisions\] \[-FromDate <DateTime>\] \[-AsJob\] \[-Language <String\[\]>\]
10
+
11
+ Publish-Item -Id <String> \[-Database <String>\] \[-Recurse\] \[-Target <String\[\]>\] \[-PublishMode <Unknown \| Full \| Incremental \| SingleItem \| Smart>\] \[-PublishRelatedItems\] \[-RepublishAll\] \[-CompareRevisions\] \[-FromDate <DateTime>\] \[-AsJob\] \[-Language <String\[\]>\]
12
+
13
+ ## Detailed Description
14
+
15
+ The Publish-Item command publishes the Sitecore item and optionally subitems. Allowing for granular control over languages and modes of publishing.
16
+
17
+ © 2010-2019 Adam Najmanowicz, Michael West. All rights reserved. Sitecore PowerShell Extensions
18
+
19
+ ## Parameters
20
+
21
+ ### -Recurse <SwitchParameter>
22
+
23
+ Specifies that subitems should also get published with the root item.
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
+ ### -Target <String\[\]>
34
+
35
+ Specifies one or many publishing targets. The default target database is "web".
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
+ ### -PublishMode <PublishMode>
46
+
47
+ Specified the Publish mode. Valid values are:
48
+
49
+ * Full
50
+ * Incremental
51
+ * SingleItem
52
+ * Smart
53
+
54
+ | Aliases | |
55
+ | :--- | :--- |
56
+ | Required? | false |
57
+ | Position? | named |
58
+ | Default Value | |
59
+ | Accept Pipeline Input? | false |
60
+ | Accept Wildcard Characters? | false |
61
+
62
+ ### -PublishRelatedItems <SwitchParameter>
63
+
64
+ Turns publishing of related items on. Works only on Sitecore 7.2 or newer
65
+
66
+ | Aliases | |
67
+ | :--- | :--- |
68
+ | Required? | false |
69
+ | Position? | named |
70
+ | Default Value | |
71
+ | Accept Pipeline Input? | false |
72
+ | Accept Wildcard Characters? | false |
73
+
74
+ ### -RepublishAll <SwitchParameter>
75
+
76
+ Republishes all items provided to the publishing job.
77
+
78
+ | Aliases | |
79
+ | :--- | :--- |
80
+ | Required? | false |
81
+ | Position? | named |
82
+ | Default Value | |
83
+ | Accept Pipeline Input? | false |
84
+ | Accept Wildcard Characters? | false |
85
+
86
+ ### -CompareRevisions <SwitchParameter>
87
+
88
+ Turns revision comparison on.
89
+
90
+ | Aliases | |
91
+ | :--- | :--- |
92
+ | Required? | false |
93
+ | Position? | named |
94
+ | Default Value | |
95
+ | Accept Pipeline Input? | false |
96
+ | Accept Wildcard Characters? | false |
97
+
98
+ ### -FromDate <DateTime>
99
+
100
+ Publishes items newer than the date provided only.
101
+
102
+ | Aliases | |
103
+ | :--- | :--- |
104
+ | Required? | false |
105
+ | Position? | named |
106
+ | Default Value | |
107
+ | Accept Pipeline Input? | false |
108
+ | Accept Wildcard Characters? | false |
109
+
110
+ ### -AsJob <SwitchParameter>
111
+
112
+ The Sitecore API called to perform the publish is different with this switch. You may find that events fire as expected using this.
113
+
114
+ | Aliases | |
115
+ | :--- | :--- |
116
+ | Required? | false |
117
+ | Position? | named |
118
+ | Default Value | |
119
+ | Accept Pipeline Input? | false |
120
+ | Accept Wildcard Characters? | false |
121
+
122
+ ### -Language <String\[\]>
123
+
124
+ Language of the item that should be published. Supports globbing/wildcards. Allows for more than one language to be provided at once. e.g. "en\*", "pl-pl"
125
+
126
+ | Aliases | |
127
+ | :--- | :--- |
128
+ | Required? | false |
129
+ | Position? | named |
130
+ | Default Value | |
131
+ | Accept Pipeline Input? | false |
132
+ | Accept Wildcard Characters? | false |
133
+
134
+ ### -Item <Item>
135
+
136
+ | Aliases | |
137
+ | :--- | :--- |
138
+ | Required? | true |
139
+ | Position? | 1 |
140
+ | Default Value | |
141
+ | Accept Pipeline Input? | true \(ByValue, ByPropertyName\) |
142
+ | Accept Wildcard Characters? | false |
143
+
144
+ ### -Path <String>
145
+
146
+ Path to the item that should be published - can work with Language parameter to narrow the publication scope.
147
+
148
+ | Aliases | |
149
+ | :--- | :--- |
150
+ | Required? | true |
151
+ | Position? | 1 |
152
+ | Default Value | |
153
+ | Accept Pipeline Input? | false |
154
+ | Accept Wildcard Characters? | false |
155
+
156
+ ### -Id <String>
157
+
158
+ Id of the item that should be published - can work with Language parameter to narrow the publication scope.
159
+
160
+ | Aliases | |
161
+ | :--- | :--- |
162
+ | Required? | true |
163
+ | Position? | named |
164
+ | Default Value | |
165
+ | Accept Pipeline Input? | false |
166
+ | Accept Wildcard Characters? | false |
167
+
168
+ ### -Database <String>
169
+
170
+ | Aliases | |
171
+ | :--- | :--- |
172
+ | Required? | false |
173
+ | Position? | named |
174
+ | Default Value | |
175
+ | Accept Pipeline Input? | false |
176
+ | Accept Wildcard Characters? | false |
177
+
178
+ ## Inputs
179
+
180
+ The input type is the type of the objects that you can pipe to the cmdlet.
181
+
182
+ * Sitecore.Data.Items.Item
183
+
184
+ ## Outputs
185
+
186
+ The output type is the type of the objects that the cmdlet emits.
187
+
188
+ * None.
189
+
190
+ ## Notes
191
+
192
+ Help Author: Michael West, Adam Najmanowicz
193
+
194
+ ## Examples
195
+
196
+ ### EXAMPLE 1
197
+
198
+ ```powershell
199
+ PS master:\> Publish-Item -Path master:\content\home -Target Internet
200
+ ```
201
+
202
+ ### EXAMPLE 2
203
+
204
+ ```powershell
205
+ PS master:\> Get-Item -Path master:\content\home | Publish-Item -Recurse -PublishMode Incremental
206
+ ```
207
+
208
+ ### EXAMPLE 3
209
+
210
+ ```powershell
211
+ PS master:\> Get-Item -Path master:\content\home | Publish-Item -Recurse -Language "en*"
212
+ ```
213
+
214
+ ### EXAMPLE 4
215
+ Publish to many databases
216
+ ```text
217
+ PS master:\> $targets = [string[]]@('web','internet')
218
+ PS master:\> Publish-Item -Path master:\content\home -Target $targets
219
+ ```
220
+
221
+ ## Related Topics
222
+
223
+ * [https://github.com/SitecorePowerShell/Console/](https://github.com/SitecorePowerShell/Console/)
224
+