1 2 3 4 5 6 7 8 9 10 |
New-Module -Name MyModule -ScriptBlock { function Return-Information { Get-CimInstance -ClassName Win32_OperatingSystem | Select-Object -Property @{label='OperatingSystem';expression={$_.Caption}} } Export-ModuleMember -Function Return-Information } | Import-Module |