3

I need to have a dialog box with 2 dates at sitecore 8.2 admin page, and call sitecore powershell script with parameters that came from dialog box ? what is the best way to do it ? it seems like SPEAK should be used here. Does any one has some examples ?

2
  • Can you have the dialog in the powershell script itself?
    – adarsh
    Commented Jun 20, 2017 at 7:56
  • @adarsh yes as an option Commented Jun 20, 2017 at 8:22

1 Answer 1

3

You can use this snippet in your powershell script.

$dialog = Read-Variable -Parameters `
@{ Name = "Date1"; Title = "Date 1"; Editor="Date"}, `
@{ Name = "Date2"; Title = "Date 1";  Editor="Date"} `
-Description "Input Date." `
-Width 800 -Height 600 `
-Title "Date Input" `
-OkButtonName "Start" `
-CancelButtonName "Cancel"

if($dialog -ne "ok"){exit}

Write-Host $Date1;

This will create the dialog for inputting the different dates that you need.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.