3

I've made several powershell script for my customers. They have very little knowledge about SharePoint and Powershell.

I want to let them run these scripts when they want, but don't want them to learn SharePoint Management shell.

What is the proper way to provide these scripts to the (power) users?

  • 1
    what sort of permissions do these "power users" have, both within SharePoint, and on the farm's servers? Normally the term "power user" refers to a site owner or admin who never sniffs the server. If that's the case they'll never be able to run powershell scripts directly. – Derek Gusoff May 29 '13 at 17:46
  • I didn't even see that. I'd assume these are admins with access to the server but no knowledge of PowerShell. Otherwise scripts wouldn't even be an option. Maybe he can elaborate? – RJ Cuthbertson May 29 '13 at 18:08
  • Good point, in this particular case they actually do have access to the server, but that is not always the case. Maybe I can make something that can run predefined scripts from Sharepoint ? – williamwmy May 29 '13 at 20:46
  • Probably use the Client Side Object Model in those cases. Each case depends on the situation. – RJ Cuthbertson May 30 '13 at 13:51
3

Give them a GUI : )

You could package the scripts into a console application with a simple menu to automate everything.

Execute PowerShell Script from C# with Commandline Arguments

Or a WPF application. That would work too (and would look a heck of a lot nicer).

WPF & PowerShell – Part 1 ( Hello World & Welcome to the Week of WPF)

Just some more-user-friendly ideas.

| improve this answer | |
3

Create a batch file(a text file with an extension of .bat). Inside the batch file write:

powershell .\myscript.ps1

Put the batch file in the same directory as your PowerShell scripts. Your users can just double click the batch file. Easy as it gets. Make sure you explicitly load the SharePoint snap-in in your PowerShell scripts:

Add-PSSnapin Microsoft.SharePoint.Powershell
| improve this answer | |
1

Have you tried PowerShell ISE? Check this link Download Powershell

ISE is an Integrated Development Environment to run and debug powershell in a more friendly way.

Hope this helps

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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