@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,89 @@
1
+ # Enable-User
2
+
3
+ Enables the specified Sitecore user.
4
+
5
+ ## Syntax
6
+
7
+ Enable-User \[-Identity\] <AccountIdentity>
8
+
9
+ Enable-User -Instance <User>
10
+
11
+ ## Detailed Description
12
+
13
+ The Enable-User command gets a user and enables 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 $<user>.
16
+
17
+ © 2010-2019 Adam Najmanowicz, Michael West. All rights reserved. Sitecore PowerShell Extensions
18
+
19
+ ## Parameters
20
+
21
+ ### -Identity <AccountIdentity>
22
+
23
+ Specifies the Sitecore user by providing one of the following values.
24
+
25
+ ```powershell
26
+ Local Name
27
+ Example: michael
28
+ Fully Qualified Name
29
+ Example: sitecore\michael
30
+ ```
31
+
32
+ | Aliases | |
33
+ | :--- | :--- |
34
+ | Required? | true |
35
+ | Position? | 1 |
36
+ | Default Value | |
37
+ | Accept Pipeline Input? | true \(ByValue\) |
38
+ | Accept Wildcard Characters? | false |
39
+
40
+ ### -Instance <User>
41
+
42
+ Specifies the Sitecore user by providing an instance of a user.
43
+
44
+ | Aliases | |
45
+ | :--- | :--- |
46
+ | Required? | true |
47
+ | Position? | named |
48
+ | Default Value | |
49
+ | Accept Pipeline Input? | true \(ByValue\) |
50
+ | Accept Wildcard Characters? | false |
51
+
52
+ ## Inputs
53
+
54
+ The input type is the type of the objects that you can pipe to the cmdlet.
55
+
56
+ * System.String
57
+
58
+ Represents the identity of one or more users.
59
+
60
+ Sitecore.Security.Accounts.User One or more user instances.
61
+
62
+ ## Outputs
63
+
64
+ The output type is the type of the objects that the cmdlet emits.
65
+
66
+ * None.
67
+
68
+ ## Notes
69
+
70
+ Michael West
71
+
72
+ ## Examples
73
+
74
+ ### EXAMPLE 1
75
+
76
+ ```powershell
77
+ PS master:\> Enable-User -Identity michael
78
+ ```
79
+
80
+ ### EXAMPLE 2
81
+
82
+ ```powershell
83
+ PS master:\> Get-User -Filter * | Enable-User
84
+ ```
85
+
86
+ ## Related Topics
87
+
88
+ * [https://michaellwest.blogspot.com](https://michaellwest.blogspot.com)
89
+
@@ -0,0 +1,144 @@
1
+ # Expand-Token
2
+
3
+ Expands tokens in fields for items.
4
+
5
+ ## Syntax
6
+
7
+ Expand-Token \[-Item\] <Item> \[-Language <String\[\]>\]
8
+
9
+ Expand-Token \[-Path\] <String> \[-Language <String\[\]>\]
10
+
11
+ Expand-Token -Id <String> \[-Database <String>\] \[-Language <String\[\]>\]
12
+
13
+ ## Detailed Description
14
+
15
+ The Expand-Token command expands the tokens in fields for items.
16
+
17
+ Some example of tokens include:
18
+
19
+ * $name
20
+ * $time
21
+
22
+ © 2010-2019 Adam Najmanowicz, Michael West. All rights reserved. Sitecore PowerShell Extensions
23
+
24
+ ## Parameters
25
+
26
+ ### -Language <String\[\]>
27
+
28
+ Language that will be processed. If not specified the current user language will be used. Globbing/wildcard supported.
29
+
30
+ | Aliases | |
31
+ | :--- | :--- |
32
+ | Required? | false |
33
+ | Position? | named |
34
+ | Default Value | |
35
+ | Accept Pipeline Input? | false |
36
+ | Accept Wildcard Characters? | false |
37
+
38
+ ### -Item <Item>
39
+
40
+ The item to be processed.
41
+
42
+ | Aliases | |
43
+ | :--- | :--- |
44
+ | Required? | true |
45
+ | Position? | 1 |
46
+ | Default Value | |
47
+ | Accept Pipeline Input? | true \(ByValue, ByPropertyName\) |
48
+ | Accept Wildcard Characters? | false |
49
+
50
+ ### -Path <String>
51
+
52
+ Path to the item to be processed - additionally specify Language parameter to fetch different item language than the current user language.
53
+
54
+ | Aliases | |
55
+ | :--- | :--- |
56
+ | Required? | true |
57
+ | Position? | 1 |
58
+ | Default Value | |
59
+ | Accept Pipeline Input? | false |
60
+ | Accept Wildcard Characters? | false |
61
+
62
+ ### -Id <String>
63
+
64
+ Id of the the item to be processed - additionally specify Language parameter to fetch different item language than the current user language.
65
+
66
+ | Aliases | |
67
+ | :--- | :--- |
68
+ | Required? | true |
69
+ | Position? | named |
70
+ | Default Value | |
71
+ | Accept Pipeline Input? | false |
72
+ | Accept Wildcard Characters? | false |
73
+
74
+ ### -Database <String>
75
+
76
+ Database containing the item to be processed - can work with Language parameter to narrow the publication scope.
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
+ ## Inputs
87
+
88
+ The input type is the type of the objects that you can pipe to the cmdlet.
89
+
90
+ * Sitecore.Data.Items.Item
91
+
92
+ ## Outputs
93
+
94
+ The output type is the type of the objects that the cmdlet emits.
95
+
96
+ * Sitecore.Data.Items.Item
97
+
98
+ ## Notes
99
+
100
+ Help Author: Adam Najmanowicz, Michael West
101
+
102
+ ## Examples
103
+
104
+ ### EXAMPLE 1
105
+
106
+ The following expands tokens in fields on the item.
107
+
108
+ ```powershell
109
+ Get-Item -Path "master:\content\home" | Expand-Token
110
+ ```
111
+
112
+ ### EXAMPLE 2
113
+
114
+ The following expands tokens in fields on the item. If the standard value of the field contains a token we modify the field to the token so the expansion will work (Sitecore API does not expand if the field is the same as Standard Values and never modified).
115
+
116
+ ```powershell
117
+ $tokens = @('$name', '$id', '$parentId', '$parentname', '$date', '$time', '$now')
118
+
119
+ $item = Get-Item -Path "master:\content\home"
120
+
121
+ $standardValueFields = Get-ItemField -Item $item -ReturnType Field -Name "*" `
122
+ | Where-Object { $_.ContainsStandardValue }
123
+
124
+ $item.Editing.BeginEdit()
125
+
126
+ foreach ($field in $standardValueFields) {
127
+ $value = $field.Value
128
+
129
+ if ($tokens -contains $value) {
130
+ $item[$field.Name] = $value
131
+ }
132
+ }
133
+
134
+ $item.Editing.EndEdit()
135
+
136
+ Expand-Token -Item $item
137
+ ```
138
+
139
+ ## Related Topics
140
+
141
+ * [https://github.com/SitecorePowerShell/Console/](https://github.com/SitecorePowerShell/Console/)
142
+ * [https://sitecorejunkie.com/2014/05/27/launch-powershell-scripts-in-the-item-context-menu-using-sitecore-powershell-extensions/](https://sitecorejunkie.com/2014/05/27/launch-powershell-scripts-in-the-item-context-menu-using-sitecore-powershell-extensions/)
143
+ * [https://sitecorejunkie.com/2014/06/02/make-bulk-item-updates-using-sitecore-powershell-extensions/](https://sitecorejunkie.com/2014/06/02/make-bulk-item-updates-using-sitecore-powershell-extensions/)
144
+
@@ -0,0 +1,165 @@
1
+ # Export-Item
2
+
3
+ Exports \(serializes\) the Sitecore item to the filesystem.
4
+
5
+ ## Syntax
6
+
7
+ Export-Item \[-Entry <IncludeEntry>\] \[-Recurse\] \[-ItemPathsAbsolute\] \[-Root <String>\]
8
+
9
+ Export-Item \[-Item\] <Item> \[-Recurse\] \[-ItemPathsAbsolute\] \[-Root <String>\]
10
+
11
+ Export-Item \[-Path\] <String> \[-Recurse\] \[-ItemPathsAbsolute\] \[-Root <String>\]
12
+
13
+ Export-Item -Id <String> \[-Database <String>\] \[-Recurse\] \[-ItemPathsAbsolute\] \[-Root <String>\]
14
+
15
+ ## Detailed Description
16
+
17
+ The Export-Item command serializes Sitecore items to the filesystem. The alias for the command is Serialize-Item. The simplest command syntax is: Export-Item -path "master:\content"
18
+
19
+ or
20
+
21
+ Get-Item "master:\content" \| Export-Item
22
+
23
+ Both of them will serialize the content item in the master database. In first case we pass the path to the item as a parameter, in second case we serialize the items which come from the pipeline. You can send more items from the pipeline to the Export-Item command, e.g. if you need to serialize all the descendants of the home item created by sitecore\admin, you can use:
24
+
25
+ Get-Childitem "master:\content\home" -recurse \| Where-Object { $\_."\_\_Created By" -eq "sitecore\admin" } \| Export-Item
26
+
27
+ © 2010-2019 Adam Najmanowicz, Michael West. All rights reserved. Sitecore PowerShell Extensions
28
+
29
+ ## Aliases
30
+
31
+ The following abbreviations are aliases for this cmdlet:
32
+
33
+ * Serialize-Item
34
+
35
+ ## Parameters
36
+
37
+ ### -Entry <IncludeEntry>
38
+
39
+ Serialization preset to be serialized. Obtain the preset through the use of Get-Preset command.
40
+
41
+ | Aliases | |
42
+ | :--- | :--- |
43
+ | Required? | false |
44
+ | Position? | named |
45
+ | Default Value | |
46
+ | Accept Pipeline Input? | true \(ByValue, ByPropertyName\) |
47
+ | Accept Wildcard Characters? | false |
48
+
49
+ ### -Recurse <SwitchParameter>
50
+
51
+ Process the item and all of its children - switch which decides if serialization concerns only the single item or the whole tree below the item, e.g.
52
+
53
+ Export-Item -path "master:\content\articles" -recurse
54
+
55
+ Root - directory where the serialized files should be saved, e.g. Export-Item -path "master:\content" -Root "c:\tmp"
56
+
57
+ | Aliases | |
58
+ | :--- | :--- |
59
+ | Required? | false |
60
+ | Position? | named |
61
+ | Default Value | |
62
+ | Accept Pipeline Input? | false |
63
+ | Accept Wildcard Characters? | false |
64
+
65
+ ### -ItemPathsAbsolute <SwitchParameter>
66
+
67
+ Works only with Root parameter and decides if folder structure starting from "sitecore\content" should be created, e.g. if you want to serialize articles item in directory c:\tmp\sitecore\content you can use. For example: Export-Item -Path "master:\content\articles" -ItemPathsAbsolute -Root "c:\tmp"
68
+
69
+ | Aliases | |
70
+ | :--- | :--- |
71
+ | Required? | false |
72
+ | Position? | named |
73
+ | Default Value | |
74
+ | Accept Pipeline Input? | false |
75
+ | Accept Wildcard Characters? | false |
76
+
77
+ ### -Root <String>
78
+
79
+ Directory where the serialized files should be saved, e.g.
80
+
81
+ Export-Item -Path "master:\content" -Root "c:\tmp"
82
+
83
+ | Aliases | |
84
+ | :--- | :--- |
85
+ | Required? | false |
86
+ | Position? | named |
87
+ | Default Value | |
88
+ | Accept Pipeline Input? | false |
89
+ | Accept Wildcard Characters? | false |
90
+
91
+ ### -Item <Item>
92
+
93
+ The item to be serialized.
94
+
95
+ | Aliases | |
96
+ | :--- | :--- |
97
+ | Required? | true |
98
+ | Position? | 1 |
99
+ | Default Value | |
100
+ | Accept Pipeline Input? | true \(ByValue, ByPropertyName\) |
101
+ | Accept Wildcard Characters? | false |
102
+
103
+ ### -Path <String>
104
+
105
+ Path to the item to be processed - can work with Language parameter to narrow the publication scope.
106
+
107
+ | Aliases | |
108
+ | :--- | :--- |
109
+ | Required? | true |
110
+ | Position? | 1 |
111
+ | Default Value | |
112
+ | Accept Pipeline Input? | false |
113
+ | Accept Wildcard Characters? | false |
114
+
115
+ ### -Id <String>
116
+
117
+ You can pass the id of serialized item instead of path, e.g. Export-Item -id "{0DE95AE4-41AB-4D01-9EB0-67441B7C2450}"
118
+
119
+ | Aliases | |
120
+ | :--- | :--- |
121
+ | Required? | true |
122
+ | Position? | named |
123
+ | Default Value | |
124
+ | Accept Pipeline Input? | false |
125
+ | Accept Wildcard Characters? | false |
126
+
127
+ ### -Database <String>
128
+
129
+ | Aliases | |
130
+ | :--- | :--- |
131
+ | Required? | false |
132
+ | Position? | named |
133
+ | Default Value | |
134
+ | Accept Pipeline Input? | false |
135
+ | Accept Wildcard Characters? | false |
136
+
137
+ ## Inputs
138
+
139
+ The input type is the type of the objects that you can pipe to the cmdlet.
140
+
141
+ * Sitecore.Data.Items.Item
142
+
143
+ ## Notes
144
+
145
+ Help Author: Marek Musielak, Adam Najmanowicz, Michael West
146
+
147
+ ## Examples
148
+
149
+ ### EXAMPLE
150
+
151
+ ```powershell
152
+ PS master:\> Export-Item -Path master:\content\home
153
+ ```
154
+
155
+ ## Related Topics
156
+
157
+ * [https://github.com/SitecorePowerShell/Console/](https://github.com/SitecorePowerShell/Console/)
158
+ * [Get-Preset](../common/get-preset.md)
159
+ * [Import-Item](export-item.md)
160
+ * [https://www.youtube.com/watch?v=60BGRDNONo0&list=PLph7ZchYd\_nCypVZSNkudGwPFRqf1na0b&index=7](https://www.youtube.com/watch?v=60BGRDNONo0&list=PLph7ZchYd_nCypVZSNkudGwPFRqf1na0b&index=7)
161
+ * [https://gist.github.com/AdamNaj/6c86f61510dc3d2d8b2f](https://gist.github.com/AdamNaj/6c86f61510dc3d2d8b2f)
162
+ * [https://stackoverflow.com/questions/20266841/sitecore-powershell-deserialization](https://stackoverflow.com/questions/20266841/sitecore-powershell-deserialization)
163
+ * [https://stackoverflow.com/questions/20195718/sitecore-serialization-powershell](https://stackoverflow.com/questions/20195718/sitecore-serialization-powershell)
164
+ * [https://stackoverflow.com/questions/20283438/sitecore-powershell-deserialization-core-db](https://stackoverflow.com/questions/20283438/sitecore-powershell-deserialization-core-db)
165
+
@@ -0,0 +1,129 @@
1
+ # Export-Package
2
+
3
+ Exports a Sitecore installation package and project.
4
+
5
+ ## Syntax
6
+
7
+ Export-Package \[\[-Path\] <String>\] \[\[-Project\] <PackageProject>\] \[-Zip\] \[-NoClobber\] \[-IncludeProject\]
8
+
9
+ ## Detailed Description
10
+
11
+ The Export-Package command creates a Sitecore installation package as either a .zip containing all items and files or .xml with project definition.
12
+
13
+ © 2010-2019 Adam Najmanowicz, Michael West. All rights reserved. Sitecore PowerShell Extensions
14
+
15
+ ## Parameters
16
+
17
+ ### -Path <String>
18
+
19
+ Path the project should be saved under.
20
+
21
+ | Aliases | |
22
+ | :--- | :--- |
23
+ | Required? | false |
24
+ | Position? | 1 |
25
+ | Default Value | |
26
+ | Accept Pipeline Input? | false |
27
+ | Accept Wildcard Characters? | false |
28
+
29
+ ### -Project <PackageProject>
30
+
31
+ Project object created ealier with the New-Package. or Loaded with Get-Package.
32
+
33
+ | Aliases | |
34
+ | :--- | :--- |
35
+ | Required? | false |
36
+ | Position? | 2 |
37
+ | Default Value | |
38
+ | Accept Pipeline Input? | true \(ByValue\) |
39
+ | Accept Wildcard Characters? | false |
40
+
41
+ ### -Zip <SwitchParameter>
42
+
43
+ Specify this parameter to exposrt package with all its assets in a zip file. If this parameter is missing only Xml file with the package project definition will be saved.
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
+ ### -NoClobber <SwitchParameter>
54
+
55
+ Do not overwrite \(replace the contents\) of an existing file. By default, if a file exists in the specified path, Export-Package overwrites the file without warning.
56
+
57
+ | Aliases | |
58
+ | :--- | :--- |
59
+ | Required? | false |
60
+ | Position? | named |
61
+ | Default Value | |
62
+ | Accept Pipeline Input? | false |
63
+ | Accept Wildcard Characters? | false |
64
+
65
+ ### -IncludeProject <SwitchParameter>
66
+
67
+ Specify this parameter if exporting the zip file and when you want it to contain the project definitnion xml file in it.
68
+
69
+ | Aliases | |
70
+ | :--- | :--- |
71
+ | Required? | false |
72
+ | Position? | named |
73
+ | Default Value | |
74
+ | Accept Pipeline Input? | false |
75
+ | Accept Wildcard Characters? | false |
76
+
77
+ ## Inputs
78
+
79
+ The input type is the type of the objects that you can pipe to the cmdlet.
80
+
81
+ * Sitecore.Install.PackageProject
82
+
83
+ ## Notes
84
+
85
+ Help Author: Adam Najmanowicz, Michael West
86
+
87
+ ## Examples
88
+
89
+ ### EXAMPLE
90
+
91
+ Following example creates a new package, adds content/home item to it and saves it in the Sitecore Package folder+ gives you an option to download the saved package.
92
+
93
+ ```powershell
94
+ # Create package
95
+ $package = new-package "Package for something special";
96
+
97
+ # Set package metadata
98
+ $package.Sources.Clear();
99
+
100
+ $package.Metadata.Author = "Michael West";
101
+ $package.Metadata.Publisher = "Scripting in Powerful Ways Team";
102
+ $package.Metadata.Version = "2.7";
103
+ $package.Metadata.Readme = 'This text will be visible to people installing your package'
104
+
105
+ # Add contnet/home to the package
106
+ $source = Get-Item 'master:\content\home' | New-ItemSource -Name 'Home Page' -InstallMode Overwrite
107
+ $package.Sources.Add($source);
108
+
109
+ # Save package
110
+ Export-Package -Project $package -Path "$($package.Name)-$($package.Metadata.Version).zip" -Zip
111
+
112
+ # Offer the user to download the package
113
+ Download-File "$SitecorePackageFolder\$($package.Name)-$($package.Metadata.Version).zip"
114
+ ```
115
+
116
+ ## Related Topics
117
+
118
+ * [Get-Package](get-package.md)
119
+ * Import-Package
120
+ * [Install-UpdatePackage](install-updatepackage.md)
121
+ * [New-ExplicitFileSource](new-explicitfilesource.md)
122
+ * [New-ExplicitItemSource](new-explicititemsource.md)
123
+ * [New-FileSource](new-filesource.md)
124
+ * [New-ItemSource](new-itemsource.md)
125
+ * [New-Package](new-package.md)
126
+ * [https://github.com/SitecorePowerShell/Console/](https://github.com/SitecorePowerShell/Console/)
127
+ * [https://blog.najmanowicz.com/2011/12/19/continuous-deployment-in-sitecore-with-powershell/](https://blog.najmanowicz.com/2011/12/19/continuous-deployment-in-sitecore-with-powershell/)
128
+ * [https://gist.github.com/AdamNaj/f4251cb2645a1bfcddae](https://gist.github.com/AdamNaj/f4251cb2645a1bfcddae)
129
+
@@ -0,0 +1,150 @@
1
+ # Export-Role
2
+
3
+ Exports \(serializes\) Sitecore roles to the filesystem on the server.
4
+
5
+ ## Syntax
6
+
7
+ Export-Role \[-Identity\] <AccountIdentity> \[-Root <String>\]
8
+
9
+ Export-Role \[-Identity\] <AccountIdentity> -Path <String>
10
+
11
+ Export-Role -Filter <String> \[-Root <String>\]
12
+
13
+ Export-Role \[-Role\] <Role> \[-Root <String>\]
14
+
15
+ Export-Role \[-Role\] <Role> -Path <String>
16
+
17
+ ## Detailed Description
18
+
19
+ The Export-Role command exports \(serializes\) Sitecore roles to the filesystem on the server.
20
+
21
+ © 2010-2019 Adam Najmanowicz, Michael West. All rights reserved. Sitecore PowerShell Extensions
22
+
23
+ ## Parameters
24
+
25
+ ### -Identity <AccountIdentity>
26
+
27
+ Specifies the Sitecore role by providing one of the following values.
28
+
29
+ ```powershell
30
+ Local Name
31
+ Example: developer
32
+ Fully Qualified Name
33
+ Example: sitecore\developer
34
+ ```
35
+
36
+ | Aliases | |
37
+ | :--- | :--- |
38
+ | Required? | true |
39
+ | Position? | 1 |
40
+ | Default Value | |
41
+ | Accept Pipeline Input? | true \(ByValue\) |
42
+ | Accept Wildcard Characters? | false |
43
+
44
+ ### -Filter <String>
45
+
46
+ Specifies a simple pattern to match Sitecore roles.
47
+
48
+ Examples: The following examples show how to use the filter syntax.
49
+
50
+ To get all the roles, use the asterisk wildcard: Export-Role -Filter \*
51
+
52
+ To get all the roles in a domain use the following command: Export-Role -Filter "sitecore\*"
53
+
54
+ | Aliases | |
55
+ | :--- | :--- |
56
+ | Required? | true |
57
+ | Position? | named |
58
+ | Default Value | |
59
+ | Accept Pipeline Input? | false |
60
+ | Accept Wildcard Characters? | false |
61
+
62
+ ### -Role <Role>
63
+
64
+ Specifies the role to be exported
65
+
66
+ | Aliases | |
67
+ | :--- | :--- |
68
+ | Required? | true |
69
+ | Position? | 1 |
70
+ | Default Value | |
71
+ | Accept Pipeline Input? | true \(ByValue\) |
72
+ | Accept Wildcard Characters? | false |
73
+
74
+ ### -Path <String>
75
+
76
+ Path to the file the role should be saved to.
77
+
78
+ | Aliases | |
79
+ | :--- | :--- |
80
+ | Required? | true |
81
+ | Position? | named |
82
+ | Default Value | |
83
+ | Accept Pipeline Input? | false |
84
+ | Accept Wildcard Characters? | false |
85
+
86
+ ### -Root <String>
87
+
88
+ Specifies the serialization root directory. If this parameter is not specified - the default Sitecore serialization folder will be used \(unless you're saving to an explicit location with the -Path parameter\).
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
+ ## Inputs
99
+
100
+ The input type is the type of the objects that you can pipe to the cmdlet.
101
+
102
+ * System.String
103
+
104
+ Sitecore.Security.Accounts.Role
105
+
106
+ ## Outputs
107
+
108
+ The output type is the type of the objects that the cmdlet emits.
109
+
110
+ * System.String
111
+
112
+ ## Notes
113
+
114
+ Help Author: Adam Najmanowicz, Michael West
115
+
116
+ ## Examples
117
+
118
+ ### EXAMPLE 1
119
+
120
+ ```powershell
121
+ PS master:\> Export-Role -Identity sitecore\Author
122
+ ```
123
+
124
+ ### EXAMPLE 2
125
+
126
+ ```powershell
127
+ PS master:\> Export-Role -Filter sitecore\*
128
+ ```
129
+
130
+ ### EXAMPLE 3
131
+
132
+ ```powershell
133
+ PS master:\> Export-Role -Root C:\my\Serialization\Folder\ -Filter *\*
134
+ ```
135
+
136
+ ### EXAMPLE 4
137
+
138
+ ```powershell
139
+ PS master:\> Export-Role -Path C:\my\Serialization\Folder\Authors.role -Identity sitecore\Author
140
+ ```
141
+
142
+ ## Related Topics
143
+
144
+ * [Import-Role](import-role.md)
145
+ * [Export-User](export-user.md)
146
+ * [Import-User](import-user.md)
147
+ * [Export-Item](../packaging/export-item.md)
148
+ * [Import-Item](export-role.md)
149
+ * [https://github.com/SitecorePowerShell/Console/](https://github.com/SitecorePowerShell/Console/)
150
+