-
Notifications
You must be signed in to change notification settings - Fork 33
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-FGTFirewallAddressGroup return showing only 4x member entries... #87
Comments
Good question but i don't known... (i think it is a settings of powershelll)... |
You can override the output of function. But you need to custom the type of object that it returns. $Object = [PSCustomObject]@{}
$Object.PStypeNames.Clear()
$Object.PStypeNames.Add(MyType) You can see the new type with Get-Member : $Object | Get-Member
TypeName: MyType
Name MemberType Definition
---- ---------- ----------
Equals Method bool Equals(System.Object obj)
GetHashCode Method int GetHashCode()
GetType Method type GetType()
ToString Method string ToString() After that, you need to add View in .format.ps1xml. |
Thanks @NicolasBn ! |
can be close ? |
This one I think I would like to put as a future improvement - so that the return from the get-* was a little clearer. Some of my use-cases are very clearly inside a script and the return isn't that important as I'll hide the output and manage it myself, but I think the interactive use-case could definitely benefit from that improvement. I have no idea how best to manage this kind of issue/item... but have no qualms if you just want it closed. I haven't quite wrapped my mind about how I'd go about addressing this as per the above, but haven't looked deep enough (I'm sidetracking myself wanting to see if the API will handle Add-FGTFirewallPolicy with a PolicyID - but more on that later ;) ) |
Ok, i kept for enhance I will look a day for try @NicolasBn solution but actually, I'm only display the direct output of API |
I totally know how to get access to the .Member property, and suspect that this is just a PS behaviour that can't be overridden, but it'd be nice if it could.
When you use Get-FGTFirewallAddressMember, the output shows up to 4 members and then an ellipsis of members... Is there any way to influence that to report them all ?
The text was updated successfully, but these errors were encountered: