| Server IP : 121.121.20.254 / Your IP : 216.73.216.220 Web Server : Microsoft-IIS/10.0 System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64 User : IUSR ( 0) PHP Version : 8.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/ProgramData/chocolatey/extensions/chocolatey-core/ |
Upload File : |
# Export functions that start with capital letter, others are private
# Include file names that start with capital letters, ignore others
$ScriptRoot = Split-Path $MyInvocation.MyCommand.Definition
$pre = Get-ChildItem Function:\*
Get-ChildItem "$ScriptRoot\*.ps1" |
Where-Object { $_.Name -cmatch '^[A-Z]+' } |
ForEach-Object { . $_ }
$post = Get-ChildItem Function:\*
$funcs = Compare-Object $pre $post |
Select-Object -ExpandProperty InputObject |
Select-Object -ExpandProperty Name
$funcs |
Where-Object { $_ -cmatch '^[A-Z]+'} |
ForEach-Object { Export-ModuleMember -Function $_ }