Connecting to the Integrated Database:

To connect to the WSUS’s integrated database, use the following server path:

\\.\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:

import-module SqlServer

$Instance  = "\\.\pipe\MICROSOFT##WID\tsql\query"
$Bdd       = "SUSDB"
$FileSQL   = "Maintenance.sql"

Invoke-Sqlcmd -ServerInstance $Instance -Database $Bdd -InputFile $FileSQL

0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.