public override void ExecuteCmdlet()
{
try
{
this.WriteWarningWithTimestamp(
string.Format(
Properties.Resources.CmdletWillBeDeprecatedSoon,
this.MyInvocation.MyCommand.Name));
switch (this.ParameterSetName)
{
case ASRParameterSets.ByObject:
case ASRParameterSets.ByObjectWithId:
case ASRParameterSets.ByObjectWithName:
this.ProtectionContainerId = this.ProtectionContainer.ID;
break;
case ASRParameterSets.ByIDs:
case ASRParameterSets.ByIDsWithId:
case ASRParameterSets.ByIDsWithName:
break;
}
if (this.Id != null)
{
this.GetById();
}
else if (this.Name != null)
{
this.GetByName();
}
else
{
this.GetAll();
}
}
catch (Exception exception)
{
this.HandleException(exception);
}
}