forked from ktaranov/sqlserver-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCompare-Server-Settings.ps1
More file actions
25 lines (19 loc) · 892 Bytes
/
Copy pathCompare-Server-Settings.ps1
File metadata and controls
25 lines (19 loc) · 892 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#Requires -module dbatools
<#
.SYNOPSIS
Compare settings for production and development SQL Server instance
.PARAMETER $productionName
Production server name
.PARAMETER $productionName
Production server name
.NOTE
Original link: https://therestisjustcode.wordpress.com/2017/09/12/t-sql-tuesday-94-automating-configuration-comparison/
Author: Andy Levy
Modified: Konstantin Taranov 2017-09-20
#>
$productionName = 'localhost';
$developmentName = 'localhost';
$ProductionConfiguration = Get-DbaSpConfigure -ServerInstance $productionName;
# -SqlCredential (Get-Credential -Message "Production Credentials" -UserName MySQLLogin);
$DevelopmentConfiguration = Get-DbaSpConfigure -ServerInstance $developmentName;
Compare-Object -ReferenceObject $DevelopmentConfiguration -DifferenceObject $ProductionConfiguration -property ConfigName, RunningValue | Sort-Object ConfigName;