@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,252 @@
|
|
|
1
|
+
# Read-Variable
|
|
2
|
+
|
|
3
|
+
Prompts user to provide values for variables required by the script to perform its operation.
|
|
4
|
+
|
|
5
|
+
## Syntax
|
|
6
|
+
|
|
7
|
+
```powershell
|
|
8
|
+
Read-Variable [-Parameters <Object[]>] [-Description <String>] [-CancelButtonName <String>] [-OkButtonName <String>] [-ShowHints] [-Validator <ScriptBlock>] [-Title <String>] [-Width <Int32>] [-Height <Int32>]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Detailed Description
|
|
12
|
+
|
|
13
|
+
Prompts user to provide values for variables required by the script to perform its operation. If user selects the "OK" button the command will return 'ok' as its value. If user selects the "Cancel" button or closes the window with the "x" button at the top-right corner of the dialog the command will return 'cancel' as its value.
|
|
14
|
+
|
|
15
|
+
© 2010-2019 Adam Najmanowicz, Michael West. All rights reserved. Sitecore PowerShell Extensions
|
|
16
|
+
|
|
17
|
+
## Parameters
|
|
18
|
+
|
|
19
|
+
### -Parameters <Object\[\]>
|
|
20
|
+
|
|
21
|
+
Specifies the variables that value should be provided by the user. Each variable definition can have the following structure:
|
|
22
|
+
|
|
23
|
+
* Name - the name of the PowerShell variable - without the $ sign
|
|
24
|
+
* Value - the initial value of the variable - if the variable have not been created prior to launching the dialog - this will be its value unless the user changes it. if Value is not specified - the existing variable name will be used.
|
|
25
|
+
* Title - The title for the variable shown above the variable editor.
|
|
26
|
+
* Tooltip - The hint describing the parameter further - if the -ShowHints parameter is provided this value will show between the Variable Title and the variable editor.
|
|
27
|
+
* Editor - If the default editor selected does not provide the functionality expected - you can specify this value to customize it \(see examples\)
|
|
28
|
+
* Tab - if this parameter is specified on any Variable the multi-tab dialog will be used instead of a simple one. Provide the tab name on which the variable editor should appear.
|
|
29
|
+
|
|
30
|
+
Variable type specific:
|
|
31
|
+
|
|
32
|
+
* Root - for some Item selecting editors you can provide this to limit the selection to only part of the tree
|
|
33
|
+
* Source - for some Item selecting editors you can provide this to parametrize the item selection editor. \(Refer to examples for some sample usages\)
|
|
34
|
+
* Lines - for String variable you can select this parameter if you want to present the user with the multiline editor. The for this parameter is the number of lines that the editor will be configured with.
|
|
35
|
+
* Domain - for user and role selectors you can limit the users & roles presented to only the domain - specified\)
|
|
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
|
+
### -Description <String>
|
|
46
|
+
|
|
47
|
+
Dialog description displayed below the dialog title.
|
|
48
|
+
|
|
49
|
+
| Aliases | |
|
|
50
|
+
| :--- | :--- |
|
|
51
|
+
| Required? | false |
|
|
52
|
+
| Position? | named |
|
|
53
|
+
| Default Value | |
|
|
54
|
+
| Accept Pipeline Input? | false |
|
|
55
|
+
| Accept Wildcard Characters? | false |
|
|
56
|
+
|
|
57
|
+
### -CancelButtonName <String>
|
|
58
|
+
|
|
59
|
+
Text shown on the cancel button.
|
|
60
|
+
|
|
61
|
+
| Aliases | |
|
|
62
|
+
| :--- | :--- |
|
|
63
|
+
| Required? | false |
|
|
64
|
+
| Position? | named |
|
|
65
|
+
| Default Value | |
|
|
66
|
+
| Accept Pipeline Input? | false |
|
|
67
|
+
| Accept Wildcard Characters? | false |
|
|
68
|
+
|
|
69
|
+
### -OkButtonName <String>
|
|
70
|
+
|
|
71
|
+
Text shown on the OK button.
|
|
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
|
+
### -ShowHints <SwitchParameter>
|
|
82
|
+
|
|
83
|
+
Specifies whether the variable hints should be displayed. Hints are shown below each the variable title but above the variable editing control.
|
|
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
|
+
### -Validator <ScriptBlock>
|
|
94
|
+
|
|
95
|
+
| Aliases | |
|
|
96
|
+
| :--- | :--- |
|
|
97
|
+
| Required? | false |
|
|
98
|
+
| Position? | named |
|
|
99
|
+
| Default Value | |
|
|
100
|
+
| Accept Pipeline Input? | false |
|
|
101
|
+
| Accept Wildcard Characters? | false |
|
|
102
|
+
|
|
103
|
+
### -Title <String>
|
|
104
|
+
|
|
105
|
+
Dialog title - shown at the top of the dialog.
|
|
106
|
+
|
|
107
|
+
| Aliases | |
|
|
108
|
+
| :--- | :--- |
|
|
109
|
+
| Required? | false |
|
|
110
|
+
| Position? | named |
|
|
111
|
+
| Default Value | |
|
|
112
|
+
| Accept Pipeline Input? | false |
|
|
113
|
+
| Accept Wildcard Characters? | false |
|
|
114
|
+
|
|
115
|
+
### -Width <Int32>
|
|
116
|
+
|
|
117
|
+
Dialog width.
|
|
118
|
+
|
|
119
|
+
| Aliases | |
|
|
120
|
+
| :--- | :--- |
|
|
121
|
+
| Required? | false |
|
|
122
|
+
| Position? | named |
|
|
123
|
+
| Default Value | |
|
|
124
|
+
| Accept Pipeline Input? | false |
|
|
125
|
+
| Accept Wildcard Characters? | false |
|
|
126
|
+
|
|
127
|
+
### -Height <Int32>
|
|
128
|
+
|
|
129
|
+
Dialog width.
|
|
130
|
+
|
|
131
|
+
| Aliases | |
|
|
132
|
+
| :--- | :--- |
|
|
133
|
+
| Required? | false |
|
|
134
|
+
| Position? | named |
|
|
135
|
+
| Default Value | |
|
|
136
|
+
| Accept Pipeline Input? | false |
|
|
137
|
+
| Accept Wildcard Characters? | false |
|
|
138
|
+
|
|
139
|
+
## Inputs
|
|
140
|
+
|
|
141
|
+
The input type is the type of the objects that you can pipe to the cmdlet.
|
|
142
|
+
|
|
143
|
+
* Sitecore.Data.Items.Item
|
|
144
|
+
|
|
145
|
+
## Outputs
|
|
146
|
+
|
|
147
|
+
The output type is the type of the objects that the cmdlet emits.
|
|
148
|
+
|
|
149
|
+
* System.String
|
|
150
|
+
|
|
151
|
+
## Notes
|
|
152
|
+
|
|
153
|
+
Help Author: Adam Najmanowicz, Michael West
|
|
154
|
+
|
|
155
|
+
## Examples
|
|
156
|
+
|
|
157
|
+
### EXAMPLE 1
|
|
158
|
+
|
|
159
|
+
The following provides a dialog with a dropdown of options, and how to read the selected value.
|
|
160
|
+
|
|
161
|
+
```powershell
|
|
162
|
+
$options = @{
|
|
163
|
+
"A"="a"
|
|
164
|
+
"B"="b"
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
$props = @{
|
|
168
|
+
Parameters = @(
|
|
169
|
+
@{Name="selectedOption"; Title="Choose an option"; Options=$options; Tooltip="Choose one."}
|
|
170
|
+
)
|
|
171
|
+
Title = "Option selector"
|
|
172
|
+
Description = "Choose the right option."
|
|
173
|
+
Width = 300
|
|
174
|
+
Height = 300
|
|
175
|
+
ShowHints = $true
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
$result = Read-Variable @props
|
|
179
|
+
|
|
180
|
+
if($result -eq "ok")
|
|
181
|
+
{
|
|
182
|
+
Write-Host "You chose: $($selectedOption)"
|
|
183
|
+
}
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### EXAMPLE 2
|
|
187
|
+
|
|
188
|
+
Following is an example of a simple dialog asking user for various variable types.
|
|
189
|
+
|
|
190
|
+
The type of some of the controls displayed to the user are iferred from the variable type \(like the $item variable or DateTime\) The editors for some other are set by providing the "editor" value
|
|
191
|
+
|
|
192
|
+
```powershell
|
|
193
|
+
$item = Get-Item master:\content\home
|
|
194
|
+
$result = Read-Variable -Parameters `
|
|
195
|
+
@{ Name = "someText"; Value="Some Text"; Title="Single Line Text"; Tooltip="Tooltip for singleline"; Placeholder="You see this when text box is empty"},
|
|
196
|
+
@{ Name = "multiText"; Value="Multiline Text"; Title="Multi Line Text"; lines=3; Tooltip="Tooltip for multiline"; Placeholder="You will see this when text box is empty"},
|
|
197
|
+
@{ Name = "from"; Value=[System.DateTime]::Now.AddDays(-5); Title="Start Date"; Tooltip="Date since when you want the report to run"; Editor="date time"},
|
|
198
|
+
@{ Name = "user"; Value=$me; Title="Select User"; Tooltip="Tooltip for user"; Editor="user multiple"},
|
|
199
|
+
@{ Name = "item"; Title="Start Item"; Root="/sitecore/content/"} `
|
|
200
|
+
-Description "This Dialog shows less editors, it doesn't need tabs as there is less of the edited variables" `
|
|
201
|
+
-Title "Initialise various variable types (without tabs)" -Width 500 -Height 480 -OkButtonName "Proceed" -CancelButtonName "Abort"
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
### EXAMPLE 3
|
|
205
|
+
|
|
206
|
+
Following is an example of a multi tabbed dialog asking user for various variable types.
|
|
207
|
+
|
|
208
|
+
The type of some of the controls displayed to the user are inferred from the variable type \(like the $item variable or DateTime\) The editors for some other are set by providing the "editor" value
|
|
209
|
+
|
|
210
|
+
```powershell
|
|
211
|
+
$item = Get-Item master:\content\home
|
|
212
|
+
$result = Read-Variable -Parameters `
|
|
213
|
+
@{ Name = "silent"; Value=$true; Title="Proceed Silently"; Tooltip="Check this if you don't want to be interrupted"; Tab="Simple"},
|
|
214
|
+
@{ Name = "someText"; Value="Some Text"; Title="Text"; Tooltip="Just a single line of Text"; Tab="Simple"; Placeholder="You see this when text box is empty"},
|
|
215
|
+
@{ Name = "multiText"; Value="Multiline Text"; Title="Longer Text"; lines=3; Tooltip="You can put multi line text here"; Tab="Simple"; Placeholder="You see this when text box is empty"},
|
|
216
|
+
@{ Name = "number"; Value=110; Title="Integer"; Tooltip="I need this number too"; Tab="Simple"},
|
|
217
|
+
@{ Name = "fraction"; Value=1.1; Title="Float"; Tooltip="I'm just a bit over 1"; Tab="Simple"},
|
|
218
|
+
@{ Name = "from"; Value=[System.DateTime]::Now.AddDays(-5); Title="Start Date"; Tooltip="Date since when you want the report to run"; Editor="date time"; Tab="Time"},
|
|
219
|
+
@{ Name = "fromDate"; Value=[System.DateTime]::Now.AddDays(-5); Title="Start Date"; Tooltip="Date since when you want the report to run"; Editor="date"; Tab="Time"},
|
|
220
|
+
@{ Name = "item"; Title="Start Item"; Root="/sitecore/content/"; Tab="Items"},
|
|
221
|
+
@{ Name = "items"; Title="Bunch of Templates";
|
|
222
|
+
Source="DataSource=/sitecore/templates&DatabaseName=master&IncludeTemplatesForDisplay=Node,Folder,Template,Template Folder&IncludeTemplatesForSelection=Template";
|
|
223
|
+
editor="treelist"; Tab="Items"},
|
|
224
|
+
@{ Name = "items2"; Title="Bunch of Templates";
|
|
225
|
+
Source="DataSource=/sitecore/templates&DatabaseName=master&IncludeTemplatesForDisplay=Node,Folder,Template,Template Folder&IncludeTemplatesForSelection=Template";
|
|
226
|
+
editor="multilist"; Tab="More Items"},
|
|
227
|
+
@{ Name = "items3"; Title="Pick One Template";
|
|
228
|
+
Source="DataSource=/sitecore/templates&DatabaseName=master&IncludeTemplatesForDisplay=Node,Folder,Template,Template Folder&IncludeTemplatesForSelection=Template";
|
|
229
|
+
editor="droplist"; Tab="More Items"},
|
|
230
|
+
@{ Name = "user"; Value=$me; Title="Select User"; Tooltip="Tooltip for user"; Editor="user multiple"; Tab="Rights"},
|
|
231
|
+
@{ Name = "role"; Title="Select Role"; Tooltip="Tooltip for role"; Editor="role multiple"; Domain="sitecore"; Tab="Rights"}, `
|
|
232
|
+
@{ Name = "userOrRole"; Title="Select User or Role"; Tooltip="Tooltip for role"; Editor="user role multiple"; Domain="sitecore"; Tab="Rights" } `
|
|
233
|
+
-Description "This Dialog shows all available editors in some configurations, the properties are groupped into tabs" `
|
|
234
|
+
-Title "Initialise various variable types (with tabs)" -Width 600 -Height 640 -OkButtonName "Proceed" -CancelButtonName "Abort" -ShowHints
|
|
235
|
+
if($result -ne "ok")
|
|
236
|
+
{
|
|
237
|
+
Exit
|
|
238
|
+
}
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
## Related Topics
|
|
242
|
+
|
|
243
|
+
* [Show-Alert](show-alert.md)
|
|
244
|
+
* [Show-Application](show-application.md)
|
|
245
|
+
* [Show-Confirm](show-confirm.md)
|
|
246
|
+
* [Show-FieldEditor](show-fieldeditor.md)
|
|
247
|
+
* [Show-Input](show-input.md)
|
|
248
|
+
* [Show-ListView](show-listview.md)
|
|
249
|
+
* [Show-ModalDialog](show-modaldialog.md)
|
|
250
|
+
* [Show-YesNoCancel](show-yesnocancel.md)
|
|
251
|
+
* [https://github.com/SitecorePowerShell/Console/](https://github.com/SitecorePowerShell/Console/)
|
|
252
|
+
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
# Receive-File
|
|
2
|
+
|
|
3
|
+
Shows a dialog to users allowing to upload files to either server file system or items in media library.
|
|
4
|
+
|
|
5
|
+
## Syntax
|
|
6
|
+
|
|
7
|
+
Receive-File \[-Description <String>\] \[-ParentItem\] <Item> \[-Title <String>\] \[-CancelButtonName <String>\] \[-OkButtonName <String>\] \[-Versioned\] \[-Language <String>\] \[-Overwrite\] \[-Unpack\] \[-Width <Int32>\] \[-Height <Int32>\]
|
|
8
|
+
|
|
9
|
+
Receive-File \[-Description <String>\] \[-Path\] <String> \[-Title <String>\] \[-CancelButtonName <String>\] \[-OkButtonName <String>\] \[-Overwrite\] \[-Unpack\] \[-Width <Int32>\] \[-Height <Int32>\]
|
|
10
|
+
|
|
11
|
+
Receive-File \[-ParentItem\] <Item> -AdvancedDialog \[-Width <Int32>\] \[-Height <Int32>\]
|
|
12
|
+
|
|
13
|
+
## Detailed Description
|
|
14
|
+
|
|
15
|
+
Executing this command with file path on the server \(provided as -Path parameter\) provides script users with means to upload a file from their computer. Executing it for an Item located in Sitecore Media library \(provided as -ParentItem\) allows the user to upload the file as a child to that item. If the file has been uploaded the dialog returns path to the file \(in case of file system storage\) or Item that has been created if the file was uplaoded to media library.
|
|
16
|
+
|
|
17
|
+
© 2010-2019 Adam Najmanowicz, Michael West. All rights reserved. Sitecore PowerShell Extensions
|
|
18
|
+
|
|
19
|
+
## Parameters
|
|
20
|
+
|
|
21
|
+
### -Description <String>
|
|
22
|
+
|
|
23
|
+
Dialog description displayed below the dialog title.
|
|
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
|
+
### -ParentItem <Item>
|
|
34
|
+
|
|
35
|
+
The item under which the uploaded media items should be stored.
|
|
36
|
+
|
|
37
|
+
| Aliases | |
|
|
38
|
+
| :--- | :--- |
|
|
39
|
+
| Required? | true |
|
|
40
|
+
| Position? | 1 |
|
|
41
|
+
| Default Value | |
|
|
42
|
+
| Accept Pipeline Input? | true \(ByValue\) |
|
|
43
|
+
| Accept Wildcard Characters? | false |
|
|
44
|
+
|
|
45
|
+
### -Path <String>
|
|
46
|
+
|
|
47
|
+
Path to the folder where uploaded file should be stored.
|
|
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
|
+
### -Title <String>
|
|
58
|
+
|
|
59
|
+
Dialog title - shown at the top of the dialog.
|
|
60
|
+
|
|
61
|
+
| Aliases | |
|
|
62
|
+
| :--- | :--- |
|
|
63
|
+
| Required? | false |
|
|
64
|
+
| Position? | named |
|
|
65
|
+
| Default Value | |
|
|
66
|
+
| Accept Pipeline Input? | false |
|
|
67
|
+
| Accept Wildcard Characters? | false |
|
|
68
|
+
|
|
69
|
+
### -CancelButtonName <String>
|
|
70
|
+
|
|
71
|
+
Text shown on the cancel button.
|
|
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
|
+
### -OkButtonName <String>
|
|
82
|
+
|
|
83
|
+
Text shown on the OK button.
|
|
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
|
+
### -Versioned <SwitchParameter>
|
|
94
|
+
|
|
95
|
+
Indicates that the Media item should be created as a Versioned media item.
|
|
96
|
+
|
|
97
|
+
| Aliases | |
|
|
98
|
+
| :--- | :--- |
|
|
99
|
+
| Required? | false |
|
|
100
|
+
| Position? | named |
|
|
101
|
+
| Default Value | |
|
|
102
|
+
| Accept Pipeline Input? | false |
|
|
103
|
+
| Accept Wildcard Characters? | false |
|
|
104
|
+
|
|
105
|
+
### -Language <String>
|
|
106
|
+
|
|
107
|
+
Specifies the language in which the media item should be created. if not specified - context language is selected.
|
|
108
|
+
|
|
109
|
+
| Aliases | |
|
|
110
|
+
| :--- | :--- |
|
|
111
|
+
| Required? | false |
|
|
112
|
+
| Position? | named |
|
|
113
|
+
| Default Value | |
|
|
114
|
+
| Accept Pipeline Input? | false |
|
|
115
|
+
| Accept Wildcard Characters? | false |
|
|
116
|
+
|
|
117
|
+
### -Overwrite <SwitchParameter>
|
|
118
|
+
|
|
119
|
+
indicates that the upload should overwrite a file or a media item if that one exists. Otherwise a file with a non-confilicting name or a sibling media item is created.
|
|
120
|
+
|
|
121
|
+
| Aliases | |
|
|
122
|
+
| :--- | :--- |
|
|
123
|
+
| Required? | false |
|
|
124
|
+
| Position? | named |
|
|
125
|
+
| Default Value | |
|
|
126
|
+
| Accept Pipeline Input? | false |
|
|
127
|
+
| Accept Wildcard Characters? | false |
|
|
128
|
+
|
|
129
|
+
### -Unpack <SwitchParameter>
|
|
130
|
+
|
|
131
|
+
Indicates that the uplaod is expected to be a ZIP file which should be unpacked when it's received.
|
|
132
|
+
|
|
133
|
+
| Aliases | |
|
|
134
|
+
| :--- | :--- |
|
|
135
|
+
| Required? | false |
|
|
136
|
+
| Position? | named |
|
|
137
|
+
| Default Value | |
|
|
138
|
+
| Accept Pipeline Input? | false |
|
|
139
|
+
| Accept Wildcard Characters? | false |
|
|
140
|
+
|
|
141
|
+
### -AdvancedDialog <SwitchParameter>
|
|
142
|
+
|
|
143
|
+
Shows advanced dialog where user can upload multiple media items and select if the uploaded items are versioned, overwritten and unpacked.
|
|
144
|
+
|
|
145
|
+
| Aliases | |
|
|
146
|
+
| :--- | :--- |
|
|
147
|
+
| Required? | true |
|
|
148
|
+
| Position? | named |
|
|
149
|
+
| Default Value | |
|
|
150
|
+
| Accept Pipeline Input? | false |
|
|
151
|
+
| Accept Wildcard Characters? | false |
|
|
152
|
+
|
|
153
|
+
### -Width <Int32>
|
|
154
|
+
|
|
155
|
+
Dialog width.
|
|
156
|
+
|
|
157
|
+
| Aliases | |
|
|
158
|
+
| :--- | :--- |
|
|
159
|
+
| Required? | false |
|
|
160
|
+
| Position? | named |
|
|
161
|
+
| Default Value | |
|
|
162
|
+
| Accept Pipeline Input? | false |
|
|
163
|
+
| Accept Wildcard Characters? | false |
|
|
164
|
+
|
|
165
|
+
### -Height <Int32>
|
|
166
|
+
|
|
167
|
+
Dialog width.
|
|
168
|
+
|
|
169
|
+
| Aliases | |
|
|
170
|
+
| :--- | :--- |
|
|
171
|
+
| Required? | false |
|
|
172
|
+
| Position? | named |
|
|
173
|
+
| Default Value | |
|
|
174
|
+
| Accept Pipeline Input? | false |
|
|
175
|
+
| Accept Wildcard Characters? | false |
|
|
176
|
+
|
|
177
|
+
## Inputs
|
|
178
|
+
|
|
179
|
+
The input type is the type of the objects that you can pipe to the cmdlet.
|
|
180
|
+
|
|
181
|
+
* Sitecore.Data.Items.Item
|
|
182
|
+
|
|
183
|
+
System.String
|
|
184
|
+
|
|
185
|
+
## Outputs
|
|
186
|
+
|
|
187
|
+
The output type is the type of the objects that the cmdlet emits.
|
|
188
|
+
|
|
189
|
+
* Sitecore.Data.Items.Item
|
|
190
|
+
|
|
191
|
+
System.String
|
|
192
|
+
|
|
193
|
+
## Notes
|
|
194
|
+
|
|
195
|
+
Help Author: Adam Najmanowicz, Michael West
|
|
196
|
+
|
|
197
|
+
## Examples
|
|
198
|
+
|
|
199
|
+
### EXAMPLE 1
|
|
200
|
+
|
|
201
|
+
Upload text.txt file to server disk drive. A new file is created with a non-conflicting name and the path to it is returned
|
|
202
|
+
|
|
203
|
+
```powershell
|
|
204
|
+
PS master:\> Receive-File -Path "C:\temp\upload"
|
|
205
|
+
C:\temp\upload\text_029.txt
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
### EXAMPLE 2
|
|
209
|
+
|
|
210
|
+
Upload text.txt file to media library under the 'master:\media library\Files' item A new media item is created and returned
|
|
211
|
+
|
|
212
|
+
```powershell
|
|
213
|
+
PS master:\> Receive-File -ParentItem (get-item "master:\media library\Files")
|
|
214
|
+
Name Children Languages Id TemplateName
|
|
215
|
+
---- -------- --------- -- ------------
|
|
216
|
+
text False {en} {7B11CE12-C0FC-4650-916C-2FC76F3DCAAF} File
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
### EXAMPLE 3
|
|
220
|
+
|
|
221
|
+
Upload text.txt file to media library under the 'master:\media library\Files' item using advanced dialog. A new media item is created but "undetermined" is returned as the dialog does not return the results.
|
|
222
|
+
|
|
223
|
+
```powershell
|
|
224
|
+
PS master:\> Receive-File (get-item "master:\media library\Files") -AdvancedDialog
|
|
225
|
+
undetermined
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### EXAMPLE 4
|
|
229
|
+
|
|
230
|
+
Upload text.txt file to media library under the 'master:\media library\Files' item. A new versioned media item in Danish language is created and returned. If the media item existed - it will be overwritten.
|
|
231
|
+
|
|
232
|
+
```powershell
|
|
233
|
+
PS master:\> Receive-File -ParentItem (get-item "master:\media library\Files") -Overwrite -Language "da" -Versioned
|
|
234
|
+
Name Children Languages Id TemplateName
|
|
235
|
+
---- -------- --------- -- ------------
|
|
236
|
+
text False {en, da} {307BCF7D-27FD-46FC-BE83-D9ED640CB09F} File
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
## Related Topics
|
|
240
|
+
|
|
241
|
+
* [Send-File](send-file.md)
|
|
242
|
+
* [Out-Download](out-download.md)
|
|
243
|
+
* [https://github.com/SitecorePowerShell/Console/](https://github.com/SitecorePowerShell/Console/)
|
|
244
|
+
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# Receive-ItemCloneNotification
|
|
2
|
+
|
|
3
|
+
## Syntax
|
|
4
|
+
|
|
5
|
+
```powershell
|
|
6
|
+
Receive-ItemCloneNotification [-Notification <Notification>] -Notification <Notification> -Action <None | Accept | Reject | Dismiss> [-NotificationType <Notification | ChildCreatedNotification | FieldChangedNotification | FirstVersionAddedNotification | ItemMovedChildCreatedNotification | ItemMovedChildRemovedNotification | ItemMovedNotification | ItemTreeMovedNotification | ItemVersionNotification | OriginalItemChangedTemplateNotification | VersionAddedNotification>] [-Language <String[]>]
|
|
7
|
+
Receive-ItemCloneNotification [-Item] <Item> -Notification <Notification> -Action <None | Accept | Reject | Dismiss> [-NotificationType <Notification | ChildCreatedNotification | FieldChangedNotification | FirstVersionAddedNotification | ItemMovedChildCreatedNotification | ItemMovedChildRemovedNotification | ItemMovedNotification | ItemTreeMovedNotification | ItemVersionNotification | OriginalItemChangedTemplateNotification | VersionAddedNotification>] [-Language <String[]>]
|
|
8
|
+
Receive-ItemCloneNotification [-Path] <String> -Notification <Notification> -Action <None | Accept | Reject | Dismiss> [-NotificationType <Notification | ChildCreatedNotification | FieldChangedNotification | FirstVersionAddedNotification | ItemMovedChildCreatedNotification | ItemMovedChildRemovedNotification | ItemMovedNotification | ItemTreeMovedNotification | ItemVersionNotification | OriginalItemChangedTemplateNotification | VersionAddedNotification>] [-Language <String[]>]
|
|
9
|
+
Receive-ItemCloneNotification -Id <String> [-Database <String>] -Notification <Notification> -Action <None | Accept | Reject | Dismiss> [-NotificationType <Notification | ChildCreatedNotification | FieldChangedNotification | FirstVersionAddedNotification | ItemMovedChildCreatedNotification | ItemMovedChildRemovedNotification | ItemMovedNotification | ItemTreeMovedNotification | ItemVersionNotification | OriginalItemChangedTemplateNotification | VersionAddedNotification>] [-Language <String[]>]
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Detailed Description
|
|
13
|
+
|
|
14
|
+
© 2010-2019 Adam Najmanowicz, Michael West. All rights reserved. Sitecore PowerShell Extensions
|
|
15
|
+
|
|
16
|
+
## Parameters
|
|
17
|
+
|
|
18
|
+
### -Notification <Notification>
|
|
19
|
+
|
|
20
|
+
| Aliases | |
|
|
21
|
+
| :--- | :--- |
|
|
22
|
+
| Required? | true |
|
|
23
|
+
| Position? | named |
|
|
24
|
+
| Default Value | |
|
|
25
|
+
| Accept Pipeline Input? | true \(ByValue\) |
|
|
26
|
+
| Accept Wildcard Characters? | false |
|
|
27
|
+
|
|
28
|
+
### -Action <NotificationAction>
|
|
29
|
+
|
|
30
|
+
| Aliases | |
|
|
31
|
+
| :--- | :--- |
|
|
32
|
+
| Required? | true |
|
|
33
|
+
| Position? | named |
|
|
34
|
+
| Default Value | |
|
|
35
|
+
| Accept Pipeline Input? | false |
|
|
36
|
+
| Accept Wildcard Characters? | false |
|
|
37
|
+
|
|
38
|
+
### -NotificationType <NotificationType>
|
|
39
|
+
|
|
40
|
+
| Aliases | |
|
|
41
|
+
| :--- | :--- |
|
|
42
|
+
| Required? | false |
|
|
43
|
+
| Position? | named |
|
|
44
|
+
| Default Value | |
|
|
45
|
+
| Accept Pipeline Input? | false |
|
|
46
|
+
| Accept Wildcard Characters? | false |
|
|
47
|
+
|
|
48
|
+
### -Language <String\[\]>
|
|
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
|
+
### -Item <Item>
|
|
59
|
+
|
|
60
|
+
| Aliases | |
|
|
61
|
+
| :--- | :--- |
|
|
62
|
+
| Required? | true |
|
|
63
|
+
| Position? | 1 |
|
|
64
|
+
| Default Value | |
|
|
65
|
+
| Accept Pipeline Input? | true \(ByValue, ByPropertyName\) |
|
|
66
|
+
| Accept Wildcard Characters? | false |
|
|
67
|
+
|
|
68
|
+
### -Path <String>
|
|
69
|
+
|
|
70
|
+
| Aliases | |
|
|
71
|
+
| :--- | :--- |
|
|
72
|
+
| Required? | true |
|
|
73
|
+
| Position? | 1 |
|
|
74
|
+
| Default Value | |
|
|
75
|
+
| Accept Pipeline Input? | false |
|
|
76
|
+
| Accept Wildcard Characters? | false |
|
|
77
|
+
|
|
78
|
+
### -Id <String>
|
|
79
|
+
|
|
80
|
+
| Aliases | |
|
|
81
|
+
| :--- | :--- |
|
|
82
|
+
| Required? | true |
|
|
83
|
+
| Position? | named |
|
|
84
|
+
| Default Value | |
|
|
85
|
+
| Accept Pipeline Input? | false |
|
|
86
|
+
| Accept Wildcard Characters? | false |
|
|
87
|
+
|
|
88
|
+
### -Database <String>
|
|
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
|
+
## Examples
|
|
99
|
+
|
|
100
|
+
### EXAMPLE 1
|
|
101
|
+
|
|
102
|
+
The following gets the cloned `Item`, returns the available notifications, and finally accepts the notifications.
|
|
103
|
+
|
|
104
|
+
```powershell
|
|
105
|
+
$clonedItem = Get-Item -Path "master:" -ID "{9F158637-52C2-4005-8329-21527685CB71}"
|
|
106
|
+
$clonedItem | Get-ItemCloneNotification | Receive-ItemCloneNotification -Action Accept
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### EXAMPLE 2
|
|
110
|
+
|
|
111
|
+
The following gets the cloned `Item`, returns the available notifications, and finally rejects the notifications.
|
|
112
|
+
|
|
113
|
+
```powershell
|
|
114
|
+
$clonedItem = Get-Item -Path "master:" -ID "{9F158637-52C2-4005-8329-21527685CB71}"
|
|
115
|
+
$clonedItem | Get-ItemCloneNotification | Receive-ItemCloneNotification -Action Reject
|
|
116
|
+
```
|