If you're new to PowerShell Gallery, get your read on here: https://blogs.msdn.microsoft.com/powershell/2014/11/19/introducing-powershell-gallery/. Otherwise, it's essentially a Git repository for publicly hosted scripts and modules all searchable from PowerShell 5.0. After writing this module a few times, collecting feedback, and dealing with version nightmares and co-development woes, I adopted a new working style and environment. More on that later on...
- This module does not support authenticating with an account prior to executing the main cmdlet. This is because the cmdlet will ask for credentials then save them as a variable for subsequent logon attempts. We need to do this because the Skype for Business Online module will only retrieve an 'access token' for 60 minutes before the PowerShell Session expires. The CxdCallData module will account for this and re-authenticate/re-import the PSSession prior to the access token expiring. If you authenticate beforehand, the credentials are not gathered, nor stored for re-auth.
- Since we need to re-auth every 60 minutes, the module also does not support accounts with MFA enabled. MFA-enabled accounts do not support saving credentials.
Finding the moduleSo here we go, to find the module you'll need PowerShell 5.0. To use the module you'll need the SkypeOnlineConnector.
PowerShell 5.0: http://www.microsoft.com/en-us/download/details.aspx?id=50395
Chances are you'll have to install a NuGet provider before you're able to find the module on PowerShell Gallery. No problem though, as you'll be prompted to install it automatically at first launch. Simply specify "Y" at the prompt to install the package provider.
Open an admin-mode PowerShell 5.0 session after installing the NuGet provider and type: "Find-Module CxdCallData". This will show you the current version(s) and the repository location.
Installing & importing the moduleRun "Install-Module CxdCallData" and accept the untrusted repository message. Load the module by running "Import-Module CxdCallData".
To view the loaded module, run "Get-Module CxdCallData".
Using the moduleThere is only one exported function called "Get-CxdCallData". You can get full help and examples by using "Get-Help Get-CxdCallData" once the module has been installed and loaded.
Get-CxdCallData -NumberOfDaysToSearch 180 -CsvFileWithUsers C:\users.csv -ReportSavePath C:\reports
Get-CxdCallData -NumberOfDaysToSearch 90 -ReportSavePath C:\reports -Verbose
The reports generated are in both CSV and HTML format for easy viewing on a server or desktop with Office installed.
Updating the module
PowerShell 5.0 lets you update a module from PowerShell Gallery simply by running "Update-Module CxdCallData".