<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Powershell to change SSID via API in Network Platform API</title>
    <link>https://community.cisco.com/t5/network-platform-api/powershell-to-change-ssid-via-api/m-p/5427334#M4516</link>
    <description>&lt;P&gt;You can start with running this in postman itself without the script. Run the API that changes SSID password and manually enter a value yourself and run it. You can verify if theres anything wrong on the Meraki side of things. As long as that works you can narrow it down to something in the script. &lt;BR /&gt;I would also say add a line to print exactly what your sending to the API and make sure that looks good too&lt;/P&gt;</description>
    <pubDate>Tue, 23 Apr 2024 16:00:00 GMT</pubDate>
    <dc:creator>AMP2</dc:creator>
    <dc:date>2024-04-23T16:00:00Z</dc:date>
    <item>
      <title>Powershell to change SSID via API</title>
      <link>https://community.cisco.com/t5/network-platform-api/powershell-to-change-ssid-via-api/m-p/5427332#M4514</link>
      <description>&lt;P&gt;Afternoon All&lt;/P&gt;&lt;P&gt;Up until yesterday, the script below (adjusted to project my API &amp;amp; SIte only) worked to generate a new password for one of our SSID's and change it via the API.&lt;/P&gt;&lt;DIV&gt;Set-ExecutionPolicy Bypass -scope Process -Force&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;#Install-Module -Name PSSharedGoods -RequiredVersion 0.0.155&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;#Meraki API KEY&lt;/DIV&gt;&lt;DIV&gt;$api_key = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"&lt;/DIV&gt;&lt;DIV&gt;#Meraki Network URL&lt;/DIV&gt;&lt;DIV&gt;$network_id = "L_xxxxxxxxxxxxxxxxx"&lt;/DIV&gt;&lt;DIV&gt;#Base API URL&lt;/DIV&gt;&lt;DIV&gt;$api = @{&lt;/DIV&gt;&lt;DIV&gt;    "endpoint" = '&lt;A href="https://api.meraki.com/api/v1" target="_blank" rel="nofollow noopener noreferrer"&gt;https://api.meraki.com/api/v1&lt;/A&gt;'&lt;/DIV&gt;&lt;DIV&gt;}&lt;/DIV&gt;&lt;DIV&gt;#API URL for SSID PSK Change XXX&lt;/DIV&gt;&lt;DIV&gt;$api_put = @{&lt;/DIV&gt;&lt;DIV&gt;        "endpoint" = '&lt;A href="https://api.meraki.com/api/v1" target="_blank" rel="nofollow noopener noreferrer"&gt;https://api.meraki.com/api/v1&lt;/A&gt;'&lt;/DIV&gt;&lt;DIV&gt;}&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;# Word list  &lt;/DIV&gt;&lt;DIV&gt;$words = @('rabbit', 'peccary', 'colt', 'anteater',  &lt;/DIV&gt;&lt;DIV&gt;    'meerkat', 'eagle', 'owl', 'cow', 'turtle', 'bull',  &lt;/DIV&gt;&lt;DIV&gt;    'baselisk', 'snake', 'lizzard', 'panda', 'bear', 'pig',  &lt;/DIV&gt;&lt;DIV&gt;    'lion', 'tiger', 'bunny', 'wolf', 'deer', 'pronghorn',  &lt;/DIV&gt;&lt;DIV&gt;    'fish', 'rabbit', 'gorilla', 'puma', 'mustang', 'sheep',  &lt;/DIV&gt;&lt;DIV&gt;    'wolverine', 'hyena', 'beaver', 'rooster', 'ox', 'frog'  &lt;/DIV&gt;&lt;DIV&gt;)  &lt;/DIV&gt;&lt;DIV&gt;# Definition of funtion named "Create-Words"  &lt;/DIV&gt;&lt;DIV&gt;Function Create-Words {  &lt;/DIV&gt;&lt;DIV&gt;    $word1 = "ABC"&lt;/DIV&gt;&lt;DIV&gt;    $word2 = Get-Random -InputObject $words  # get second random word from word list&lt;/DIV&gt;&lt;DIV&gt;    $word3 = Get-RandomCharacters -length 1 -characters 'ABCDEFGHKLMNOPRSTUVWXYZ'&lt;/DIV&gt;&lt;DIV&gt;    $word4 = Get-RandomCharacters -length 1 -characters 'abcdefghiklmnoprstuvwxyz'&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;$word5 = Get-RandomCharacters -length 2 -characters '1234567890'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;$word6 = Get-RandomCharacters -length 1 -characters '!$%&amp;amp;()?}][{@#+' &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;    $script:newWord = "$word1$word2$word3$word4$word5$word6" # combine word1 with word2 / delimiter = "-""  &lt;/DIV&gt;&lt;DIV&gt;}  &lt;/DIV&gt;&lt;DIV&gt;  &lt;/DIV&gt;&lt;DIV&gt;$newWord =""&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;# Execution of function "Create-Words"  &lt;/DIV&gt;&lt;DIV&gt;Create-Words&lt;/DIV&gt;&lt;DIV&gt;  &lt;/DIV&gt;&lt;DIV&gt;# Output of new generated word in script  &lt;/DIV&gt;&lt;DIV&gt;$newWord &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;$header_org = @{&lt;/DIV&gt;&lt;DIV&gt;    "X-Cisco-Meraki-API-Key" = $api_key&lt;/DIV&gt;&lt;DIV&gt;    "Content-Type" = 'application/json'&lt;/DIV&gt;&lt;DIV&gt;}&lt;/DIV&gt;&lt;DIV&gt;# PSK = New password&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;$data = @{&lt;/DIV&gt;&lt;DIV&gt;    "psk" = $newWord&lt;/DIV&gt;&lt;DIV&gt;}&lt;/DIV&gt;&lt;DIV&gt;#Convert data to Json format&lt;/DIV&gt;&lt;DIV&gt;$jbody = ConvertTo-Json -InputObject $data&lt;/DIV&gt;&lt;DIV&gt;#URL Network_ID and SSID number&lt;/DIV&gt;&lt;DIV&gt;$api.ssid = "/networks/$network_id/wireless/ssids/6"&lt;/DIV&gt;&lt;DIV&gt;#Combine base api_put URL and $api.ssid&lt;/DIV&gt;&lt;DIV&gt;$Merakiuri = $api_put.endpoint + $api.ssid&lt;/DIV&gt;&lt;DIV&gt;#Invoke-RestMethod -Method Put -Uri $Merakiuri -Headers $header_org -Body $jbody | Out-Null&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;P&gt;Not sure what has changed, but today it's not working.  No error messages are coming up - it just doesn't do anything.&lt;/P&gt;&lt;P&gt;Does anyone have any ideas or suggestions?&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2024 13:10:11 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/powershell-to-change-ssid-via-api/m-p/5427332#M4514</guid>
      <dc:creator>Zedster1974</dc:creator>
      <dc:date>2024-04-23T13:10:11Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell to change SSID via API</title>
      <link>https://community.cisco.com/t5/network-platform-api/powershell-to-change-ssid-via-api/m-p/5427333#M4515</link>
      <description>&lt;P&gt;As an update to this, on checking the Meraki logs themselves, it's showing that the powershell script is running and connecting but not updating&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"psk": "************* (value did not change)",&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2024 13:35:31 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/powershell-to-change-ssid-via-api/m-p/5427333#M4515</guid>
      <dc:creator>Zedster1974</dc:creator>
      <dc:date>2024-04-23T13:35:31Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell to change SSID via API</title>
      <link>https://community.cisco.com/t5/network-platform-api/powershell-to-change-ssid-via-api/m-p/5427334#M4516</link>
      <description>&lt;P&gt;You can start with running this in postman itself without the script. Run the API that changes SSID password and manually enter a value yourself and run it. You can verify if theres anything wrong on the Meraki side of things. As long as that works you can narrow it down to something in the script. &lt;BR /&gt;I would also say add a line to print exactly what your sending to the API and make sure that looks good too&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2024 16:00:00 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/powershell-to-change-ssid-via-api/m-p/5427334#M4516</guid>
      <dc:creator>AMP2</dc:creator>
      <dc:date>2024-04-23T16:00:00Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell to change SSID via API</title>
      <link>https://community.cisco.com/t5/network-platform-api/powershell-to-change-ssid-via-api/m-p/5427335#M4517</link>
      <description>&lt;P&gt;Just wanting to include in this conversation that our team is having issues changing the PSK for a few different networks currently using the new version of the Meraki Dashboard. The old version of the dashboard is still working fine. Not sure if this may be a related issue, but definitely seems like something on the backend changing/breaking. &lt;/P&gt;&lt;P&gt;Edit: Want to add that this also started occurring today. We've been doing it for the past &amp;gt;year without issues.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2024 21:29:22 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/powershell-to-change-ssid-via-api/m-p/5427335#M4517</guid>
      <dc:creator>travisw</dc:creator>
      <dc:date>2024-04-23T21:29:22Z</dc:date>
    </item>
  </channel>
</rss>

