internal static SessionStateUnauthorizedAccessException CreateVariableNotWritableError(PSVariable variable)
{
string message = String.Format("Cannot overwrite variable {0} because it is read-only or constant.", variable.Name);
return CreateError(variable, message, "VariableNotWritable");
}