Skip to content
This repository was archived by the owner on Aug 7, 2020. It is now read-only.

Commit e166704

Browse files
committed
Updated scripts with require modules
1 parent 5bb9da8 commit e166704

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

AlwaysEncryptedSample.sln

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
1313
.gitignore = .gitignore
1414
Invoke-EncryptColumns.ps1 = Invoke-EncryptColumns.ps1
1515
License.md = License.md
16+
New-EncryptionKeys.ps1 = New-EncryptionKeys.ps1
1617
ReadMe.md = ReadMe.md
1718
EndProjectSection
1819
EndProject

Invoke-EncryptColumns.ps1

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# Modified from script generated by SQL Server Management Studio at 10:27 PM on 2/5/2016
2+
3+
#Requires -Modules sqlserver
4+
25
[cmdletbinding()]
36
param(
47
[string] $ConnectionString = "Data Source=localhost,1433;Initial Catalog=AlwaysEncryptedSample;UID=sa;PWD=alwaysB3Encrypt1ng;Application Name=Encryption.ps1;Column Encryption Setting=enabled;",
@@ -28,7 +31,7 @@ $encryptionChanges += New-SqlColumnEncryptionSettings -ColumnName "$($AuthSchema
2831

2932

3033
# Change table [Purchasing].[CreditCards]
31-
#$encryptionChanges += New-SqlColumnEncryptionSettings -ColumnName "$($AppSchema).CreditCards.CardNumber" -EncryptionType Randomized -EncryptionKey $AppColumnKeyName
34+
$encryptionChanges += New-SqlColumnEncryptionSettings -ColumnName "$($AppSchema).CreditCards.CardNumber" -EncryptionType Randomized -EncryptionKey $AppColumnKeyName
3235
$encryptionChanges += New-SqlColumnEncryptionSettings -ColumnName "$($AppSchema).CreditCards.CCV" -EncryptionType Randomized -EncryptionKey $AppColumnKeyName
3336

3437
# Change table [Logging].[Log]
@@ -39,4 +42,4 @@ Set-SqlColumnEncryption `
3942
-ColumnEncryptionSettings $encryptionChanges `
4043
-InputObject $smoDatabase `
4144
-Script:$Script `
42-
-LogFileDirectory $LogFileDirectory
45+
-LogFileDirectory $LogFileDirectory

New-EncryptionKeys.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# Modified from script generated by SQL Server Management Studio at 10:27 PM on 2/5/2016
2+
3+
#Requires -Modules sqlserver
4+
25
[cmdletbinding()]
36
param(
47
[string] $ConnectionString = "Data Source=localhost,1433;Initial Catalog=AlwaysEncryptedSample;UID=sa;PWD=alwaysB3Encrypt1ng;Application Name=Encryption.ps1;Column Encryption Setting=enabled;",

0 commit comments

Comments
 (0)