Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 111688

Windows PowerShell™ is a task-based command-line shell and scripting language designed especially for automation of Windows tasks. Questions using this tag should restrict themselves to interactions directly with the database tier. General PowerShell scripting questions should be directed to [StackOverflow](https://stackoverflow.com/questions/tagged/powershell).

2 votes
Accepted

How to Natively Return Output when using Invoke-Sqlcmd?

This code is based on your "monstrosity" example above. At the start of each loop it clears the $error variable. Then if the Invoke-Sqlcmd generates an error the IF statement picks it up. It will th …
DBADon's user avatar
  • 325
1 vote

How to automate creating credentials in a secure way

Try this: $cred = get-credential $cred | Export-CliXml -Path C:\Temp\Mycreds.xml Get-Credential will prompt for the username & password & the Export-CliXml will export the results to an XML file. I …
DBADon's user avatar
  • 325