Windows PowerShell is one of the most powerful cross-platform task automation solutions which simplifies and automates configurations for almost any tasks in the Windows ecosystem. With solutions packed with a designed command-line shell, scripting language and configuration management framework, the process of automation such as adding network drives, installing apps, uploading security software and granting a new user access to shared files can be streamlined.
Due to its best features over other shells and modern command of accepting and returning .NET objects, it has become the most popular tool among system admins and experienced Windows users. To enhance Windows Device Management, Scalefusion MDM enables IT to upload PowerShell script files and execute them remotely by pushing them on managed Windows 10 devices.
In this article, we will explore the step-by-step process of how the PowerShell scripts can be uploaded and deployed on the managed Windows devices using Scalefusion.
How to deploy & run PowerShell scripts using Scalefusion
Essentials to getting started
1. To begin with, you need to create a Windows device profile in the Scalefusion dashboard and enroll in a Windows 10 device.
2. You need to make sure that the Windows 10 version should be 1809 or above and must be of either edition – Windows Pro, Business, Enterprise, and Education editions.
3. You need to check if the Scalefusion MDM agent is installed in the enrolled Windows device, if not, then please do that before stepping further.
4. You need to make sure that the required storage space is available in the Enterprise store.
5. You need to collect the following details from the developer along with the Enterprise app package:
- Powershell script (.ps1) file
- Also, the file size should be less than 1GB
We aim to upload and install a PowerShell script by following the steps mentioned below.
Sign in to the Scalefusion dashboard and then navigate to the Application Management tab under the features menu on the left-hand side. Click on the Enterprise Store and then move the cursor to click on Upload New App. Then click on “upload Windows App”
Choose PowerShell (PS1) from the drop-down and upload the PS1 file that will execute the script.
After selecting the PowerShell (PS1) from the dropdown, the Windows PowerShell Scripts wizard will initiate the uploading process. Here are the steps of uploading the file:
1. Enter the PowerShell Script name: It will allow you to identify the Device Profiles.
2. Upload the PowerShell Scripts file: You can choose either of the options to upload the script file into the dashboard. These steps are –
- Upload Local File: If you have the PS1 file available locally, you can select and upload it from there.
- PS Script file URL: If you have the file in the host server or have uploaded the file in the cloud servers whose links are accessible to you publicly, then you can use the link to upload the file.
Now, you will have to select the modes in which you want the script to be executed while uploading from the following dropdown:
- Run as a Background: You can choose this option for executing the scripts only if you don’t require UI operations and the command is running in the background without occupying the console. Examples of such mode include running the script for Adding User, Enable/Disable USB, Enable/Disable Windows Update, etc.
- Run as Foreground: You can choose this option if the Scripts based on the UI is being executed and is occupying the console or screen activity such as launching notepad, changing wallpaper which can run in the foreground.
You can select a custom logo and upload it which you want to attribute to the script file. If you don’t upload any customized logo, the default logo will be saved.
Then, click Save.
After clicking on Save, Scalefusion will process the script and save it after successful processing. Now, you can select the device profile in which you want to publish the script and then click publish.
PowerShell is one of the most used shell-scripting languages and Scalefusion MDM is streamlining this powerful tool for task automation and simplifying configuration with the combination of command-line speed, and the flexibility of scripting for automating any task in the Windows environment.