Connecting to the Integrated Database:
To connect to the WSUS’s integrated database, use the following server path:
1 | \\.\pipe\MICROSOFT##WID\tsql\query |
The name of the database is SUSDB
.
Note: It’s essential to execute the tools directly on the server (remote execution is not possible). Ensure you run them with administrative privileges for a successful connection.
Powershell Script Example:
Here’s a sample Powershell script to facilitate the connection:
1 2 3 4 5 6 7 | import-module SqlServer $Instance = "\\.\pipe\MICROSOFT##WID\tsql\query" $Bdd = "SUSDB" $FileSQL = "Maintenance.sql" Invoke-Sqlcmd -ServerInstance $Instance -Database $Bdd -InputFile $FileSQL |
0 Comments