Advertisement
Guest User

Untitled

a guest
Feb 19th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. $CREDENTIALED_SECTION = "-Username $USER_NAME -Password $PASSWORD"
  2. .
  3. .
  4. .
  5.  
  6.  
  7. Invoke-Sqlcmd -ServerInstance "$SERVER_NAME" -Query "$SQL_STATEMENT" "$CREDENTIALED_SECTION" -Database "$DATABASE"
  8.  
  9. $CREDENTIALED_SECTION = @{Username=$USER_NAME; Password=$PASSWORD}
  10.  
  11. Invoke-Sqlcmd -ServerInstance $SERVER_NAME -Query $SQL_STATEMENT @CREDENTIALED_SECTION -Database $DATABASE
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement