11 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 to help not just yourself but the entire organization.

In this chapter, we will cover two main scenarios related to end-user scripts. The first is providing an automation mechanism to the business. A very common example of this is user account provisioning and deprovisioning. 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.

11.1 Script frontends

11.1.1 SharePoint trial tenant

11.2 Creating a request form

11.2.1 Gathering data

11.2.2 Creating a SharePoint form

11.3 Processing requests

11.3.1 Permissions

11.3.2 Monitoring for new requests

11.3.3 Processing the request

11.4 Running PowerShell script on end-user devices

11.4.1 Custom Git install

11.4.2 Running as system versus the user

11.4.3 Using Active Setup with PowerShell

Summary