diff options
author | heqnx <root@heqnx.com> | 2025-07-16 20:36:21 +0300 |
---|---|---|
committer | heqnx <root@heqnx.com> | 2025-07-16 20:36:21 +0300 |
commit | 6b73a149e440592e988d97e41353aedb64cc86cb (patch) | |
tree | faf9afc787f563c9683eb84b78db06016c4b91cf /ansible | |
parent | a109fdc94ebb138c0147877643d2c5c48cd0ed9e (diff) | |
download | ansible-active-directory-range-6b73a149e440592e988d97e41353aedb64cc86cb.tar.gz ansible-active-directory-range-6b73a149e440592e988d97e41353aedb64cc86cb.zip |
fixed running sql through websql to mssql02
Diffstat (limited to 'ansible')
-rw-r--r-- | ansible/scripts/setup-mssql.ps1 | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ansible/scripts/setup-mssql.ps1 b/ansible/scripts/setup-mssql.ps1 index f7bcf3b..c37ee42 100644 --- a/ansible/scripts/setup-mssql.ps1 +++ b/ansible/scripts/setup-mssql.ps1 @@ -78,6 +78,9 @@ try { SqlCmd -E -Q "ALTER LOGIN sa ENABLE" SqlCmd -E -Q "ALTER LOGIN sa WITH PASSWORD = '$SvcPassword', CHECK_POLICY=OFF" + + SqlCmd -E -Q "CREATE LOGIN [CONTOSO\svc_iis01] FROM WINDOWS;" + SqlCmd -E -Q "ALTER SERVER ROLE sysadmin ADD MEMBER [CONTOSO\svc_iis01];" Write-Host "[inf] Added $NetBiosName\$SvcUsername as MSSQL login and sysadmin" Write-Host "[inf] Enabled SA login" } catch { |