私は、WindowsバッチファイルからPowerShellスクリプトを実行しようとしています。これは使用するSharePoint関連のスクリプトです。 Import-SPData。 
 これを使用すると問題なく動作します。 USERA のログインしかし、私はから同じバッチファイルを実行しようとすると USERB のログイン、私は以下のエラーが出ます: 
c:\PS>ExecMyPowershellScript.bat
c:\PS>C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe -psconsolefile "
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\CONFIG\P
OWERSHELL\Registration\psconsole.psc1" -command "c:\ps\MyPSScript.ps1"
The local farm is not accessible. Cmdlets with FeatureDependencyId are not regis
tered.
Import-SPData : Cannot access the local farm. Verify that the local farm is pro
perly configured, currently available, and that you have the appropriate permis
sions to access the database before trying again.
At C:\ps\Run_MyPSScript.ps1:5 char:18
...
 私はそれを確認しました USERB への権限を持っています bat そしてその ps1 ファイル 
 使ってます PowerShell バージョン2と SharePoint Server 2010