public override void ExecuteCmdlet() { if (this.ParameterSetName == ByFactoryObject) { if (this.DataFactory == null) { throw new PSArgumentNullException(string.Format(CultureInfo.InvariantCulture, Resources.DataFactoryArgumentInvalid)); } this.DataFactoryName = DataFactory.DataFactoryName; this.ResourceGroupName = DataFactory.ResourceGroupName; } ActivityWindowFilterOptions filterOptions = new ActivityWindowFilterOptions() { ResourceGroupName = this.ResourceGroupName, DataFactoryName = this.DataFactoryName, ActivityName = this.ActivityName, DatasetName = this.DatasetName, PipelineName = this.PipelineName, Filter = Filter, OrderBy = this.OrderBy, RunEnd = this.RunEnd, RunStart = this.RunStart, Top = this.Top, WindowEnd = this.WindowEnd, WindowStart = this.WindowStart, WindowState = this.WindowState, WindowSubstate = this.WindowSubstate }; try { do { List <PSActivityWindow> activityWindows = DataFactoryClient.ProcessListFilterActivityWindows(filterOptions); WriteObject(activityWindows, true); } while (filterOptions.NextLink.IsNextPageLink()); } catch (PSArgumentException e) { WriteWarning(e.Message); } }