private string RemoveDriveFromPath(string path)
{
string result = path;
string root;
if (this.PSDriveInfo == null)
{
root = String.Empty;
}
else
{
root = this.PSDriveInfo.Root;
}
if (result == null)
{
result = String.Empty;
}
if (result.Contains(root))
{
result = result.Substring(result.IndexOf(root, StringComparison.OrdinalIgnoreCase) + root.Length);
}
return result;
}