Examples/scratch.ps1
[string]$manifest_file = 'AnyBox.psd1' if (Test-Path $manifest_file) { Import-Module "./$manifest_file" } elseif (Test-Path "../$manifest_file") { Import-Module "../$manifest_file" } else { # Import-Module AnyBox } # # $resp = Get-GumroadLicense -Permalink 'vgcei' -Key 'F20EBB76-E00D4C53-82C30EF6-313D925B' # $resp = Get-GumroadLicense -Permalink 'dvfkn' -Key '1FF922E4-0B40406E-8A211108-BE60E0AE' # ($resp.Content | ConvertFrom-Json -AsHashtable).purchase $AnyBox = New-Object AnyBox.AnyBox $DevicesList = @('PC-ELAINE','PC-IAN','PC-RICHARD','PC-SAMANTHA') $AnyBox.Prompts = @( New-AnyBoxPrompt -InputType Text -Message "What's the name of the target computer?" -ValidateSet $DevicesList -ShowSetAs Radio -ValidateScript { $_ -Ne '' } ) $AnyBox.Buttons = 'Continue','Cancel' $AnyBox.CancelButton = 'Cancel' $AnyBox.DefaultButton = 'Continue' $AnyBox.Comment = "","Comment line.","" $AnyBox.Message = "Message line 1.","Message line 2." $AnyBox | Show-AnyBox |