12 End-user scripts and forms

 

This chapter covers:

  • Creating a web frontend for a PowerShell automation
  • Processing automation requests
  • Writing PowerShell to execute on client machines

So far, most scripts in this book are backend scripts (e.g., ones you would run locally, on a dedicated machine, or shared with others familiar with PowerShell). However, this is not always the case. PowerShell can assist others in your organization who may not even know what PowerShell is. In this chapter, you will see how you can build and design PowerShell automations not just to help yourself but the entire organization.

We will cover two main scenarios in this chapter related to end-user scripts. This first is providing an automation mechanism to the business. A very common example of this is user account provisioning and de-provisioning. There is a wealth of resources out there on creating users in Active Directory, Exchange, Office 365, and other environments. But you cannot just provide HR a copy of a PowerShell script and expect them to know how to execute it. Instead, you will want to give them a frontend interface to submit requests for automations.

12.1 Script frontends

12.1.1 SharePoint trial tenant

12.2 Creating a request form

12.2.1 Gathering data

12.2.2 Creating a SharePoint form

12.3 Processing requests

12.3.1 Permissions

12.3.2 Monitoring for new requests

12.3.3 Processing the request

12.4 Running PowerShell script on end-user devices

12.4.1 Custom Git install

12.4.2 Running as system versus the user

12.4.3 Using Active Setup with PowerShell

12.5 Summary