protected IDisposable CreatePiiSuppressionContext(IConfigurable outputObject) { ConfigurableObject configurableObject = outputObject as ConfigurableObject; if (configurableObject == null) { return(null); } if (configurableObject.SkipPiiRedaction || SuppressingPiiProperty.IsExcludedSchemaType(configurableObject.ObjectSchema.GetType()) || (VariantConfiguration.InvariantNoFlightingSnapshot.CmdletInfra.SkipPiiRedactionForForestWideObject.Enabled && TaskHelper.IsForestWideADObject(outputObject as ADObject))) { return(null); } CmdletLogger.SafeSetLogger(this.CurrentTaskContext.UniqueId, RpsCmdletMetadata.IsOutputObjectRedacted, true); return(SuppressingPiiContext.Create(true, this.CurrentPiiMap)); }