32 or 64 bit version of product: x64
Operating system: Windows 10 15063
32 or 64 bit OS: x64
Hi,
Very new to powershell studio and trying to build a simple GUI for a powershell workflow script.
The workflow is to startup and shutdown VMs in Azure Resource Manager on schedules controlled by tags. The workflow has a list of parameters as below.
Code: Select all
workflow Set-AzureRmVmPowerState
{
Param (
[Parameter(Mandatory = $false)]
[string]$SubscriptionName = '********',
[b][Parameter(Mandatory = $false)]
[string]$resourceNameFilter,
[Parameter(Mandatory = $false)]
[string]$resourceGroupFilter,
[/b] [Parameter(Mandatory = $false)]
[bool]$TestOnly = $true,
[Parameter(Mandatory = $false)]
[string]$ShutdownWindowTagName = 'ShutdownSchedule',
[Parameter(Mandatory = $false)]
[string]$ShutdownStartEnabledTagName = 'ShutdownSchedule_AllowStart',
[Parameter(Mandatory = $false)]
[string]$ShutdownStopEnabledTagName = 'ShutdownSchedule_AllowStop',
[Parameter(Mandatory = $false)]
[string]$VMPowerStateCategory = 'Powerstate_Category',
[string]$TimeZone = 'GMT Standard Time',
[string]$VerboseAction = 'Continue'
)
Each text box is for input value for a parameter within the workflow. One for virtual machines and one for an a resource group. (Container for virtual machine).
The textboxes are Named $resNameFilter and $resGroupFilter
I know how to retrieve the text from the text boxes but I am unsure how to pass the text inputted into the text box through to the parameter in the workflow.
$resourceNameFilter
$resourceGroupFilter
The workflow will start but will not do the necessary filtering without the textboxes working as I need.
I also tried a to pass the text box input through to a simple function to test and this did not work so it seems like a scoping issue. I know workflows run within their own scope and also parallel processing within the workflow will also.
Any help or direction in where to find help from would be appreciated.
Davie
DO NOT POST SUBSCRIPTIONS, KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM