Esempio n. 1
0
 public override void ExecuteCmdlet()
 {
     ConfirmAction(
         Force.IsPresent,
         string.Format(Resources.RemoveJobCollectionWarning, JobCollectionName),
         Resources.RemoveJobCollectionMessage,
         JobCollectionName,
         () =>
     {
         WriteObject(SMClient.DeleteJobCollection(region: Location, jobCollection: JobCollectionName), true);
     });
 }
Esempio n. 2
0
 public override void ExecuteCmdlet()
 {
     ConfirmAction(
         Force.IsPresent,
         string.Format(Resources.RemoveJobCollectionWarning, JobCollectionName),
         Resources.RemoveJobCollectionMessage,
         JobCollectionName,
         () =>
     {
         if (!string.IsNullOrEmpty(Location) && !SMClient.GetAvailableRegions().Contains(Location, StringComparer.OrdinalIgnoreCase))
         {
             throw new Exception(Resources.SchedulerInvalidLocation);
         }
         else
         {
             WriteObject(SMClient.DeleteJobCollection(region: Location, jobCollection: JobCollectionName), true);
         }
     });
 }