Skip to content
New issue

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

Get-HPOVProfile -Name $var returns all profiles when $var is empty #405

Closed
uzimmermann42 opened this issue Jun 5, 2019 · 7 comments
Closed
Assignees

Comments

@uzimmermann42
Copy link

uzimmermann42 commented Jun 5, 2019

Please fill in as much information as possible to help resolve your issue.

Expected Behavior

When using an option switch like -Name, it should error when no variable or string is provided

Actual Behavior

It returns all profiles

Steps to reproduce

ps> $shortname
ps> Get-HPOVProfile -Name $shortname

<List of all profiles>

Version Information

HPE OneView PowerShell Library Version (Get-HPOVVersion or $PSLibraryVersion):

HPOV                                LibraryVersion Path
----------------------------        -------------- ----
ApplianceVersion: 4.20.01.385523.01 4.20.1971.1960 C:\Users\...\Documents\WindowsPowerShell\Modules\HPOneView.420\4.20.1...

Output from $PSVersionTable on your Windows Host:

Name                           Value
----                           -----
PSVersion                      5.1.14393.2969
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.14393.2969
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
@ChrisLynchHPE
Copy link
Member

Ah, it appears that the -Name parameter is missing the [ValidateNotNullOrEmpty()] parameter tag. It also appears that a few other parameters in that Cmdlet are missing that parameter tag as well.

I'll get that fixed in the next 4.20 library update.

@ChrisLynchHPE ChrisLynchHPE self-assigned this Jun 5, 2019
@ChrisLynchHPE ChrisLynchHPE added 4.20 Impacts HPE OneView 4.20 library Bug Impact - Low Server Profiles labels Jun 5, 2019
@uzimmermann42
Copy link
Author

Yeah, it caused is a big headache as a coworker had used it with "Get-HPOVProfile -Name $shortname | Remove-HPOVProfile -Confirm:$false -force". The "-force" and the missing [ValidateNotNullOrEmpty()] caused all profiles on that instance to be now in bad states and we have to delete and redo them all. I told him not to use -force.

@ChrisLynchHPE
Copy link
Member

-Force should only be used in rare cases where the hardware management processor (iLO) is not reachable and the profile needs to be removed.

@uzimmermann42
Copy link
Author

uzimmermann42 commented Jun 5, 2019 via email

@uzimmermann42
Copy link
Author

By the way, thanks for the quick response. This was much better than at us say the HPE OneView support via Datacenter Care ... I dread calling them.

ChrisLynchHPE added a commit that referenced this issue Aug 5, 2019
…gForwarding, Set-HPOVApplianceAuditLogForwarding, Test-HPOVApplianceAuditLogForwarding

* Added Consistency Checking parameters to New-HPOVServerProfileTemplate.
* Added Set-HPOVRemoteSupportPrimaryContact to change the Remote Support primary or default contact on the appliance.
* Added HPE Numble storage support to Add-HPOVStorageSystem, New-HPOVStorageVolumeTemplate, New-HPOVStorageVolume, and New-HPOVServerProfileAttachVolume Cmdlets.
* Added Set-HPOVApplianceSnmpV3EngineId to set the appliance SNMPv3 engine id.
* Added Synergy VCFC 32Gb module support to New-HPOVLogicalInterconnectGroup.
* Enhanced Set-HPOVRemoteSupportSetting to allow enable or disable remote support for the provided resource.
* Enhanced Set-HPOVLogicalEnclosure to set a new configuration script for HPE BladeSystem c-Class.
* Enahanced New-HPOVServerProfileTemplate with consistency checking overrides, new in HPE OneView 4.20.
* [#395] Added Reset-HPOVInterconnectNetOpPassword to reset HPE Synergy Virtual Connect NetOp password.
* [#405] Fixed Get-HPOVServerProfile -Name and -InputObject parameters to validate if null or empty.
* Fixed New-HPOVServerProfileAttachVolume misandling target ports, and deprecated parameters.
* Fixed Update-HPOVServerProfile where -Reapply and specific reapply operations were not processing correctly.
* [#411] Fixed Connect-HPOVMgmt not displaying Login Message went set due to API schema change.
@ChrisLynchHPE
Copy link
Member

This was fixed in Release 4.20.2133.3186 and in PowerShell Gallery.

Apologies for the extremely late response to this issue.

Please verify before this issue is closed.

@ChrisLynchHPE
Copy link
Member

Closing due to no further activity. If you wish, feel free to re-open to discuss further.

ChrisLynchHPE referenced this issue Aug 22, 2020
…re when Synergy EBIPA parameters were added.

Signed-off-by: Chris Lynch <chris.lynch@hpe.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants