Ejemplo n.º 1
0
 public void SetProperty(string path, PSObject value)
 {
     using (EnterContext(path))
     {
         using (DirectoryEntryInfo info = GetEntryInfoFromPSPath(path))
         {
             if (ParamAddSet)
             {
                 info.AddPropertyValue(value, ParamRawSet);
             }
             else if (ParamRemoveSet)
             {
                 info.RemovePropertyValue(value, ParamRawSet);
             }
             else
             {
                 info.SetProperty(value, ParamRawSet);
             }
         }
     }
 }