我正在运行Windows 7 RTM.默认情况下安装Powershell 2.0.我正在使用优秀的Windows Powershell ISE来编辑我的脚本.我有以下脚本:
Param($p)
Param($d)
echo $p $d
Run Code Online (Sandbox Code Playgroud)
我将脚本保存为SayItAgain.ps1.当我尝试从交互式shell运行此脚本时,如下所示:
./SayItAgain -p "Hello"
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
At C:\users\cius\Code\powershell\SayItAgain.ps1:2 char:6
+ Param <<<< ($destination)
+ CategoryInfo : ObjectNotFound: (Param:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Run Code Online (Sandbox Code Playgroud)
这是一个已知问题还是我只是错误使用它?
我有两个Active Directory域,A和B.域A中的用户需要在其桌面上运行应用程序以查看和操作位于域B中的服务器上的资源.每个用户在域B中也有一个帐户.是否可能模仿每个用户的域B身份以编程方式对域B资源执行操作?
示例工作流程: