This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Author: Jana Sattainathan - https://sqljana.wordpress.com - September 1, 2020 | |
#Gets all the loops (ie., at some point members of groups are groups already traversed in hierarchy) | |
function Get-ADGroupLoops | |
{ | |
param ( | |
[Parameter()] | |
[object]$Identity, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Text; | |
using System.Collections.ObjectModel; //Used for CollectionSystem.Collections.ObjectModel.Collection | |
using System.Management.Automation; //Used for all automation related functionality. Also has System.Management.Automation.PSObject. | |
using System.ComponentModel; | |
using System.Data; | |
using System.Linq; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Window x:Class="SQLADHelper.MainWindow" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
xmlns:VM="clr-namespace:SQLADHelper.ViewModel" | |
mc:Ignorable="d" | |
Title="SQL Server AD Helper" | |
Height="850" | |
Width="1200" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
####################### | |
<# | |
.SYNOPSIS | |
Helps locate indexes in non-heap tables based on SchemaName/TableName/IndexName/ColumnName and get the index details | |
.DESCRIPTION | |
Given a list of SQL Instances, searches all/specific databases in each instance using exact/like matching for | |
a matching Schema name (optional) | |
a matching Table name (optional) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DECLARE | |
v_Model_UserName VARCHAR2(30) := UPPER('&Model_UserName'); | |
v_Cloned_UserName VARCHAR2(30) := UPPER('&Cloned_UserName'); | |
v_Skip_If_Model_User_Missing VARCHAR2(1) := '&Skip_If_Model_User_Missing'; | |
v_Remove_Cloned_User_If_Exists VARCHAR2(1) := '&Remove_Cloned_User_If_Exists'; | |
v_Retain_Same_Password VARCHAR2(1) := '&Retain_Same_Password'; | |
v_SQL VARCHAR2(32000); | |
v_Count NUMBER; |