2
我有参数的脚本:导入功能
param (
[Parameter(Mandatory=$true)][string]$VaultName,
[Parameter(Mandatory=$true)][string]$SecretName,
[Parameter(Mandatory=$true)][bool]$AddToMono = $false
)
...
在这个脚本我想包括我在另一个PS1文件写道功能:common.ps1
我通常进口这与
. .\common.ps1
,但如果我这样做,在脚本中,我得到:
The term '.\common.ps1' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the
path is correct and try again.
如何在此脚本中导入common.ps1?
谢谢!
给出点源中的common.ps1的完整路径 –