< Back

Get-MerakiOrganisation

Sun Jan 19, 2020 6:22 pm

NAME Get-MerakiOrganisation



SYNOPSIS

Short function to list organizations the user has access to which will be needed to use with other commands within

this module.

In order to use this Module you will need an API Key from your Dashboard.





SYNTAX

Get-MerakiOrganisation [-ApiKey] <String> [[-OrganisationID] <String>] [<CommonParameters>]





DESCRIPTION

Short function to output your Meraki Organisation ID which you will need in order to use with other commands

within this module.



This function queries the Cisco Meraki API service https://dashboard.meraki.com/api/v0 and will be needed for use

with additional

commands within the module.



API Access is free but Rate Controlled and is limited to 5 calls per second (per organisation).



In order to use this Module you will need an API Key from your Dashboard. For access to the API, first enable the

API for your

organisation under Organiation > Settings > Dashboard API access.



After enabling the API, go to the my profile page to generate an API key. The API key is associated with a

Dashboard administrator account.

You can generate, revoke, and regenerate your API key on your profile.





PARAMETERS

-ApiKey <String>



Required? true

Position? 1

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-OrganisationID <String>



Required? false

Position? 2

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

Accepts Api Key as piped input.

Accepts Organisation ID as piped input.





OUTPUTS

The output from the API is sent as JSON and captured in a custom object.

{

"id": 549236,

"name": "Meraki Live Sandbox",

"samlConsumerUrl": "https://n149.meraki.com/saml/login/-t35Mb/TvUzhbJtIRna",

"samlConsumerUrls": ["https://n149.meraki.com/saml/login/-t35Mb/TvUzhbJtIRna"]

}



You can then select the items that you want to display.





NOTES





Author: Luke Leigh

Website: https://blog.lukeleigh.com/

LinkedIn: https://www.linkedin.com/in/lukeleigh/

GitHub: https://github.com/BanterBoy/

GitHubGist: https://gist.github.com/BanterBoy



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Export your companies ID, Name and SAML Url's



Get-MerakiOrganisation.ps1 -ApiKey "YourApiKeyGoesHere"









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Export your companies ID, Name and SAML Url's by piping in your Api Key



$key = "YourApiKeyGoesHere"

Get-MerakiOrganisation.ps1 -ApiKey $key









-------------------------- EXAMPLE 3 --------------------------



PS C:\\>Export your company information (ID, Name and SAML Url's) by piping in your Api Key and specifying the

Comapny ID



$key = "YourApiKeyGoesHere"

$CompanyID = "YourCompanyIDGoesHere"

Get-MerakiOrganisation.ps1 -ApiKey $key -OrganisationID $CompanyID









-------------------------- EXAMPLE 4 --------------------------



PS C:\\>Export selected items from your Meraki by piping in your Api Key



$key = "YourApiKeyGoesHere"

Get-MerakiOrganisation.ps1 -ApiKey $key |

Format-List -Property Name,ID









-------------------------- EXAMPLE 5 --------------------------



PS C:\\>Export your company information (ID, Name and SAML Url's) by piping in your Api Key and specifying the

Comapny ID



$key = "YourApiKeyGoesHere"

$CompanyID = "YourCompanyIDGoesHere"

Get-MerakiOrganisation.ps1 -ApiKey $key -OrganisationID $CompanyID |

Format-List -Property *











RELATED LINKS

https://github.com/BanterBoy/CiscoMeraki/wiki