我希望了解如何使用 .Bat 文件调用 PowerShell 函数。
我有一个简单的函数:
(Script.ps1)
我想要在 .Bat 文件中调用 testfunction 函数。 powershell .\Script.ps1 ...
我有一个简单的函数:
(Script.ps1)
function testfunction
{
Write-Log "Calling from Bat file"
}
我想要在 .Bat 文件中调用 testfunction 函数。 powershell .\Script.ps1 ...