We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Passing multiple packagenames to Install/Remove package cmdlet doesn't work correctly. Arrays need to be tested/verified to work correctly.
The text was updated successfully, but these errors were encountered:
Greetings - your project is an excellent idea and could be very useful for Powershell users,
I'm experiencing the following issue when attempting to create an object for New-OPNsenseHAProxyServer
Example from documentation: $webservers = 1..3 | foreach-Object { [OPNsense.HAProxy.Servers.Server]@{ 'name' = ("web" + $.tostring("000")) 'address' = "192.168.0.$" 'port' = '80' 'description' = "Created {0}" -f [DateTime]::now 'mode' = 'active' } } $webservers = $webservers | New-OPNsenseHAProxyServer -Verbose:$beVerbose
I have an array $realServers containing two example servers with additional items for ssl, sslCA, sslVerify:
$realServers
name : server1.example address : 192.168.0.1 port : 443 mode : active ssl : TRUE sslCA : MyCA sslVerify : TRUE
name : server2.example address : 192.168.0.2 port : 443 mode : active ssl : TRUE sslCA : MyCA sslVerify : TRUE
I pipe my array to a modified version of the example:
$webservers = $realServers | foreach-Object { $sslEnabled = $false $sslVerify = $false if ($.ssl -eq "TRUE") {$sslEnabled = $true} if ($.sslVerify -eq "TRUE") {$sslVerify = $true} [OPNsense.HAProxy.Servers.Server]@{ 'name' = $.name 'address' = $.address 'port' = $.port 'description' = $.name+" ("+$.address+")" 'mode' = $.mode 'ssl' = $sslEnabled 'sslCA' = $_.sslCA 'sslVerify' = $sslVerify } }
But the output does not include the additional items requested (mode, ssl, sslCA, sslVerify are missing):
$webservers
Address Description Name Port Uuid
192.168.0.1 server1.example (192.168.0.1) server1.example 443 192.168.0.2 server2.example (192.168.0.2) server2.example 443
Regards
Sorry, something went wrong.
fvanroie
No branches or pull requests
Passing multiple packagenames to Install/Remove package cmdlet doesn't work correctly. Arrays need to be tested/verified to work correctly.
The text was updated successfully, but these errors were encountered: