Discord.psm1
[Diagnostics.CodeAnalysis.SuppressMessageAttribute( 'PSAvoidAssignmentToAutomaticVariable', 'IsWindows', Justification = 'IsWindows doesnt exist in PS5.1' )] [Diagnostics.CodeAnalysis.SuppressMessageAttribute( 'PSUseDeclaredVarsMoreThanAssignments', 'IsWindows', Justification = 'IsWindows doesnt exist in PS5.1' )] [CmdletBinding()] param() $baseName = [System.IO.Path]::GetFileNameWithoutExtension($PSCommandPath) $script:PSModuleInfo = Import-PowerShellDataFile -Path "$PSScriptRoot\$baseName.psd1" $script:PSModuleInfo | Format-List | Out-String -Stream | ForEach-Object { Write-Debug $_ } $scriptName = $script:PSModuleInfo.Name Write-Debug "[$scriptName] - Importing module" if ($PSEdition -eq 'Desktop') { $IsWindows = $true } #region [functions] - [public] Write-Debug "[$scriptName] - [functions] - [public] - Processing folder" #region [functions] - [public] - [Get-PSModuleTest] Write-Debug "[$scriptName] - [functions] - [public] - [Get-PSModuleTest] - Importing" function Get-PSModuleTest { <# .SYNOPSIS Performs tests on a module. .EXAMPLE Test-PSModule -Name 'World' "Hello, World!" #> [CmdletBinding()] param ( # Name of the person to greet. [Parameter(Mandatory)] [string] $Name ) Write-Output "Hello, $Name!" } Write-Debug "[$scriptName] - [functions] - [public] - [Get-PSModuleTest] - Done" #endregion [functions] - [public] - [Get-PSModuleTest] Write-Debug "[$scriptName] - [functions] - [public] - Done" #endregion [functions] - [public] #region Member exporter $exports = @{ Alias = '*' Cmdlet = '' Function = 'Get-PSModuleTest' Variable = '' } Export-ModuleMember @exports #endregion Member exporter |