Commit Graph

602 Commits

Author SHA1 Message Date
Brian Wuchner
9964e16338 Update VAMI.psm1
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>
2022-02-09 21:17:39 -05:00
Brian Wuchner
248a86f0a2 Fixing instances of sort with sort-object
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>
2022-02-03 20:11:02 -05:00
kamennikolov
9546f492e1 Merge pull request #526 from bwuch/master
Introduced SkipCertificateCheck and SslProtocol parameters to Connect-SSCServer
2022-01-26 15:51:37 +02:00
Brian Wuchner
de17729494 Update SaltStackConfig.psm1
Changing SslProtocol parameter from static validateset list to proper type.

Signed-off-by: Brian Wuchner <brian.wuchner@gmail.com>
2022-01-25 09:59:05 -05:00
Brian Wuchner
c46d3522bd Updates to SSC Module -- provide better SSL support for Connect-SscServer
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>
2022-01-24 14:48:21 -05:00
Charles-Antoine Degennes
5648fe1bec [VMware.HV.Helper.psm1] New-HVPool: check for provisioningTime value
Signed-off-by: Charles-Antoine Degennes <cadegenn@univ-lr.fr>
2022-01-24 08:50:39 +01:00
Charles-Antoine Degennes
e83cfa1b0b [VMware.HV.Helper.psm1] fix issue #524
Signed-off-by: Charles-Antoine Degennes <cadegenn@univ-lr.fr>
2022-01-24 08:50:39 +01:00
Brian Wuchner
4e9093d0e5 Update SaltStackConfig.psm1
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>
2022-01-21 15:11:17 -05:00
kamennikolov
db96e946f3 Merge pull request #512 from Ichigo49/patch-1
Modification on Get-VAMINetwork
remove write-host for hostname and DNS Servers, adding them in the $interfaceResult PSCustomObject
2022-01-14 11:36:56 +02:00
Mayank Goyal
99674644d8 Update VMware.HV.Helper.psm1
Signed-off-by: Mayank Goyal <imtrinity94@gmail.com>
2022-01-14 14:01:18 +05:30
Brian Wuchner
5b291a5ac0 Update VMware.HV.Helper.psm1
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>
2022-01-13 07:59:41 -05:00
Brian Wuchner
33e41a756e Update Backup-VCSA.psm1
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>
2022-01-11 20:25:22 -05:00
Brian Wuchner
05d2016ff0 Update SaltStackConfig.psm1
Minor update to add examples of the new functionality to the help in the function.

