Save it as a .PS1 file and then in Intune (Microsoft Endpoint Manager). Click Devices, Windows, PowerShell Scripts, Add and Then Name Anything you want. Put Description if you like then go to next Screen. Select the .PS1 script you just created. Choose exact same options as below screen.
Then Assign it to Users or Devices group. Done. Next refresh will deploy Chocolatey to all the Devices you have assigned it to.