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

How to view stored objects (Get-FMCAccessPolicyRule) #27

Open
gregdent opened this issue Jun 10, 2019 · 1 comment
Open

How to view stored objects (Get-FMCAccessPolicyRule) #27

gregdent opened this issue Jun 10, 2019 · 1 comment
Labels
question Further information is requested

Comments

@gregdent
Copy link

Example output of Get-FMCAccessPolicyRule:

sourceZones : @{objects=System.Object[]}
sourceNetworks : @{literals=System.Object[]}
destinationNetworks : @{objects=System.Object[]}

How does one enumerate these values in the Powershell console? Is there a way to actually see what is stored there? I would like to build some script logic around this output but cant figure out how to get useful information from it.

@eckdd eckdd added the question Further information is requested label Jul 10, 2019
@eckdd
Copy link
Owner

eckdd commented Jul 10, 2019

A couple ways:

  1. Convert it to JSON. You can pipe the Get function or variable into a ConvertTo-Json -Depth 10 to see everything in JSON format

  2. Make a variable for your output and expand each member:
    $rules = Get-FMCAccessPolicyRule
    $rules.sourceZones.objects

@eckdd eckdd closed this as completed Jul 10, 2019
@eckdd eckdd reopened this Jul 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants