1. Open the following script in powershell either directly or through ISE/VSCode located  \\hnas1-evs1\script-dev$\scripts\Powershell\o365Scripts\Office365Licenses\SharedInboxLicenses-v1.00.ps1
  2. The script contains two functions. 
    1. The first function, GetSharedLicenseCSV pulls csv from Office365 any shared inbox that has an Office365 license 
    2. The second function, RemoveSharedLicenseGroupsfromAD removes Shared Licenses from groups using the csv created from the GetSharedLicenseCSV function
  3. Select one of the following options 
    1. Selecting 1 runs the GetSharedLicenseCSV function
    2. Selecting 2 runs the RemoveSharedLicenseGroupsfromAD function
    3. Selecting 3 runs the GetSharedLicenseCSV function than runs the RemoveSharedLicenseGroupsfromAD function
  4. If you have any more questions more information can be found in the notes inside the script.
  5. Additionally, each section can be run using switch parameters. for examples see below  
    1. '\\hnas1-evs1\script-dev$\scripts\Powershell\o365Scripts\Office365Licenses\SharedInboxLicenses-v1.00.ps1' -GetSharedLicenseCSV
    2. '\\hnas1-evs1\script-dev$\scripts\Powershell\o365Scripts\Office365Licenses\SharedInboxLicenses-v1.00.ps1' -RemoveSharedLicenseGroupsfromAD
    3. '\\hnas1-evs1\script-dev$\scripts\Powershell\o365Scripts\Office365Licenses\SharedInboxLicenses-v1.00.ps1' -Both