I accidentally committed a version with a query problem in Get-SkylineAffectedObject. This version does not contain that search problem.
Signed-off-by: Brian Wuchner <brian.wuchner@gmail.com>
Apologies for the delay on getting this commit to address the final open item in the PR. This change removes the "hit a 429 and retry" logic as it was not effective. Replaced it with a global variable that stores the time of the last query. If a query has happened within the last 501ms we wait before sending. I've issued a few thousand queries with this logic added and have not yet hit the 429 error. The logic to find and report on 429's in a more friendly way still exists, just in case.
Additionally I've implemented a counter to track number of queries that is reset by Connect-SkylineInsights, to track how many queries are executed. This was more of a debugging tool, but felt the overhead was low enough to leave it in for future troubleshooting.
Signed-off-by: Brian Wuchner <brian.wuchner@gmail.com>
Fixing minor issue uncovered by testing where only a product (vCenter Name) was passed to Get-SkylineFinding function. When passed by pipeline, the product was applied to each pipeline input. Making a change to require passing through pipeline by property name only.
Signed-off-by: Brian Wuchner <brian.wuchner@gmail.com>
Function New-HVPool
1. support the setup with json object DesktopSettings.displayProtocolSettings.enableCollaboration
2. support the parameter enableCollaboration
ManualDesktopSpec.VirtualCenter of json file was not taken care of. This could cause new-hvpool fail when creating with json file and there are multiple vcenters added to broker.
Adding 'Get-SscFile','Set-SscFile','New-SscFile','Remove-SscFile','Get-SscLicense','Get-SscvRALicense','Get-SscMinionKey','Set-SscMinionKey' and 'Remove-SscMinionKey' cmdlets.
Initial commit of VMware.SkylineInsightsApi module, containing the following functions:
Connect-SkylineInsights, Disconnect-SkylineInsights, Invoke-SkylineInsightsApi, Get-SkylineFinding, Get-SkylineAffectedObject, Format-SkylineResult, Start-SkylineInsightsApiExplorer
Signed-off-by: Brian Wuchner <brian.wuchner@gmail.com>
Adding support for new functions to SaltStackConfig module. WIth this change items in the SSC Fileserver can get retrieved, modified, created, and removed, license details can be retrieved, and minion keys can be retrieved, modified, and removed.
Signed-off-by: Brian Wuchner <brian.wuchner@gmail.com>
Fixes#536. The fullname vs. full_name options appear to have changed between the techpreview and GA of the API and have been accounted for in this update. Additionally, after making a change so that the error message was present, the second issue showed to be type casting related. For example, the input parameter for PasswordExpires is a switch, but the API was expecting a string. This has been resolved with this commit.
When testing New-VAMIUser, I wanted to confirm success using Get-VAMIUser, but found a new bug where passing in a specific user through the Name property would fail with a vSphere 7 test environment. This commit also includes a fix for that issue.
Changes to New-VAMIUser and Get-VAMIUser have been tested against 6.5, 6.7, and 7.0 environments and should function as expected.
Signed-off-by: Brian Wuchner <brian.wuchner@gmail.com>
Fixes#535 - module using sort instead of sort-object causing unexpected behavior on powershell core/Linux.
Instead of only addressing the issue at hand, I looked for other instances of sort being used instead of sort-object for other modules within this repo and corrected those as well. I think I got most of them, but feel free to raise another issue if you find another. If the sort was in an example/help statement, or was inside the logic/process of the function, I replaced sort with sort-object. In the one case where the sort was only applied to the output I removed the statement -- this way the function user can add the sort in their script and not have to sort output twice. I changed a couple select/where with select-object/where-object along the way as well just as I saw them.
Signed-off-by: Brian Wuchner <brian.wuchner@gmail.com>
Updated Pull Request Requirements section to include examples and added a dco-required section to suggest how to respond to that error.
Signed-off-by: Andy Bidlen <abidlen@gmail.com>
Moving the code to set SslProtocol to a separate parameter instead of hiding it under SkipCertificateCheck.
Updating Module Version to denote this minor change.
Signed-off-by: Brian Wuchner <brian.wuchner@gmail.com>
In the previous version of Connect-SscServer, we assumed that the SaltStack Config master node has an SSL certificate from an authority trusted by the powershell client and that the client supports the same TLS version as the server. However, this may not be the case. Therefore this commit adds support for a switch parameter named SkipCertificateCheck which ignores untrusted certificates and sets support for various TLS versions. All SSC servers I've tested with have only supported Tls12, but lower levels were added to this function for backwards compatibility.
Signed-off-by: Brian Wuchner <brian.wuchner@gmail.com>
Fixes#364 - Get-HVEvent timeout issue
Changes to line 877-879 adds help for a new SqlTimeout parameter added to Get-HVEvent
Changes to line 931-934 add support for the new SqlTimeout parameter with a default value of 30 seconds.
Changes to line 1064 implements the timeout parameter created above when executing the query.
The change to line 1031 resolves an unrelated issue where I was seeing an extra '1' in the output from Get-HVEvent. Adding the `Out-Null` statement is similar to another example in this same function which already existed on line 1065. Adding the `Out-Null` statement did resolve the extra '1' displayed in the output.
Signed-off-by: Brian Wuchner <brian.wuchner@gmail.com>
Fixes#468. In this issue, it is noted that starting with vSphere 7 you need to use SFTP instead of SCP when calling Backup-VCSAToFile. In this commit we are adding SFTP to the Validate Set for the Location Type. Additionally, we add some logic to toggle between SFTP or SCP depending on appliance version and provide warning text that an adjustment was made.
Signed-off-by: Brian Wuchner <brian.wuchner@gmail.com>
Improve Connect-SscServer to accept credentials instead of just plaintext username/password values.
We will make the PlainText parameter set items mandatory, so if you use this parameter set both values need to be provided.
However, if you don't specify any credentials at all as arguments, we will default to the optional Credential parameter set. When the credential parameter set is used but the credential value is null, we will prompt for credentials using Get-Credential.
Signed-off-by: Brian Wuchner <brian.wuchner@gmail.com>
Changing returned columns from Connect-SscServer to be more in line with other PowerCLI cmdlets.
Signed-off-by: Brian Wuchner <brian.wuchner@gmail.com>