Today I received this message while running a PowerShell script on a remote server:

System error 85 has occurred

There may be more information but sadly I didn't get to see it. What does it mean? Most likely that you have a net use command and the drive it is trying to map has already been taken.

I work around it by checking if the drive exists first:

if (!(Test-Path Z:))
{
    net use Z: $password "/user:$username"
}

You could use New-PSDrive instead but considering anything outside of PowerShell including .NET code cannot use it, and if you don't have CredSSP authentication set up, then you'll probably just have a bad time.