Hi All,
For the past few weeks I'm building a deployment script based on Excel-input.
Basiclly to process goes like this;
- you fill in an excel-file with all kind of resources like CPU, MEM, Diskspace but also if you like to install IIS or SQL.
- When starting the script, the system reads all the cells of that excel-sheet and fills in variable that PowerCLI will be using.
- PowerCLi is then creating the VM, based on your input.
- After VM is created, there is only 1 file that will gets executing by invoke-vmscript.
That line looks like;
Invoke-VMScript -vm $VMName -ScriptText "Powershell.exe -ExecutionPolicy Bypass -File c:\PSScripts\StartConfiguration.ps1" -GuestUser administrator -GuestPassword *******
That is a powershell script that will loop through a folder with all kind of PS-scripts. I have to do this so I have a modular deployment-script.
Those PS-scripts on the local VM have write-progress and write-output, but I don't see them in my main-console. The one where I started all of this....
When I launch them on my vm itself, I do see the progress-bar and the output.
How do I get this working that I see the progress within my main-screen?
By the way, I also tried executing one file (with progress-bar...) with invoke-vmscript but also that doens't work
My invoke-vmscript looks like;
Invoke-VMScript -vm $VMName -ScriptText "Powershell.exe -ExecutionPolicy Bypass -File c:\PSScripts\001-WAN-LAN_networkconfig.ps1" -GuestUser administrator -GuestPassword *******
Hope someone knows.
best regards
Dave