Search found 14 matches

by Pallas
Thu Jun 14, 2018 3:13 am
Forum: PowerShell GUIs
Topic: Button - Start Job, how to multiple arguments, how to work with objects
Replies: 33
Views: 5638

Re: Button - Start Job, how to multiple arguments, how to work with objects

does NOT backup: Error: ERROR: Exception calling "SqlBackup" with "1" argument(s): "Backup operation failed." ERROR: + CategoryInfo : NotSpecified: (:) [], MethodInvocationException ERROR: + FullyQualifiedErrorId : FailedOperationException ERROR: + PSComputerName : localhost ERROR: $buttonBackupDBJo...
by Pallas
Thu Jun 14, 2018 3:11 am
Forum: PowerShell GUIs
Topic: Button - Start Job, how to multiple arguments, how to work with objects
Replies: 33
Views: 5638

Re: Button - Start Job, how to multiple arguments, how to work with objects

works: [size=50]$buttonBackupDBJob_Click= { #hier wird die eigentliche Sicherung per Knopfdruck durchgeführt $Global:FileName = $textbox1_FN.Text $Server = $global:MSSQLServer $Database = $Global:SelectedDBName $Path = $Global:Path $Folder = $Global:CC + '\' $FileName = $Global:FileName $BackupSetNa...
by Pallas
Wed Jun 13, 2018 12:32 pm
Forum: PowerShell GUIs
Topic: Button - Start Job, how to multiple arguments, how to work with objects
Replies: 33
Views: 5638

Re: Button - Start Job, how to multiple arguments, how to work with objects

I would say the simplest way would be to build a scriptblock with the SMO backup code, then use the Start-Job to execute in the background. Then, the button execute the code until the process completes. ... That seems an elegant solution. So I sacrifice the use of Button - Start Job, take what is w...
by Pallas
Wed Jun 13, 2018 6:04 am
Forum: PowerShell GUIs
Topic: Button - Start Job, how to multiple arguments, how to work with objects
Replies: 33
Views: 5638

Button - Start Job, how to multiple arguments, how to work with objects

Hi, Although I read carefully "PowerShell Studio: Creating Responsive Forms" and the two topics concerning this issue " Job Tracker help needed " and "Button - Start Job, how to pass arguments" I can not figure out how to pass my working code (click event) to your Button - Start Job click event. I n...