@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.
- package/README.md +3 -0
- package/dist/bundle.js +106 -12
- package/dist/register.js +7 -0
- package/dist/register.js.map +1 -1
- package/dist/tools/powershell/documentation/add-basetemplate.md +137 -0
- package/dist/tools/powershell/documentation/add-itemacl.md +254 -0
- package/dist/tools/powershell/documentation/add-itemversion.md +231 -0
- package/dist/tools/powershell/documentation/add-placeholdersetting.md +410 -0
- package/dist/tools/powershell/documentation/add-rendering.md +217 -0
- package/dist/tools/powershell/documentation/add-rolemember.md +88 -0
- package/dist/tools/powershell/documentation/clear-itemacl.md +131 -0
- package/dist/tools/powershell/documentation/close-window.md +32 -0
- package/dist/tools/powershell/documentation/commands-list.md +134 -0
- package/dist/tools/powershell/documentation/convertfrom-clixml.md +67 -0
- package/dist/tools/powershell/documentation/convertfrom-itemclone.md +118 -0
- package/dist/tools/powershell/documentation/convertto-clixml.md +66 -0
- package/dist/tools/powershell/documentation/disable-user.md +89 -0
- package/dist/tools/powershell/documentation/enable-user.md +89 -0
- package/dist/tools/powershell/documentation/expand-token.md +144 -0
- package/dist/tools/powershell/documentation/export-item.md +165 -0
- package/dist/tools/powershell/documentation/export-package.md +129 -0
- package/dist/tools/powershell/documentation/export-role.md +150 -0
- package/dist/tools/powershell/documentation/export-updatepackage.md +111 -0
- package/dist/tools/powershell/documentation/export-user.md +147 -0
- package/dist/tools/powershell/documentation/find-item.md +718 -0
- package/dist/tools/powershell/documentation/get-archive.md +73 -0
- package/dist/tools/powershell/documentation/get-archiveitem.md +138 -0
- package/dist/tools/powershell/documentation/get-cache.md +62 -0
- package/dist/tools/powershell/documentation/get-database.md +96 -0
- package/dist/tools/powershell/documentation/get-domain.md +75 -0
- package/dist/tools/powershell/documentation/get-item.md +186 -0
- package/dist/tools/powershell/documentation/get-itemacl.md +168 -0
- package/dist/tools/powershell/documentation/get-itemclone.md +100 -0
- package/dist/tools/powershell/documentation/get-itemclonenotification.md +95 -0
- package/dist/tools/powershell/documentation/get-itemfield.md +182 -0
- package/dist/tools/powershell/documentation/get-itemreference.md +152 -0
- package/dist/tools/powershell/documentation/get-itemreferrer.md +154 -0
- package/dist/tools/powershell/documentation/get-itemtemplate.md +152 -0
- package/dist/tools/powershell/documentation/get-itemworkflowevent.md +133 -0
- package/dist/tools/powershell/documentation/get-layout.md +142 -0
- package/dist/tools/powershell/documentation/get-layoutdevice.md +97 -0
- package/dist/tools/powershell/documentation/get-package.md +63 -0
- package/dist/tools/powershell/documentation/get-placeholdersetting.md +477 -0
- package/dist/tools/powershell/documentation/get-preset.md +70 -0
- package/dist/tools/powershell/documentation/get-rendering.md +248 -0
- package/dist/tools/powershell/documentation/get-renderingparameter.md +84 -0
- package/dist/tools/powershell/documentation/get-role.md +134 -0
- package/dist/tools/powershell/documentation/get-rolemember.md +131 -0
- package/dist/tools/powershell/documentation/get-scriptsession.md +128 -0
- package/dist/tools/powershell/documentation/get-searchindex.md +92 -0
- package/dist/tools/powershell/documentation/get-session.md +107 -0
- package/dist/tools/powershell/documentation/get-sitecorejob.md +102 -0
- package/dist/tools/powershell/documentation/get-spemodule.md +134 -0
- package/dist/tools/powershell/documentation/get-spemodulefeatureroot.md +113 -0
- package/dist/tools/powershell/documentation/get-taskschedule.md +136 -0
- package/dist/tools/powershell/documentation/get-updatepackagediff.md +110 -0
- package/dist/tools/powershell/documentation/get-user.md +193 -0
- package/dist/tools/powershell/documentation/get-useragent.md +38 -0
- package/dist/tools/powershell/documentation/import-function.md +83 -0
- package/dist/tools/powershell/documentation/import-item-1.md +180 -0
- package/dist/tools/powershell/documentation/import-item.md +180 -0
- package/dist/tools/powershell/documentation/import-role.md +137 -0
- package/dist/tools/powershell/documentation/import-user.md +137 -0
- package/dist/tools/powershell/documentation/initialize-item.md +87 -0
- package/dist/tools/powershell/documentation/initialize-searchindex.md +116 -0
- package/dist/tools/powershell/documentation/initialize-searchindexitem.md +85 -0
- package/dist/tools/powershell/documentation/install-package.md +95 -0
- package/dist/tools/powershell/documentation/install-updatepackage.md +90 -0
- package/dist/tools/powershell/documentation/invoke-javascript.md +22 -0
- package/dist/tools/powershell/documentation/invoke-script.md +111 -0
- package/dist/tools/powershell/documentation/invoke-shellcommand.md +144 -0
- package/dist/tools/powershell/documentation/invoke-workflow.md +142 -0
- package/dist/tools/powershell/documentation/lock-item.md +157 -0
- package/dist/tools/powershell/documentation/login-user.md +56 -0
- package/dist/tools/powershell/documentation/logout-user.md +30 -0
- package/dist/tools/powershell/documentation/merge-layout.md +102 -0
- package/dist/tools/powershell/documentation/new-domain.md +72 -0
- package/dist/tools/powershell/documentation/new-explicitfilesource.md +104 -0
- package/dist/tools/powershell/documentation/new-explicititemsource.md +146 -0
- package/dist/tools/powershell/documentation/new-filesource.md +128 -0
- package/dist/tools/powershell/documentation/new-itemacl.md +175 -0
- package/dist/tools/powershell/documentation/new-itemclone.md +139 -0
- package/dist/tools/powershell/documentation/new-itemsource.md +171 -0
- package/dist/tools/powershell/documentation/new-itemworkflowevent.md +140 -0
- package/dist/tools/powershell/documentation/new-package.md +81 -0
- package/dist/tools/powershell/documentation/new-placeholdersetting.md +255 -0
- package/dist/tools/powershell/documentation/new-rendering.md +243 -0
- package/dist/tools/powershell/documentation/new-role.md +56 -0
- package/dist/tools/powershell/documentation/new-securitysource.md +176 -0
- package/dist/tools/powershell/documentation/new-user.md +161 -0
- package/dist/tools/powershell/documentation/new-usingblock.md +95 -0
- package/dist/tools/powershell/documentation/out-download.md +123 -0
- package/dist/tools/powershell/documentation/protect-item.md +120 -0
- package/dist/tools/powershell/documentation/publish-item.md +224 -0
- package/dist/tools/powershell/documentation/read-variable.md +252 -0
- package/dist/tools/powershell/documentation/receive-file.md +244 -0
- package/dist/tools/powershell/documentation/receive-itemclonenotification.md +116 -0
- package/dist/tools/powershell/documentation/receive-scriptsession.md +108 -0
- package/dist/tools/powershell/documentation/remove-archiveitem.md +125 -0
- package/dist/tools/powershell/documentation/remove-basetemplate.md +137 -0
- package/dist/tools/powershell/documentation/remove-domain.md +70 -0
- package/dist/tools/powershell/documentation/remove-itemversion.md +209 -0
- package/dist/tools/powershell/documentation/remove-layout.md +151 -0
- package/dist/tools/powershell/documentation/remove-placeholdersetting.md +478 -0
- package/dist/tools/powershell/documentation/remove-rendering.md +253 -0
- package/dist/tools/powershell/documentation/remove-renderingparameter.md +83 -0
- package/dist/tools/powershell/documentation/remove-role.md +70 -0
- package/dist/tools/powershell/documentation/remove-rolemember.md +79 -0
- package/dist/tools/powershell/documentation/remove-scriptsession.md +72 -0
- package/dist/tools/powershell/documentation/remove-searchindexitem.md +79 -0
- package/dist/tools/powershell/documentation/remove-session.md +77 -0
- package/dist/tools/powershell/documentation/remove-user.md +97 -0
- package/dist/tools/powershell/documentation/reset-itemfield.md +149 -0
- package/dist/tools/powershell/documentation/reset-layout.md +130 -0
- package/dist/tools/powershell/documentation/restart-application.md +30 -0
- package/dist/tools/powershell/documentation/restore-archiveitem.md +126 -0
- package/dist/tools/powershell/documentation/resume-searchindex.md +84 -0
- package/dist/tools/powershell/documentation/send-file.md +160 -0
- package/dist/tools/powershell/documentation/send-sheermessage.md +66 -0
- package/dist/tools/powershell/documentation/set-hostproperty.md +90 -0
- package/dist/tools/powershell/documentation/set-itemacl.md +158 -0
- package/dist/tools/powershell/documentation/set-itemtemplate.md +156 -0
- package/dist/tools/powershell/documentation/set-layout.md +166 -0
- package/dist/tools/powershell/documentation/set-rendering.md +213 -0
- package/dist/tools/powershell/documentation/set-renderingparameter.md +97 -0
- package/dist/tools/powershell/documentation/set-user.md +221 -0
- package/dist/tools/powershell/documentation/set-userpassword.md +109 -0
- package/dist/tools/powershell/documentation/show-alert.md +53 -0
- package/dist/tools/powershell/documentation/show-application.md +150 -0
- package/dist/tools/powershell/documentation/show-confirm.md +61 -0
- package/dist/tools/powershell/documentation/show-fieldeditor.md +231 -0
- package/dist/tools/powershell/documentation/show-input.md +129 -0
- package/dist/tools/powershell/documentation/show-listview.md +276 -0
- package/dist/tools/powershell/documentation/show-modaldialog.md +137 -0
- package/dist/tools/powershell/documentation/show-result.md +158 -0
- package/dist/tools/powershell/documentation/show-yesnocancel.md +92 -0
- package/dist/tools/powershell/documentation/start-scriptsession.md +230 -0
- package/dist/tools/powershell/documentation/start-taskschedule.md +124 -0
- package/dist/tools/powershell/documentation/stop-scriptsession.md +78 -0
- package/dist/tools/powershell/documentation/stop-searchindex.md +84 -0
- package/dist/tools/powershell/documentation/suspend-searchindex.md +84 -0
- package/dist/tools/powershell/documentation/switch-rendering.md +248 -0
- package/dist/tools/powershell/documentation/test-account.md +74 -0
- package/dist/tools/powershell/documentation/test-basetemplate.md +97 -0
- package/dist/tools/powershell/documentation/test-itemacl.md +182 -0
- package/dist/tools/powershell/documentation/test-rule.md +111 -0
- package/dist/tools/powershell/documentation/unlock-item.md +124 -0
- package/dist/tools/powershell/documentation/unlock-user.md +84 -0
- package/dist/tools/powershell/documentation/unprotect-item.md +124 -0
- package/dist/tools/powershell/documentation/update-itemreferrer.md +234 -0
- package/dist/tools/powershell/documentation/update-listview.md +139 -0
- package/dist/tools/powershell/documentation/update-searchindexitem.md +79 -0
- package/dist/tools/powershell/documentation/wait-scriptsession.md +100 -0
- package/dist/tools/powershell/documentation/write-log.md +82 -0
- package/dist/tools/powershell/get-powershell-documentation.d.ts +2 -0
- package/dist/tools/powershell/get-powershell-documentation.js +47 -0
- package/dist/tools/powershell/get-powershell-documentation.js.map +1 -0
- package/dist/tools/powershell/run-powershell-script.d.ts +3 -0
- package/dist/tools/powershell/run-powershell-script.js +13 -0
- package/dist/tools/powershell/run-powershell-script.js.map +1 -0
- package/dist/tools/sitecore-cli/get-sitecore-cli-documentation.d.ts +3 -0
- package/dist/tools/sitecore-cli/get-sitecore-cli-documentation.js +24 -0
- package/dist/tools/sitecore-cli/get-sitecore-cli-documentation.js.map +1 -0
- package/dist/tools/sitecore-cli/sitecore-cli-documentation.md +70 -0
- package/package.json +8 -8
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# Send-File
|
|
2
|
+
|
|
3
|
+
Allows users to download files from server and file items from media library.
|
|
4
|
+
|
|
5
|
+
## Syntax
|
|
6
|
+
|
|
7
|
+
Send-File \[-Path\] <String> \[-Message <String>\] \[-NoDialog\] \[-ShowFullPath\] \[-Title <String>\] \[-Width <Int32>\] \[-Height <Int32>\]
|
|
8
|
+
|
|
9
|
+
Send-File \[-Item\] <Item> \[-Message <String>\] \[-NoDialog\] \[-ShowFullPath\] \[-Title <String>\] \[-Width <Int32>\] \[-Height <Int32>\]
|
|
10
|
+
|
|
11
|
+
## Detailed Description
|
|
12
|
+
|
|
13
|
+
Executing this command with file path on the server provides script users with means to download a file to their computer. Executing it for an Item located in Sitecore Media library allows the user to download the blob stored in that item. If the file has been downloaded the dialog returns "downloaded" string, otherwise "cancelled" is returned.
|
|
14
|
+
|
|
15
|
+
© 2010-2019 Adam Najmanowicz, Michael West. All rights reserved. Sitecore PowerShell Extensions
|
|
16
|
+
|
|
17
|
+
## Aliases
|
|
18
|
+
|
|
19
|
+
The following abbreviations are aliases for this cmdlet:
|
|
20
|
+
|
|
21
|
+
* Download-File
|
|
22
|
+
|
|
23
|
+
## Parameters
|
|
24
|
+
|
|
25
|
+
### -Path <String>
|
|
26
|
+
|
|
27
|
+
Path to the file to be downloaded. The file has to exist in the Data folder. Files from outside the Data folder are not downloadable.
|
|
28
|
+
|
|
29
|
+
| Aliases | |
|
|
30
|
+
| :--- | :--- |
|
|
31
|
+
| Required? | true |
|
|
32
|
+
| Position? | 1 |
|
|
33
|
+
| Default Value | |
|
|
34
|
+
| Accept Pipeline Input? | true \(ByValue, ByPropertyName\) |
|
|
35
|
+
| Accept Wildcard Characters? | false |
|
|
36
|
+
|
|
37
|
+
### -Message <String>
|
|
38
|
+
|
|
39
|
+
Message to show the user in the download dialog.
|
|
40
|
+
|
|
41
|
+
| Aliases | |
|
|
42
|
+
| :--- | :--- |
|
|
43
|
+
| Required? | false |
|
|
44
|
+
| Position? | named |
|
|
45
|
+
| Default Value | |
|
|
46
|
+
| Accept Pipeline Input? | false |
|
|
47
|
+
| Accept Wildcard Characters? | false |
|
|
48
|
+
|
|
49
|
+
### -Item <Item>
|
|
50
|
+
|
|
51
|
+
The item to be downloaded.
|
|
52
|
+
|
|
53
|
+
| Aliases | |
|
|
54
|
+
| :--- | :--- |
|
|
55
|
+
| Required? | true |
|
|
56
|
+
| Position? | 1 |
|
|
57
|
+
| Default Value | |
|
|
58
|
+
| Accept Pipeline Input? | true \(ByValue\) |
|
|
59
|
+
| Accept Wildcard Characters? | false |
|
|
60
|
+
|
|
61
|
+
### -NoDialog <SwitchParameter>
|
|
62
|
+
|
|
63
|
+
If this parameter is used the Dialog will not be shown but instead the file download will begin immediately.
|
|
64
|
+
|
|
65
|
+
| Aliases | |
|
|
66
|
+
| :--- | :--- |
|
|
67
|
+
| Required? | false |
|
|
68
|
+
| Position? | named |
|
|
69
|
+
| Default Value | |
|
|
70
|
+
| Accept Pipeline Input? | false |
|
|
71
|
+
| Accept Wildcard Characters? | false |
|
|
72
|
+
|
|
73
|
+
### -ShowFullPath <SwitchParameter>
|
|
74
|
+
|
|
75
|
+
If this parameter is used the Dialog will display full path to the file downloaded in the dialog, otherwise only the file name will be shown.
|
|
76
|
+
|
|
77
|
+
| Aliases | |
|
|
78
|
+
| :--- | :--- |
|
|
79
|
+
| Required? | false |
|
|
80
|
+
| Position? | named |
|
|
81
|
+
| Default Value | |
|
|
82
|
+
| Accept Pipeline Input? | false |
|
|
83
|
+
| Accept Wildcard Characters? | false |
|
|
84
|
+
|
|
85
|
+
### -Title <String>
|
|
86
|
+
|
|
87
|
+
Download dialog title.
|
|
88
|
+
|
|
89
|
+
| Aliases | |
|
|
90
|
+
| :--- | :--- |
|
|
91
|
+
| Required? | false |
|
|
92
|
+
| Position? | named |
|
|
93
|
+
| Default Value | |
|
|
94
|
+
| Accept Pipeline Input? | false |
|
|
95
|
+
| Accept Wildcard Characters? | false |
|
|
96
|
+
|
|
97
|
+
### -Width <Int32>
|
|
98
|
+
|
|
99
|
+
Download dialog width.
|
|
100
|
+
|
|
101
|
+
| Aliases | |
|
|
102
|
+
| :--- | :--- |
|
|
103
|
+
| Required? | false |
|
|
104
|
+
| Position? | named |
|
|
105
|
+
| Default Value | |
|
|
106
|
+
| Accept Pipeline Input? | false |
|
|
107
|
+
| Accept Wildcard Characters? | false |
|
|
108
|
+
|
|
109
|
+
### -Height <Int32>
|
|
110
|
+
|
|
111
|
+
Download dialog height.
|
|
112
|
+
|
|
113
|
+
| Aliases | |
|
|
114
|
+
| :--- | :--- |
|
|
115
|
+
| Required? | false |
|
|
116
|
+
| Position? | named |
|
|
117
|
+
| Default Value | |
|
|
118
|
+
| Accept Pipeline Input? | false |
|
|
119
|
+
| Accept Wildcard Characters? | false |
|
|
120
|
+
|
|
121
|
+
## Inputs
|
|
122
|
+
|
|
123
|
+
The input type is the type of the objects that you can pipe to the cmdlet.
|
|
124
|
+
|
|
125
|
+
* Sitecore.Data.Items.Item
|
|
126
|
+
|
|
127
|
+
## Outputs
|
|
128
|
+
|
|
129
|
+
The output type is the type of the objects that the cmdlet emits.
|
|
130
|
+
|
|
131
|
+
* System.String
|
|
132
|
+
|
|
133
|
+
## Notes
|
|
134
|
+
|
|
135
|
+
Help Author: Adam Najmanowicz, Michael West
|
|
136
|
+
|
|
137
|
+
## Examples
|
|
138
|
+
|
|
139
|
+
### EXAMPLE 1
|
|
140
|
+
|
|
141
|
+
Download File from server disk drive
|
|
142
|
+
|
|
143
|
+
```powershell
|
|
144
|
+
PS master:\> Send-File -Path "C:\Projects\ZenGarden\Data\packages\Sitecore PowerShell Extensions-6.0.zip"
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### EXAMPLE 2
|
|
148
|
+
|
|
149
|
+
Download item from media library
|
|
150
|
+
|
|
151
|
+
```powershell
|
|
152
|
+
PS master:\> Get-Item "master:/media library/Showcase/awesome_logo" | Send-File -Message "Awesome Logo"
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## Related Topics
|
|
156
|
+
|
|
157
|
+
* [Receive-File](receive-file.md)
|
|
158
|
+
* [Out-Download](out-download.md)
|
|
159
|
+
* [https://github.com/SitecorePowerShell/Console/](https://github.com/SitecorePowerShell/Console/)
|
|
160
|
+
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Send-SheerMessage
|
|
2
|
+
|
|
3
|
+
Sends a sheer message to the app in which context the script is executing.
|
|
4
|
+
|
|
5
|
+
## Syntax
|
|
6
|
+
|
|
7
|
+
Send-SheerMessage \[-Name\] <String> \[-GetResult\] \[-Parameters <Hashtable>\]
|
|
8
|
+
|
|
9
|
+
## Detailed Description
|
|
10
|
+
|
|
11
|
+
Sends a sheer message to the app in which context the script is executing.
|
|
12
|
+
|
|
13
|
+
© 2010-2019 Adam Najmanowicz, Michael West. All rights reserved. Sitecore PowerShell Extensions
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
### -Name <String>
|
|
18
|
+
|
|
19
|
+
Name of the Sheer message to execute.
|
|
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
|
+
### -GetResult <SwitchParameter>
|
|
30
|
+
|
|
31
|
+
| Aliases | |
|
|
32
|
+
| :--- | :--- |
|
|
33
|
+
| Required? | false |
|
|
34
|
+
| Position? | named |
|
|
35
|
+
| Default Value | |
|
|
36
|
+
| Accept Pipeline Input? | false |
|
|
37
|
+
| Accept Wildcard Characters? | false |
|
|
38
|
+
|
|
39
|
+
### -Parameters <Hashtable>
|
|
40
|
+
|
|
41
|
+
| Aliases | |
|
|
42
|
+
| :--- | :--- |
|
|
43
|
+
| Required? | false |
|
|
44
|
+
| Position? | named |
|
|
45
|
+
| Default Value | |
|
|
46
|
+
| Accept Pipeline Input? | false |
|
|
47
|
+
| Accept Wildcard Characters? | false |
|
|
48
|
+
|
|
49
|
+
## Notes
|
|
50
|
+
|
|
51
|
+
Help Author: Adam Najmanowicz, Michael West
|
|
52
|
+
|
|
53
|
+
## Examples
|
|
54
|
+
|
|
55
|
+
### EXAMPLE
|
|
56
|
+
|
|
57
|
+
If you execute the following script in the PowerShell ISE the Save dialog will popup
|
|
58
|
+
|
|
59
|
+
```powershell
|
|
60
|
+
Send-SheerMessage -Name 'ise:save'
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Related Topics
|
|
64
|
+
|
|
65
|
+
* [https://github.com/SitecorePowerShell/Console/](https://github.com/SitecorePowerShell/Console/)
|
|
66
|
+
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# Set-HostProperty
|
|
2
|
+
|
|
3
|
+
Sets the current host property.
|
|
4
|
+
|
|
5
|
+
## Syntax
|
|
6
|
+
|
|
7
|
+
Set-HostProperty \[-ForegroundColor <Black \| DarkBlue \| DarkGreen \| DarkCyan \| DarkRed \| DarkMagenta \| DarkYellow \| Gray \| DarkGray \| Blue \| Green \| Cyan \| Red \| Magenta \| Yellow \| White>\] \[-BackgroundColor <Black \| DarkBlue \| DarkGreen \| DarkCyan \| DarkRed \| DarkMagenta \| DarkYellow \| Gray \| DarkGray \| Blue \| Green \| Cyan \| Red \| Magenta \| Yellow \| White>\] \[-HostWidth <Int32>\] \[-Persist\]
|
|
8
|
+
|
|
9
|
+
## Detailed Description
|
|
10
|
+
|
|
11
|
+
Sets the current host property and perssits them for the future if used with -Persist parameter.
|
|
12
|
+
|
|
13
|
+
© 2010-2019 Adam Najmanowicz, Michael West. All rights reserved. Sitecore PowerShell Extensions
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
### -ForegroundColor <ConsoleColor>
|
|
18
|
+
|
|
19
|
+
Color of the console text.
|
|
20
|
+
|
|
21
|
+
| Aliases | |
|
|
22
|
+
| :--- | :--- |
|
|
23
|
+
| Required? | false |
|
|
24
|
+
| Position? | named |
|
|
25
|
+
| Default Value | |
|
|
26
|
+
| Accept Pipeline Input? | false |
|
|
27
|
+
| Accept Wildcard Characters? | false |
|
|
28
|
+
|
|
29
|
+
### -BackgroundColor <ConsoleColor>
|
|
30
|
+
|
|
31
|
+
Color of the console background.
|
|
32
|
+
|
|
33
|
+
| Aliases | |
|
|
34
|
+
| :--- | :--- |
|
|
35
|
+
| Required? | false |
|
|
36
|
+
| Position? | named |
|
|
37
|
+
| Default Value | |
|
|
38
|
+
| Accept Pipeline Input? | false |
|
|
39
|
+
| Accept Wildcard Characters? | false |
|
|
40
|
+
|
|
41
|
+
### -HostWidth <Int32>
|
|
42
|
+
|
|
43
|
+
Width of the text buffer \(texts longer than the number provided will wrap to the next line.
|
|
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
|
+
### -Persist <SwitchParameter>
|
|
54
|
+
|
|
55
|
+
Persist the console setting provided
|
|
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
|
+
## Notes
|
|
66
|
+
|
|
67
|
+
Help Author: Adam Najmanowicz, Michael West
|
|
68
|
+
|
|
69
|
+
## Examples
|
|
70
|
+
|
|
71
|
+
### EXAMPLE 1
|
|
72
|
+
|
|
73
|
+
Set width of the console buffer to 80 and persist it for the future instances
|
|
74
|
+
|
|
75
|
+
```powershell
|
|
76
|
+
PS master:\> Set-HostProperty -HostWidth 80 -Persist
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### EXAMPLE 2
|
|
80
|
+
|
|
81
|
+
Set color of the console text to cyan. Next instance of the console will revert to default \(white\).
|
|
82
|
+
|
|
83
|
+
```powershell
|
|
84
|
+
PS master:\> Set-HostProperty -ForegroundColor Cyan
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Related Topics
|
|
88
|
+
|
|
89
|
+
* [https://github.com/SitecorePowerShell/Console/](https://github.com/SitecorePowerShell/Console/)
|
|
90
|
+
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
# Set-ItemAcl
|
|
2
|
+
|
|
3
|
+
Sets new security information on an item overwriting the previous settings.
|
|
4
|
+
|
|
5
|
+
## Syntax
|
|
6
|
+
|
|
7
|
+
```powershell
|
|
8
|
+
Set-ItemAcl -AccessRules <AccessRuleCollection> [-Path] <String> [-PassThru]
|
|
9
|
+
Set-ItemAcl -AccessRules <AccessRuleCollection> -Id <String> [-Database <String>] [-PassThru]
|
|
10
|
+
Set-ItemAcl -AccessRules <AccessRuleCollection> [-Item] <Item> [-PassThru]
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Detailed Description
|
|
14
|
+
|
|
15
|
+
Sets new security information on an item. The new rules will overwrite the existing security descriptors on the item.
|
|
16
|
+
|
|
17
|
+
© 2010-2019 Adam Najmanowicz, Michael West. All rights reserved. Sitecore PowerShell Extensions
|
|
18
|
+
|
|
19
|
+
## Parameters
|
|
20
|
+
|
|
21
|
+
### -AccessRules <AccessRuleCollection>
|
|
22
|
+
|
|
23
|
+
A single or multiple access rules created e.g. through the New-ItemAcl or obtained from other item using the Get-ItemAcl cmdlet. This information will overwrite the existing security descriptors on the item.
|
|
24
|
+
|
|
25
|
+
| Aliases | |
|
|
26
|
+
| :--- | :--- |
|
|
27
|
+
| Required? | true |
|
|
28
|
+
| Position? | named |
|
|
29
|
+
| Default Value | |
|
|
30
|
+
| Accept Pipeline Input? | false |
|
|
31
|
+
| Accept Wildcard Characters? | false |
|
|
32
|
+
|
|
33
|
+
### -PassThru <SwitchParameter>
|
|
34
|
+
|
|
35
|
+
Passes the processed object back into the pipeline.
|
|
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
|
+
### -Item <Item>
|
|
46
|
+
|
|
47
|
+
The item to be processed.
|
|
48
|
+
|
|
49
|
+
| Aliases | |
|
|
50
|
+
| :--- | :--- |
|
|
51
|
+
| Required? | true |
|
|
52
|
+
| Position? | 1 |
|
|
53
|
+
| Default Value | |
|
|
54
|
+
| Accept Pipeline Input? | true \(ByValue, ByPropertyName\) |
|
|
55
|
+
| Accept Wildcard Characters? | false |
|
|
56
|
+
|
|
57
|
+
### -Path <String>
|
|
58
|
+
|
|
59
|
+
Path to the item to be processed.
|
|
60
|
+
|
|
61
|
+
| Aliases | |
|
|
62
|
+
| :--- | :--- |
|
|
63
|
+
| Required? | true |
|
|
64
|
+
| Position? | 1 |
|
|
65
|
+
| Default Value | |
|
|
66
|
+
| Accept Pipeline Input? | false |
|
|
67
|
+
| Accept Wildcard Characters? | false |
|
|
68
|
+
|
|
69
|
+
### -Id <String>
|
|
70
|
+
|
|
71
|
+
Id of the item to be processed. Requires the Database parameter to be specified.
|
|
72
|
+
|
|
73
|
+
| Aliases | |
|
|
74
|
+
| :--- | :--- |
|
|
75
|
+
| Required? | true |
|
|
76
|
+
| Position? | named |
|
|
77
|
+
| Default Value | |
|
|
78
|
+
| Accept Pipeline Input? | false |
|
|
79
|
+
| Accept Wildcard Characters? | false |
|
|
80
|
+
|
|
81
|
+
### -Database <String>
|
|
82
|
+
|
|
83
|
+
Database containing the item to be fetched with Id parameter.
|
|
84
|
+
|
|
85
|
+
| Aliases | |
|
|
86
|
+
| :--- | :--- |
|
|
87
|
+
| Required? | false |
|
|
88
|
+
| Position? | named |
|
|
89
|
+
| Default Value | |
|
|
90
|
+
| Accept Pipeline Input? | false |
|
|
91
|
+
| Accept Wildcard Characters? | false |
|
|
92
|
+
|
|
93
|
+
## Inputs
|
|
94
|
+
|
|
95
|
+
The input type is the type of the objects that you can pipe to the cmdlet.
|
|
96
|
+
|
|
97
|
+
* can be piped from another cmdlet\* Sitecore.Data.Items.Item
|
|
98
|
+
|
|
99
|
+
## Outputs
|
|
100
|
+
|
|
101
|
+
The output type is the type of the objects that the cmdlet emits.
|
|
102
|
+
|
|
103
|
+
* Only if -PassThru is used\* Sitecore.Data.Items.Item
|
|
104
|
+
|
|
105
|
+
## Notes
|
|
106
|
+
|
|
107
|
+
Help Author: Adam Najmanowicz, Michael West
|
|
108
|
+
|
|
109
|
+
## Examples
|
|
110
|
+
|
|
111
|
+
### EXAMPLE 1
|
|
112
|
+
|
|
113
|
+
Take the security information from the Home item and apply it to the Settings item
|
|
114
|
+
|
|
115
|
+
```powershell
|
|
116
|
+
$acl = Get-ItemAcl -Path master:\content\home
|
|
117
|
+
Set-ItemAcl -Path master:\content\Settings -AccessRules $acl -PassThru
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### EXAMPLE 2
|
|
121
|
+
|
|
122
|
+
Allows the "sitecore\adam" user to delete the Home item and all of its children. Denies the "sitecore\mikey" user reading the descendants of the Home item. ;P The security info is created prior to setting it to the item. The item is delivered to the Set-ItemAcl from the pipeline and returned to the pipeline after processing due to the -PassThru parameter. Any previuous security information on the item is removed.
|
|
123
|
+
|
|
124
|
+
```powershell
|
|
125
|
+
$acl1 = New-ItemAcl -AccessRight item:delete -PropagationType Any -SecurityPermission AllowAccess -Identity "sitecore\adam"
|
|
126
|
+
$acl2 = New-ItemAcl -AccessRight item:read -PropagationType Descendants -SecurityPermission DenyAccess -Identity "sitecore\mikey"
|
|
127
|
+
Get-Item -Path master:\content\home | Set-ItemAcl -AccessRules $acl1, $acl2 -PassThru
|
|
128
|
+
|
|
129
|
+
Name Children Languages Id TemplateName
|
|
130
|
+
---- -------- --------- -- ------------
|
|
131
|
+
Home False {en, ja-JP, de-DE, da} {110D559F-DEA5-42EA-9C1C-8A5DF7E70EF9} Sample Item
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### EXAMPLE 3
|
|
135
|
+
|
|
136
|
+
The following applies a new set of AccessRule to an item using `Set-ItemAcl` and `New-ItemAcl` when the PropogationType and SecurityPermission are the same.
|
|
137
|
+
|
|
138
|
+
```powershell
|
|
139
|
+
$role = "sitecore\yourrole"
|
|
140
|
+
$rights = @("item:create", "item:write", "item:rename", "item:delete")
|
|
141
|
+
|
|
142
|
+
Get-Item -Path master:\content\youritem | Set-ItemAcl -AccessRules ($rights | ForEach-Object { New-ItemAcl -AccessRight $_ -PropagationType Any -SecurityPermission AllowAccess -Identity $role })
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## Related Topics
|
|
146
|
+
|
|
147
|
+
* [https://github.com/SitecorePowerShell/Console/](https://github.com/SitecorePowerShell/Console/)
|
|
148
|
+
* [Add-ItemAcl](add-itemacl.md)
|
|
149
|
+
* [Clear-ItemAcl](clear-itemacl.md)
|
|
150
|
+
* [Get-ItemAcl](get-itemacl.md)
|
|
151
|
+
* [New-ItemAcl](new-itemacl.md)
|
|
152
|
+
* [Test-ItemAcl](test-itemacl.md)
|
|
153
|
+
* [https://sdn.sitecore.net/upload/sitecore6/security\_administrators\_cookbook\_a4.pdf](https://sdn.sitecore.net/upload/sitecore6/security_administrators_cookbook_a4.pdf)
|
|
154
|
+
* [https://sdn.sitecore.net/upload/sitecore6/61/security\_reference-a4.pdf](https://sdn.sitecore.net/upload/sitecore6/61/security_reference-a4.pdf)
|
|
155
|
+
* [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)
|
|
156
|
+
* [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)
|
|
157
|
+
* [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/)
|
|
158
|
+
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
# Set-ItemTemplate
|
|
2
|
+
|
|
3
|
+
Sets the item template.
|
|
4
|
+
|
|
5
|
+
## Syntax
|
|
6
|
+
|
|
7
|
+
```powershell
|
|
8
|
+
Set-ItemTemplate -Item <Item> -TemplateItem <TemplateItem> [-FieldsToCopy <Hashtable>]
|
|
9
|
+
Set-ItemTemplate -Item <Item> -Template <String> [-FieldsToCopy <Hashtable>]
|
|
10
|
+
Set-ItemTemplate -Path <String> -TemplateItem <TemplateItem> [-FieldsToCopy <Hashtable>]
|
|
11
|
+
Set-ItemTemplate -Path <String> -Template <String> [-FieldsToCopy <Hashtable>]
|
|
12
|
+
Set-ItemTemplate -Id <String> -TemplateItem <TemplateItem> [-FieldsToCopy <Hashtable>]
|
|
13
|
+
Set-ItemTemplate -Id <String> -Template <String> [-FieldsToCopy <Hashtable>]
|
|
14
|
+
Set-ItemTemplate [-Database <String>] [-FieldsToCopy <Hashtable>]
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Detailed Description
|
|
18
|
+
|
|
19
|
+
The Set-ItemTemplate command sets the template for an item.
|
|
20
|
+
|
|
21
|
+
© 2010-2019 Adam Najmanowicz, Michael West. All rights reserved. Sitecore PowerShell Extensions
|
|
22
|
+
|
|
23
|
+
## Parameters
|
|
24
|
+
|
|
25
|
+
### -Item <Item>
|
|
26
|
+
|
|
27
|
+
The item to set the template for.
|
|
28
|
+
|
|
29
|
+
| Aliases | |
|
|
30
|
+
| :--- | :--- |
|
|
31
|
+
| Required? | true |
|
|
32
|
+
| Position? | named |
|
|
33
|
+
| Default Value | |
|
|
34
|
+
| Accept Pipeline Input? | true \(ByValue\) |
|
|
35
|
+
| Accept Wildcard Characters? | false |
|
|
36
|
+
|
|
37
|
+
### -Path <String>
|
|
38
|
+
|
|
39
|
+
Path to the item to set the template for.
|
|
40
|
+
|
|
41
|
+
| Aliases | |
|
|
42
|
+
| :--- | :--- |
|
|
43
|
+
| Required? | true |
|
|
44
|
+
| Position? | named |
|
|
45
|
+
| Default Value | |
|
|
46
|
+
| Accept Pipeline Input? | false |
|
|
47
|
+
| Accept Wildcard Characters? | false |
|
|
48
|
+
|
|
49
|
+
### -Id <String>
|
|
50
|
+
|
|
51
|
+
Id of the item to set the template for.
|
|
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
|
+
### -TemplateItem <TemplateItem>
|
|
62
|
+
|
|
63
|
+
Sitecore item representing the template.
|
|
64
|
+
|
|
65
|
+
| Aliases | |
|
|
66
|
+
| :--- | :--- |
|
|
67
|
+
| Required? | true |
|
|
68
|
+
| Position? | named |
|
|
69
|
+
| Default Value | |
|
|
70
|
+
| Accept Pipeline Input? | false |
|
|
71
|
+
| Accept Wildcard Characters? | false |
|
|
72
|
+
|
|
73
|
+
### -Template <String>
|
|
74
|
+
|
|
75
|
+
Path representing the template item. This must be of the same database as the item to be altered.
|
|
76
|
+
|
|
77
|
+
| Aliases | |
|
|
78
|
+
| :--- | :--- |
|
|
79
|
+
| Required? | true |
|
|
80
|
+
| Position? | named |
|
|
81
|
+
| Default Value | |
|
|
82
|
+
| Accept Pipeline Input? | false |
|
|
83
|
+
| Accept Wildcard Characters? | false |
|
|
84
|
+
|
|
85
|
+
### -FieldsToCopy <Hashtable>
|
|
86
|
+
|
|
87
|
+
Hashtable of key value pairs mapping the old template field to a new template field.
|
|
88
|
+
|
|
89
|
+
@{"Title"="Headline";"Text"="Copy"}
|
|
90
|
+
|
|
91
|
+
| Aliases | |
|
|
92
|
+
| :--- | :--- |
|
|
93
|
+
| Required? | false |
|
|
94
|
+
| Position? | named |
|
|
95
|
+
| Default Value | |
|
|
96
|
+
| Accept Pipeline Input? | false |
|
|
97
|
+
| Accept Wildcard Characters? | false |
|
|
98
|
+
|
|
99
|
+
### -Database <String>
|
|
100
|
+
|
|
101
|
+
Database containing the item to set the template for - required if item is specified with Id.
|
|
102
|
+
|
|
103
|
+
| Aliases | |
|
|
104
|
+
| :--- | :--- |
|
|
105
|
+
| Required? | false |
|
|
106
|
+
| Position? | named |
|
|
107
|
+
| Default Value | |
|
|
108
|
+
| Accept Pipeline Input? | false |
|
|
109
|
+
| Accept Wildcard Characters? | false |
|
|
110
|
+
|
|
111
|
+
## Inputs
|
|
112
|
+
|
|
113
|
+
The input type is the type of the objects that you can pipe to the cmdlet.
|
|
114
|
+
|
|
115
|
+
* Sitecore.Data.Items.Item
|
|
116
|
+
|
|
117
|
+
## Notes
|
|
118
|
+
|
|
119
|
+
Help Author: Adam Najmanowicz, Michael West, Alex Washtell
|
|
120
|
+
|
|
121
|
+
## Examples
|
|
122
|
+
|
|
123
|
+
### EXAMPLE 1
|
|
124
|
+
|
|
125
|
+
Set template of /sitecore/content/home item using a Template path.
|
|
126
|
+
|
|
127
|
+
```powershell
|
|
128
|
+
Set-ItemTemplate -Path master:/sitecore/content/home -Template "/sitecore/templates/User Defined/Page"
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### EXAMPLE 2
|
|
132
|
+
|
|
133
|
+
Set template of /sitecore/content/home item using a TemplateItem.
|
|
134
|
+
|
|
135
|
+
```powershell
|
|
136
|
+
$template = Get-ItemTemplate -Path master:\content\home\page1
|
|
137
|
+
Set-ItemTemplate -Path master:\content\home\page2 -TemplateItem $template
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### EXAMPLE 3
|
|
141
|
+
|
|
142
|
+
Set the template and remap fields to their new name.
|
|
143
|
+
|
|
144
|
+
```powershell
|
|
145
|
+
Set-ItemTemplate -Path "master:\content\home\Page1" `
|
|
146
|
+
-Template "User Defined/Target" `
|
|
147
|
+
-FieldsToCopy @{Field1="Field4"; Field2="Field5"; Field3="Field6"}
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
## Related Topics
|
|
151
|
+
|
|
152
|
+
* [Get-ItemTemplate](get-itemtemplate.md)
|
|
153
|
+
* [Add-BaseTemplate](add-basetemplate.md)
|
|
154
|
+
* [Remove-BaseTemplate](remove-basetemplate.md)
|
|
155
|
+
* [https://github.com/SitecorePowerShell/Console/](https://github.com/SitecorePowerShell/Console/)
|
|
156
|
+
|