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-vRABusinessGroupName filter by Name fails on special characters #121

Closed
sammcgeown opened this Issue Apr 4, 2017 · 4 comments

Comments

Projects
None yet
2 participants
@sammcgeown
Contributor

sammcgeown commented Apr 4, 2017

Steps to reproduce

Connect-vRAServer -Server ServerName -Tenant TenantName -User Username
Get-vRABusinessGroupName -Name "Test & in Name"

Expected behavior

Returns the business group or warns that it can't find it.

Actual behavior

Invoke-RestMethod fails with "System request parameter $filter=name eq 'Name is not properly formatted."

Environment data

> $PSVersionTable

> $vRAConnection
@chelnak

This comment has been minimized.

Contributor

chelnak commented Apr 4, 2017

Could you test with %26 in place of the &?

@sammcgeown

This comment has been minimized.

Contributor

sammcgeown commented Apr 4, 2017

Yes - that works and returns the group as expected

@chelnak

This comment has been minimized.

Contributor

chelnak commented Apr 4, 2017

Excellent. Thanks.

@chelnak chelnak closed this in de775d1 Apr 5, 2017

@chelnak

This comment has been minimized.

Contributor

chelnak commented Apr 5, 2017

Will be included in v2.1.0! Thanks @sammcgeown

C:\PowervRA [development+0 ~2 -0 !]> Get-vRABusinessGroup -Name "Hello & Hello"

Name             : Hello & Hello
ID               : 84b139f1-f603-492e-9941-497929ca41dc
Description      : encoding test
Roles            :
ExtensionData    : @{entries=System.Object[]}
GroupManagerRole : {@{domain=vsphere.local; name=cgumbley}}
SupportUserRole  : {}
UserRole         : {}
Tenant           : Tenant01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment