/
githubmirror
/
PowerShell
Обзор
Документация
Войти
/
githubmirror
/
PowerShell
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
test/powershell/Provider/AutomountSubstDrive.ps1
41 строка
806 B
Steve Lee
Update copyright notice to latest guidance (#12190)
24 мар 2020, 21:08
Не верифицирован
24 мар 2020, 21:08
b7cb335
Код
Авторство
О чём код?
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # Precondition: start from fresh PS session, do not have the media mounted param([switch]$useModule, [string]$FullPath) $global:CoreScriptPath = Join-Path $PSScriptRoot 'AutomountSubstDriveCore.ps1' if ($useModule) { $m = New-Module { function Test-DrivePresenceFromModule { param ([String]$Path) & $global:CoreScriptPath -Path $Path } Export-ModuleMember -Function Test-DrivePresenceFromModule } } try { if ($useModule) { Import-Module $m -Force Test-DrivePresenceFromModule -Path $FullPath } else { & $global:CoreScriptPath -Path $FullPath } } finally { if ($useModule) { Remove-Module $m } }