DSCPullServerLab.psm1
#Requires -RunAsAdministrator $WinVer = [System.Environment]::OSVersion.Version if (($WinVer.Major -ge 10) -and ($WinVer.Build -ge 14393)) { Write-Warning 'Please note that the DSCPullServerLab module is intended for use on a Hyper-V host. Using the module on a machine without the Hyper-V service will result in failed PowerShell Direct connection attempts.' $Private = @(Get-ChildItem $PSScriptRoot\Private -Filter *.ps1) $Public = @(Get-ChildItem $PSScriptRoot\Public -Filter *.ps1) Foreach($p in ($Private + $Public)) { Try { . $p.fullname } Catch { Write-Error -Message "Failed to import function $($p.fullname): $_" } } Export-ModuleMember -Function $Public.BaseName } else { throw 'The DSCPullServerLab module requires Windows 10 or Server 2016 build 14500 or above' } |