Skip to content

Commit 7dbca45

Browse files
committed
minor update
1 parent 6ae89d1 commit 7dbca45

File tree

3 files changed

+64
-0
lines changed

3 files changed

+64
-0
lines changed

pages/AD-Integration/dbconfig.ps1

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
#Create AD tables in Database
2+
$computername = 'localhost'
3+
$dbname = 'ultimatedashboard'
4+
Set-Location SQLSERVER:\SQL\$computername\DEFAULT\databases\$dbname
5+
6+
#Create AD summary table
7+
Invoke-Sqlcmd -Query "CREATE TABLE ad_summary (
8+
date datetime PRIMARY KEY,
9+
success bit,
10+
total_users int,
11+
total_users_enabled int,
12+
total_groups int,
13+
total_computers int,
14+
total_enabled_computers int,
15+
forest_functional_level text,
16+
);"
17+
18+
#Create AD Computer Summary Table
19+
Invoke-Sqlcmd -Query "CREATE TABLE ad_computers (
20+
comp_name text,
21+
operating_system text,
22+
last_logon_time bigint,
23+
bad_kerb_method text,
24+
enabled text,
25+
dns_name text
26+
);"
27+
28+
#Create OS Summary Table
29+
Invoke-Sqlcmd -Query "CREATE TABLE ad_os_summary (
30+
date datetime
31+
)"
32+
33+
#Create AD User Summary Table
34+
Invoke-Sqlcmd -Query "CREATE TABLE ad_users (
35+
user_SAM_name varchar(80),
36+
name varchar(80),
37+
user_created bigint,
38+
last_logon_date bigint,
39+
user_extension varchar(80),
40+
enabled varchar(80),
41+
lockedOut varchar(80),
42+
email_address varchar(80),
43+
password_last_set bigint
44+
);"
45+
46+
#Create AD Group Summary Table
47+
Invoke-Sqlcmd -Query "CREATE TABLE ad_groups (
48+
objectsid varchar(250) PRIMARY KEY,
49+
samaccountname varchar(250),
50+
members text,
51+
member_count int,
52+
memberof text,
53+
memberof_count int,
54+
created bigint,
55+
modified bigint,
56+
description varchar(250),
57+
groupcategory varchar(80),
58+
groupscope varchar(80),
59+
protect_from_deletion varchar(80),
60+
managedby varchar(2500),
61+
)"
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#Integration Information
2+
## Put required arguments for integration here

pages/AD-Integration/jobs.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#Create AD Scheduled Tasks here

0 commit comments

Comments
 (0)