-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Description
PS [03/24/2020 07:18:32] C:\Users\a_s_p > get-psdrive s | fl
Name : S
Description :
Provider : Microsoft.PowerShell.Core\FileSystem
Root : C:\Users\a_s_p\Documents\3n
CurrentLocation :
Steps to reproduce
PS [03/24/2020 07:12:02] S:\ > 1..5 | foreach-object -parallel {write-host $_}
Expected behavior
PS [03/24/2020 07:12:03] S:\ > c:
PS [03/24/2020 07:14:56] C:\Users\a_s_p > 1..5 | foreach-object -parallel {write-host $_}
1
2
3
4
5
Actual behavior
PS [03/24/2020 07:12:02] S:\ > 1..5 | foreach-object -parallel {write-host $_}
ForEach-Object: An unexpected error has occurred while processing ForEach-Object -Parallel input. This may mean that some of the piped input did not get processed. Error: System.Ma
nagement.Automation.DriveNotFoundException: Cannot find drive. A drive with the name 'S' does not exist.
at System.Management.Automation.SessionStateInternal.GetDrive(String name, Boolean automount)
at System.Management.Automation.SessionStateInternal.AutomountBuiltInDrive(String name)
at System.Management.Automation.SessionStateInternal.GetDrive(String name, Boolean automount)
at System.Management.Automation.SessionStateInternal.SetLocation(String path, CmdletProviderContext context, Boolean literalPath)
at System.Management.Automation.PSTasks.PSTaskBase.Start()
at System.Management.Automation.PSTasks.PSTaskPool.Add(PSTaskBase task)
at Microsoft.PowerShell.Commands.ForEachObjectCommand.b__63_2(Object _).
Environment data
PS [03/24/2020 07:15:19] C:\Users\a_s_p > $psversiontable
Name Value
PSVersion 7.0.0
PSEdition Core
GitCommitId 7.0.0
OS Microsoft Windows 10.0.18362
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0