Created
December 11, 2020 20:37
-
-
Save nanoDBA/c5b7bf8ed812abda5e22d613013e9f5d to your computer and use it in GitHub Desktop.
Impersonating an Application Name Using Connect-DbaInstance
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$cred = Get-Credential 'domain\someAccount' | |
$connFakeClient = Connect-DbaInstance -SqlInstance YOURSQLSRVR -SqlCredential $cred -ClientName "Test App" | |
Invoke-DbaQuery -SqlInstance $connFakeClient -Query "WAITFOR DELAY '00:02:00'" -MessagesToOutput |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment