Skip to content
Light Mode Dark Mode
January 13, 20155 min read

Automation Powerhouse: PowerShell, SCCM and Adaptiva OneSite Anywhere

AdobeStock_256229414 1

More PowerShell Please

These days, it’s almost impossible to read a technical blog or community forum without coming across some kind of PowerShell script or snippet to perform some arbitrary function that you absolutely have to have. PowerShell is becoming commonplace within the IT community, and has replaced the good old command shell and VBScripts of yesteryear.

PowerShell support from within a product opens up a game-changing world of possibilities. You can automate, control and customize in ways that otherwise would have involved a number of hacks or longwinded workarounds—if they could even be done at all. SCCM has great support for PowerShell, a huge library of cmdlets and scripts from industry experts.

With the release of OneSite Anywhere 5.5 with PowerShell Fusion, we at Adaptiva can officially say that we have full PowerShell support built into the product suite. That should immediately start turning on those ingenuity lightbulbs!

How PowerShell Fusion Works

Adaptiva is built on top of a very powerful workflow engine which can perform custom systems management functions specified in logic-driven visual programming diagrams. It’s similar in some ways to System Center Orchestrator, but workflows can run on the server, end-user devices, or as a business process with interactive forms and scheduling. These workflows can be integrated into several parts of the product, including the deployment process, client-side events, and server-side events. Workflows can also be converted into stand-alone executables and either run manually or incorporated into any kind of automation task.

Before OneSite Anywhere 5.5 and PowerShell Fusion, the workflow engine could already be used to perform almost any function you could think of, whether that’s working with registry, performing filesystem operations, starting or stopping a service, killing a process, running a command-line or VBScript, or performing several asynchronous operations or logical programming concept such as looping, recursion, iteration etc. On top of these and over 160 built-in activities, we can now throw PowerShell into the mix, and the list of actions that we can perform becomes almost infinite.

SCCM + OneSite Anywhere + PowerShell = Amazing

It is now possible to automate all of those time-consuming, repetitive administrative or housekeeping tasks, run them on-demand or on a schedule, and even build forms around them. For example, imagine being able to fully automate the new hire process. Utilizing a few lines of PowerShell, it would be possible to create a new user account in Active Directory (passing in via a custom form the desired details; name, org unit etc.), move it to the correct OU, set the appropriate properties, set up exchange, retrieve an assigned asset, add the resource into the appropriate ConfigMgr collections to pull down, automatically install the relevant software, etc. By putting these tasks into a workflow, you could treat them as functions, passing data into PowerShell and getting output back. You could then combine this with other functionality, such as querying from a database or a spreadsheet, performing logical tasks and then passing back into PowerShell. Full two-way communication is possible.

On top of this, as any Configuration Manager administrator knows, SCCM has two primary methods of deploying content to machines: Applications and Packages. Both of these content types are designed for installing and uninstalling pieces of software from a device. However, if you want to go beyond installation and uninstallation, things start to get a lot more difficult. When you want to start performing registry changes, dynamically modifying files or performing any kind of logic-based function based on variable factors such as machine location, logged on user, AD security group etc., complications arise, and that’s when things like script-wrappers come into play.

Instead of using a script wrapper, Adaptiva OneSite Anywhere provides the ability to specify a workflow. A piece of content can be sent to a collection of machines, and then a workflow can be executed either before the download starts, during the download, or after the download has completed. It is therefore possible to deploy a piece of content, execute a command line against it and then incorporate a full, event-driven logical workflow at any stage of the deployment process.

When combined with PowerShell, the functionality this provides becomes insane. Being able to run any PowerShell script at time of deployment to perform any client-side function. This could be used to do things such as add a printer, add a windows feature, reboot the computer, stop a running service if it exists, kill a running process, query the installed drivers, invoke a WMI method, export client data to a CSV and upload it to a file server etc. The possibilities are endless.

Tool Foundry: A Productivity Multiplier

We’re only just hitting the tip of the iceberg at the moment. The real power comes when you start leveraging the power of Tool Foundry, Adaptiva’s hidden gem. This built-in feature allows you to take a workflow and turn it into a stand-alone executable. You can now take any PowerShell script, incorporate it into a workflow (along with all other logic and other workflow actions) and then turn that into an executable file (.exe).

You could then incorporate this .exe into any automation process you desire, including adding into an SCCM task sequence. The .exe is still tied to the workflow, so if functionality needs to change, the workflow can be modified server-side and will get updated automatically so that the next time the .exe is run, it will execute the new version of the workflow, without having to distribute a new .exe.

This Changes Everything

As you can probably tell, the addition of PowerShell to OneSite Anywhere is monumental. Our workflow engine delivers power and ease of use unmatched by rival technologies. With PowerShell Fusion, we deliver orders of magnitude greater control and automation. You have universal PowerShell access for any purpose: client-side automation, server-side automation or even just a convenient way to execute PowerShell scripts and further actions with the resultant data.

To learn more visit OneSite Anywhere here.

AdobeStock_488605053

Ready to Get Started?

Schedule a one-on-one demo today.

Request a Demo