public void BuildFilter(out string parameterList, out string filter, out string preArgs, DataRow row) { ADObjectId adobjectId = row["Server"] as ADObjectId; filter = null; parameterList = ((adobjectId != null) ? string.Format(" -Server '{0}'", adobjectId.ToQuotationEscapedString()) : null); preArgs = null; }
public string BuildScope(object scope) { if (scope == null || string.IsNullOrEmpty(scope.ToString())) { return("-SingleNodeOnly"); } if (scope is DataRow) { ADObjectId item = (ADObjectId)(scope as DataRow)["Identity"]; return(string.Format("-Identity '{0}' -SingleNodeOnly", item.ToQuotationEscapedString())); } return(string.Format("-Identity '{0}'", scope.ToQuotationEscapedString())); }
public void BuildFilter(out string parameterList, out string filter, out string preArgs, DataRow row) { ADObjectId item = null; if (!DBNull.Value.Equals(row["DatabaseIdentity"])) { item = (ADObjectId)row["DatabaseIdentity"]; } string text = null; if (!DBNull.Value.Equals(row["ExcludeServer"])) { text = (string)row["ExcludeServer"]; } filter = " | Filter-DatabaseMasterServer"; if (text != null) { filter += string.Format(" | Filter-PropertyNotEqualTo -Property 'Fqdn' -Value '{0}'", text.ToQuotationEscapedString()); } preArgs = null; parameterList = string.Format("-Identity '{0}'", item.ToQuotationEscapedString()); }
public void BuildFilter(out string parameterList, out string filter, out string preArgs, DataRow row) { ADObjectId adobjectId = null; if (row.Table.Columns.Contains("OrganizationalUnit") && !DBNull.Value.Equals(row["OrganizationalUnit"])) { adobjectId = (ADObjectId)row["OrganizationalUnit"]; } filter = null; preArgs = null; parameterList = ((adobjectId != null) ? string.Format("-OrganizationalUnit '{0}'", adobjectId.ToQuotationEscapedString()) : null); }