Signed-off-by: Brian Wuchner <brian.wuchner@gmail.com>
2021-12-23 19:21:59 -05:00
Brian Wuchner
e293d7e365 Update SaltStackConfig.psm1
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>
2021-12-23 14:24:17 -05:00
dmilov
1d96b6a340 Implement update authentication credential for LDAP identity sources (#516)
Signed-off-by: Dimitar Milov <dmilov@vmware.com>
2021-12-22 12:34:59 +02:00
Ichigo49
7eb5651feb Update VAMI.psm1
Signed-off-by: Mathieu ALLEGRET <mathieu.allegret@pm.me>
2021-12-08 12:32:12 +01:00
Ichigo49
cc2c740738 Update VAMI.psm1
Modification on Get-VAMINetwork
remove write-host for hostnmae and DNS Servers, adding them in the $interfaceResult PSCustomObject
2021-12-08 12:27:50 +01:00
Brian Wuchner
3b7653da71 Minor changes to Connect-SscServer output properties.
Changing returned columns from Connect-SscServer to be more in line with other PowerCLI cmdlets.

Signed-off-by: Brian Wuchner <brian.wuchner@gmail.com>
2021-12-06 15:49:33 -05:00
Brian Wuchner
3afa7eed5d Resolving comments from PR in SaltStackConfig module
Promoting properties on the connection object as requested in PR comment.

Signed-off-by: Brian Wuchner <brian.wuchner@gmail.com>
2021-12-03 12:53:37 -05:00
Brian Wuchner
96205f85b2 Updating SaltStackConfig module
Updated functions based on comments in PR502.  Updated manifest to include Get-SscActivity (previously Get-SscCommand) and reference to new Format.ps1xml, which contains custom formatting for the Connect-SscServer output.

Signed-off-by: Brian Wuchner <brian.wuchner@gmail.com>
2021-12-02 14:39:23 -05:00
Brian Wuchner
ded1ce575d Resolving some of the items from PR comments.
Many thanks to @kamennikolov for his time to review and provide such helpful comments!  This commit address many of the comments from PR 502 in the module psm1 file.  Also updated module manifest to rev version number, changed FunctionsToExport to address Get-SscMinion --> Get-SscMinionCache name change.

Signed-off-by: Brian Wuchner <brian.wuchner@gmail.com>
2021-12-01 11:58:39 -05:00
Brian Wuchner
95abde3a5a Update SaltStackConfig.psm1
Fixing help information in Connect-SscServer to be more descriptive.
Signed-off-by: Brian Wuchner <brian.wuchner@gmail.com>
2021-11-29 06:52:50 -05:00
Brian Wuchner
ba63d1643a Update SaltStackConfig.psd1
Increasing version number in manifest.
Signed-off-by: Brian Wuchner <brian.wuchner@gmail.com>
2021-11-29 06:48:29 -05:00
Brian Wuchner
38998cee05 vRealize Automation SaltStack Config API wrapper
Initial commit of SaltStackConfig module, a series of wrapper functions for the vRealize Automation SaltStack Config API.

Signed-off-by: Brian Wuchner <brian.wuchner@gmail.com>
2021-11-28 21:29:59 -05:00
Matt Frey
ccdddba4e7 Reversing 9d9ebc504b (#492)
The change made in 9d9ebc504b breaks ImagePush operations for Instant Clone pools. See the API documentation for reference.

The schema for `DesktopPushImageSpec` is as follows:

* DesktopPushImageSpec
  * Settings
    * StartTime

Signed-off-by: Matt Frey <mfrey@vmware.com>
2021-11-25 14:35:12 +02:00
Matt Frey
2ec8f92823 Address Issue 496 (#497)
Addressing Issue 496 to resolve the unintentional false condition when `-Value` is set to `$false` on `Set-HVGlobalSettings

Signed-off-by: Matt Frey <mfrey@vmware.com>
2021-11-25 14:34:40 +02:00
dmilov
8830d3ec2d Bug fixes (#499)
* Add Certificates to External Identity Source

Signed-off-by: Dimitar Milov <dmilov@vmware.com>

* Add Credential parameter to Connect-SsoAdminServer

Signed-off-by: Dimitar Milov <dmilov@vmware.com>
2021-11-25 14:18:53 +02:00
ricoroodenburg
9d82c04d72 Update VMware.HV.Helper.psm1 (#489)
Fix for error Get-HVBaseImageVM - Cannot find an overload for "BaseImageVM_List" and the argument count: "1"
2021-10-01 14:31:12 +03:00
dmilov
173c08216e Increase the default web operation timeout (#484)
* Increase the default web operation timeout

Signed-off-by: Dimitar Milov <dmilov@vmware.com>

* Increament module version

Signed-off-by: Dimitar Milov <dmilov@vmware.com>
2021-09-07 11:24:51 +03:00
Nam Tran
dbb570e009 Update VMware.HV.Helper.psm1 (#469) 2021-08-23 14:43:37 +03:00
Dan Acristinii
3c961963f1 Fixed no snapshot found error mistype (#481)
Signed-off-by: Dan Acristinii <dan.acristinii@roche.com>
2021-08-23 14:38:27 +03:00
dmilov
a62b0006b8 Update IconUri (#476)
Signed-off-by: Dimitar Milov <dmilov@vmware.com>
2021-07-28 17:19:55 +03:00
dmilov
5b9265d0ad Update link to powercli log icon (#475)
* Implement feature issue #472

Signed-off-by: Dimitar Milov <dmilov@vmware.com>

* Fix modules manifest to point to powercli log icon

Signed-off-by: Dimitar Milov <dmilov@vmware.com>
2021-07-28 16:28:41 +03:00
dmilov
2b62d20d13 Implement feature issue #472 (#474)
Signed-off-by: Dimitar Milov <dmilov@vmware.com>
2021-07-28 16:23:54 +03:00
dmilov
0cbd85190c Implement Enable/Disable Person Uer account in the Set-SsoPersonUser cmdlet (#471)
Signed-off-by: Dimitar Milov <dmilov@vmware.com>
2021-07-23 15:11:42 +03:00
Rob Nelson
3077daaeb5 DesktopRecomposeSpec does not have a Settings attribute (#464)
Similar adjustment as in #452 to another instance.
2021-06-21 11:02:04 +03:00
dmilov
1dd718eb3a Fix issue #460 adding PasswordExpirationRemainingDays property to the PersonUser object (#463)
Signed-off-by: Dimitar Milov <dmilov@vmware.com>
2021-06-07 10:42:18 +03:00
dmilov
fb641c8a1c License PowerCLI-Examples-Scripts repository under BSD-2 Clause (#462)
As part of the VMware open source program, we have to update this repository with the correct license and copyright information.
We add the BSD-2 Clause License for this repository.
We mark all source code provided by VMware with the Copyright notice under BSD-2 Clause license.

* Update repository license to BSD 2-Clause License

* Update Copyright
2021-06-07 09:58:47 +03:00
dmilov
8de76d1327 Merge pull request #453 from MallocArray/master
Resolve issues with Backup-VCSA
2021-05-28 09:22:13 +03:00
dmilov
53ab16a241 Merge pull request #452 from rnelson0/starttimebug
Recompose with starttime generates error
2021-05-28 09:22:00 +03:00
Dimitar Milov
7b8d982dd3 Implement Find Group By Group
Signed-off-by: Dimitar Milov <dmilov@vmware.com>
2021-05-26 11:11:13 +03:00
Dimitar Milov
5d221fdb15 Implement Add and Remove principal to/from SsoGroup
Signed-off-by: Dimitar Milov <dmilov@vmware.com>
2021-05-26 10:54:15 +03:00
Dimitar Milov
f0cf0f58bd Implement Set-SsoGroup cmdlet
Signed-off-by: Dimitar Milov <dmilov@vmware.com>
2021-05-26 09:44:52 +03:00
Dimitar Milov
04b0807ed5 Implement New and Remove SsoGroup cmdlets.
Signed-off-by: Dimitar Milov <dmilov@vmware.com>
2021-05-25 19:11:15 +03:00
Dimitar Milov
09fad317e1 Refactor advanced functions moving them to dedicated .ps1 file
Signed-off-by: Dimitar Milov <dmilov@vmware.com>
2021-05-25 15:47:52 +03:00
Joshua Post
5a45f4ec85 BackupDays must be all caps for API call to work
When days are in mixed or lower case, the schedule summary page shows
the correct day, but editing the schedule shows a blank and scheduled
executions do not happen.  API reference shows it in all caps which does work as expected.
Attempted to use .ToUpper() on line 319 but it resulted in an error
Changing validation to require it in all caps
2021-05-24 14:50:28 -05:00
Joshua Post
5df4070717 Encrypt Backup is option in VAMI
Change Mandatory to false so it can be optional as shown in the VAMI GUI
2021-05-24 14:48:19 -05:00
Joshua Post
9a02c0e1fa Correct casting of int
Interger is not a valid type, at least in Powershell 5.1
2021-05-24 14:47:07 -05:00
Joshua Post
e872cc50d1 If 'common' is not specified, it is not included
If 'common' is not included, it is unchecked when viewing in the GUI
2021-05-24 14:45:14 -05:00
Joshua Post
9519635847 Add support for SMB location 2021-05-24 14:43:39 -05:00