Mass creation and deletes using powershell
I have a couple basic scripts that take arguments from a master workflow that executes them. Out of 20 requests one fails and that is not consistent. I have added logic if I see another delete action from my workflow running, I wait before executing the next one.
The script (delete only you get the idea): Add-PSSnapin iControlSnapIn
try {
$output = initialize-F5.iControl -HostName $F5device -Username $F5username -Password $F5password
$output = $(Get-F5.iControl).LocalLBVirtualServer.delete_virtual_server( (,$Name) ); return 1 } catch { return "ERROR:$_"
}
The script output...
ion] initialize-F5.iControl : Could not initialize connection with supplied information At C:\vCOcoreScripts\createF5Pool.ps1:7 char:11 + $output = initialize-F5.iControl -HostName $F5device -Username $F5username -Pas ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~ + CategoryInfo : PermissionDenied: (10.40.0.77:String) [Initializ e-F5.iControl], Exception + FullyQualifiedErrorId : 2,iControlSnapIn.CmdLet.Global.InitializeiContro l
com.vmware.o11n.plugin.powershell.util.ssh.SSHException: initialize-F5.iControl : Could not initialize connection with supplied information At C:\vCOcoreScripts\createF5Pool.ps1:7 char:11 + $output = initialize-F5.iControl -HostName $F5device -Username $F5username -Pas ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~ + CategoryInfo : PermissionDenied: (1.1.1.1:String) [Initializ e-F5.iControl], Exception + FullyQualifiedErrorId : 2,iControlSnapIn.CmdLet.Global.InitializeiContro l