$mpx=convertto-securestring -string "YOUR_SERVICE_ACCOUNT_PASSWORD" -AsPlainText -force $mux="SERVICE_ACCOUNT@YOUR_DOMAIN" $myCreds = new-object -typename System.Management.Automation.PSCredential -argumentlist $mux,$mpx #Single Room suDoubleBookedMeetings -SMTPAddress "YOUR_ROOM@YOUR_DOMAIN" -Credentials $myCreds ` -BookingWindow: 14 -EwsUrl "https://YOUR_EXCHANGE_DOMAIN/ews/exchange.asmx" ` -EWSManagedApiPath "C:\Program Files\Microsoft\Exchange\Web Services\2.2\" ` -OutputAsCSV -CsvFile "MY_CSV_OUTPUT.csv" #Get from Text File get-content rooms.txt | foreach {suDoubleBookedMeetings $_ -Credentials $myCreds ` -BookingWindow: 14 -EwsUrl "https://YOUR_EXCHANGE_DOMAIN/ews/exchange.asmx" ` -EWSManagedApiPath "C:\Program Files\Microsoft\Exchange\Web Services\2.2\" ` -OutputAsCSV -CsvFile "MY_CSV_OUTPUT.csv"} #From Get-Mailbox Get-Mailbox -filter {isResource -eq $true} -resultsize unlimited |Select-Object PrimarySMTPAddress | ` suDoubleBookedMeetings -Credentials $myCreds ` -BookingWindow: 14 -EwsUrl "https://YOUR_EXCHANGE_DOMAIN/ews/exchange.asmx" ` -EWSManagedApiPath "C:\Program Files\Microsoft\Exchange\Web Services\2.2\" ` -OutputAsCSV -CsvFile "MY_CSV_OUTPUT.csv"