2017-02-10 17 views
0

Import-Module ConfigurationManager.psd1の後に、非管理者ユーザーとしてSCCMサイトフォルダにCDを実行しようとしています。しかし、私は次のエラーをgetttingています:Powershell cd sitecodeが動作しない

PS C:\windows\system32> Enter-PSSession -ComputerName somecomputer -Credential Sccm\u6 
[somecomputer]: PS C:\Users\u6\Documents> Import-Module ConfigurationManager.psd1 
[somecomputer]: PS C:\Users\u6\Documents> cd 1SA: 
cd : Cannot find drive. A drive with the name '1SA' does not exist. 
    + CategoryInfo   : ObjectNotFound: (1SA:String) [Set-Location], DriveNotFoundException 
    + FullyQualifiedErrorId : DriveNotFound,Microsoft.PowerShell.Commands.SetLocationCommand 

私は、このリンクで指定されたドキュメントを、次のことで、この問題を回避することができますhttp://benef-it.blogspot.in/2013/04/solve-ps-drive-problem-with-sccm2012.html

しかし、どのように私はプログラム的にPowerShell内からこれを行うことができますか?

答えて

1

OK]をクリックして上記のコマンドを実行して、この

New-PSDrive -Name $sitecode -PSProvider "AdminUI.PS.Provider\CMSite" -Root "$ENV:ComputerName" -Description "SCCM Site" 

への解決策を見つけたあなたは、その後に使用できるドライブを作成します。

は参照してください:https://social.technet.microsoft.com/Forums/en-US/3c5aee8b-a7ea-4b74-8b13-a2569b88bd5f/newpsdrive-returns-error-object-reference-not-set-to-an-instance-of-an-object?forum=configmanagersdk

-1

フォルダに「:」という名前を入れることはできません。フォルダが存在しないように見えます。

+0

申し訳ありませんが、私は1SA :, 1SAは、SCCMでのサイトコードである、それはCDだった間違ったコマンドを貼り付けていました。 – Prabhat

+0

C:\ Users \ u6 \ Documents \ 1SAにcdをしようとしているパスは何ですか? C:\ Users \ u6 \ Documents \ 1SA:? 存在しますか? –

+1

私は答えとして投稿した解決策を得ました。実際に1SA:作成されたCMSiteに対応する電源シェルのドライブです。答えで与えられたコマンドを使用して利用できなかったのは、それを作成してアクセスできるようになりました。 – Prabhat

関連する問題