Cannot find drive. A drive with the name 'master' does not exist. - Error/resolution

Sometime back I saw someone  raise this error (in Sitecore Slack) and at that point, I didn't have an answer. Today, I came across this error in my Sitecore 10.3 instance. Unfortunately, I didn't see google offering any help either. I then noticed that the erroring instance was running on SPE 6.3 while the latest SPE is 6.4. Once I installed Sitecore PowerShell Extensions 6.4, the below error was gone and I could execute SPE commands.

Erroring instance:


Error:

Good instance:


SPE Command successful:




Server Error in '/' Application.

Cannot find drive. A drive with the name 'master' does not exist.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Management.Automation.DriveNotFoundException: Cannot find drive. A drive with the name 'master' does not exist.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:

[DriveNotFoundException: Cannot find drive. A drive with the name 'master' does not exist.]
   System.Management.Automation.SessionStateInternal.GetDrive(String name, Boolean automount) +625
   System.Management.Automation.SessionStateInternal.GetDrive(String name, Boolean automount) +479
   System.Management.Automation.SessionStateInternal.SetLocation(String path, CmdletProviderContext context) +356
   System.Management.Automation.PathIntrinsics.SetLocation(String path) +19
   Spe.Core.Host.ScriptSession.SetItemLocationContext(Item item) +175
   Spe.Client.Applications.PowerShellIse.JobExecuteScript(ClientPipelineArgs args, String scriptToExecute, Boolean debug) +1148
   Spe.Client.Applications.PowerShellIse.JobExecute(ClientPipelineArgs args) +196

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
   System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +216
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +182
   Sitecore.Reflection.ReflectionUtil.InvokeMethod(MethodInfo method, Object[] parameters, Object obj) +89
   Sitecore.Nexus.Pipelines.NexusPipelineApi.Resume(PipelineArgs args, Pipeline pipeline) +348
   Sitecore.Pipelines.Pipeline.Start(PipelineArgs args, Boolean atomic) +167
   Sitecore.Web.UI.Sheer.ClientPage.RunPipelines() +431
   Sitecore.Web.UI.Sheer.ClientPage.OnPreRender(EventArgs e) +806
   System.Web.UI.Control.PreRenderRecursiveInternal() +200
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +7474



Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.9032.

Comments