This is a PowerShell module around the documented Meraki Rest API functions (link). Only a limited number of meraki rest API functions have been implemented.
New in v1.1 (MAY 2019):
- Added cmdlts to configure Layer 3 & 7 Firewall rules
- Added cmdlts to configure Site to Site VPN.
- Fixed various bugs
Download and install the module from PSGallery:
Install-Module -Name PSMeraki
OR
Download and extract the zip file.
Copy 'PSmeraki' directory to a module path. These are the default values for PSModulepath:
- C:\Users\-username-\Documents\WindowsPowerShell\Modules;
- C:\Program Files\WindowsPowerShell\Modules;
- C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
Type in powershell:
Import-Module PSMeraki
running Get-mrkNetwork
will ask for a Meraki API key.
Two things have to be configured in the Meraki dashboard:
- Enable Rest API access, organization wide
- Create Rest API key, for a dashboard user
Login to the Meraki dashboard
API key has to be organization wide enabled, to do that, go to organization settings
Scroll down to 'Dashboard API access' and tick the box to enable it.
Go to profile settings
In your profile, scroll down to 'API access'
Generate a new rest api key, its a 40 byte key. Either remember it or store it in a safe location, this code represents your logged in Meraki dashboard user. This is the 'rest api key' the module asks for.
This module includes the following cmdlets:
Add-MrkNetworkStaticRoute
Add-MrkNetworkVLAN
Get-MrkCameraVideoLink
Get-MrkDevice
Get-MrkDeviceClient
Get-MrkDeviceGroupPolicy
Get-MrkDevicesStatus
Get-MrkInventory
Get-MrkLicenseState
Get-MrkNetwork
Get-MrkNetworkBluetoothClient
Get-MrkNetworkDevice
Get-MrkNetworkGroupPolicy
Get-MrkNetworkMRL3FwRule
Get-MrkNetworkMxCfRule
Get-MrkNetworkMXL3FwRule
Get-MrkNetworkMXL7FwRule
Get-MrkNetworkRoute
Get-MrkNetworkS2sVpn
Get-MrkNetworkSiteToSiteVPN
Get-MrkNetworkSSID
Get-MrkNetworkStaticRoute
Get-MrkNetworkVLAN
Get-MrkOrgAdmins
Get-MrkOrganization
Get-MrkOrgEndpoint
Get-MrkSAMLrole
Get-MrkSwitch
Get-MrkTemplate
Get-MrkTemplateNetworks
Get-MrkVPN
New-MrkDevice
New-MrkNetwork
New-MrkOrgAdmin
Remove-MrkDevice
Remove-MrkNetwork
Remove-MrkNetworkTemplate
Remove-MrkNetworkVLAN
Remove-MrkOrgAdmin
Set-MrkDevice
Set-MrkNetworkS2sVpn
Set-MrkNetworkSSID
Set-MrkNetworkToTemplate
Set-MrkRestApiKey
Set-MrkSwitchPort
Test-MrkRestApiKey
Update-MrkDevice
Update-MrkNetwork
Update-MrkNetworkMRL3FwRule
Update-MrkNetworkMXL3FwRule
Update-MrkNetworkMXL7FwRule
Update-MrkNetworkVLAN
Update-MrkOrgAdmin