This script is an example demo script that uses Invoke-RestMethod to trigger HPOO workflow. It can be run in eiether a Windows or Linux environment!
Disclaimer: It is a quick and dirty script that does not represent best practice for script development.
In the demo the script was ran on a Windows 10 machine running PowerShell 5.1.
For the Linux demo it was ran on a CentOS 7.4 system.
Obviously the Invoke-RestMethod relies on a configured instance of HPOO installed with the revelant flow and user configured to this only written to run in the demo environment. However, it does give you a basic idea of how you could run the same PowerShell script in both Linux and Windows.
- To install PowerShell in a CentOS 7 platform follow the PowerShell on GitHub instructions.
- You will need git installed on your CentOS and/or Windows machine.
git clone https://github.com/tonyskidmore/PSDemoHPOO.git
- Run PowerShell
cd PSDemoHPOO
./Invoke-HPOOFlow.ps1
pwsh
cd PSDemoHPOO
./Invoke-HPOOFlow.ps1