PnpAlertsExport.psd1
@{ # Script module or binary module file associated with this manifest. RootModule = 'PnpAlertsExport.psm1' # Version number of this module. ModuleVersion = '2.0.1' # Supported PSEditions CompatiblePSEditions = @('Core','Desktop') # ID used to uniquely identify this module GUID = '4ed5b7fe-e62c-4e78-80bd-c5c921e165c1' # Author of this module Author = 'Sam Larson' # Company or vendor of this module CompanyName = 'SL' # Copyright statement for this module Copyright = 'All rights reserved.' # Description of the functionality provided by this module Description = @' PnPAlertsExport Module ---------------------- Exports SharePoint Online alert subscriptions to CSV with a rich, guided experience. Features • Auto‑register or consume an existing Entra ID App (with interactive wizard or fully scripted). • Optional parallel processing with configurable throttle limits. • Secure handling of PFX certificates (path or Base64) and Support for SecureString passwords. • Verbose/Debug logging, transcript capture, and ContinueOnError for resilient runs. Examples # Interactive registration + full tenant scan Export-Alerts -AutoRegister -Mode AllSites -UseParallel -Verbose # Non‑interactive, existing app, single site Export-Alerts -AppId xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx ` -Tenant contoso.onmicrosoft.com ` -CertificatePath .\certs\alerts.pfx ` -CertificatePassword (ConvertTo-SecureString 'p@ssw0rd' -AsPlainText -Force) ` -SiteUrl https://contoso.sharepoint.com/sites/HR ` -Mode SingleSite ` Common Issues • **Missing PnP.PowerShell v3.1.0** – the module will auto‑install, but ensure you run PowerShell 7+ and have internet access. • **Insufficient AAD consent** – Global Admin must grant “Sites.FullControl.All” or similar scopes on Entra application. • **Certificate errors** – check that your PFX path is correct and the cert is valid in your tenant. • **Throttling/429 Errors** – tune -ThrottleLimit or add retry logic if you encounter service limits. '@ # Minimum version of the PowerShell engine required by this module PowerShellVersion = '7.0' # Modules that must be imported into the global environment prior to importing this module RequiredModules = @(@{ ModuleName = 'PnP.PowerShell'; ModuleVersion = '3.1.0' }) # Modules to import as nested modules of the module specified in RootModule NestedModules = @('GetWebAlertsFunctions.ps1') # Functions to export from this module FunctionsToExport = @('Export-Alerts') # Cmdlets to export from this module CmdletsToExport = @() # Variables to export from this module VariablesToExport = @() # Aliases to export from this module AliasesToExport = @() # List of all files packaged with this module FileList = @( 'PnpAlertsExport.psm1', 'GetWebAlertsFunctions.ps1' ) # Private data to pass to the module specified in RootModule. PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. Tags = @('SharePoint','PnP','Alerts','Export','AdminCenter') # Release notes of this module ReleaseNotes = @( '1.9.0 – Trimmed user inputs, improved error diagnostics, and polished interactive flow.', '1.8.0 – Force‑install PnP.PowerShell v2.4.0 for reliable app‑registration helper.', '1.6.0 – Introduced interactive wizard and enhanced user experience.', '1.1.5 – Updated manifest for script changes and versioning.' ) } } # Default prefix for commands exported from this module. DefaultCommandPrefix = 'PnpAlerts' } |