Working with the sample code
This recipe simply walks you through how you can work with the scripts in this book. Samples in this book have been created and tested against SQL Server 2014 on Windows Server 2012 R2.
How to do it...
If you want to use your current machine without creating a separate VM, as illustrated in Create a SQL Server VM section in Appendix B, follow these steps to prepare your machine:
- Install SQL Server 2014 on your current operating system—either Windows 7 or Windows Server 2012 R2. A list of supported operating systems for SQL Server 2014 is available at http://msdn.microsoft.com/en-us/library/ms143506.aspx.
- Microsoft provides really good documentation (both MSDN and TechNet) on how to install SQL Server, and the different ways you can install SQL Server. I encourage you to read the installation tutorial, as well as the installation notes that come with your software (https://msdn.microsoft.com/en-us/library/ms143219.aspx)
- Install PowerShell v5. At the time of writing this book, only the Windows Management Framework (WMF) 5.0 Production Preview was available. You can download it from http://www.microsoft.com/en-us/download/details.aspx?id=48729. The installation instructions are also bundled in the download. At the time of writing this book, WMF 5.0 Production Preview can be installed on Windows 7 SP1, Windows 8.1 Pro/Enterprise, Windows Server 2008 R2, Windows Server 2012, and Windows Server 2012 R2.
- By the time this book is in your hands, PowerShell v5 might be available and be bundled in the newer Microsoft operating systems. This download includes, as stated in the download page, updates to Windows PowerShell, Desired State Configuration (DSC) of Windows PowerShell and Windows PowerShell ISE. It also includes Package Management and Network Switch cmdlets.
- If you are planning to use the console, set the execution policy to
RemoteSigned
in the console. This setting will enable us to run the scripts presented in this book.- Right-click on Windows PowerShell on your taskbar and choose Run as Administrator.
- Set execution policy to
RemoteSigned
by executing the following on the console:Set-ExecutionPolicy RemoteSigned
- If you are planning to use the PowerShell Integrated Scripting Environment (ISE), set the execution policy to
RemoteSigned
. We will be using the improved ISE in many samples in this book.- Right-click on Windows PowerShell on your taskbar and choose Run ISE as Administrator.
- Set the execution policy to
RemoteSigned
by executing the following on the script editor:Set-ExecutionPolicy RemoteSigned
See also
- Keep up to date with PowerShell news, articles, tips, and tricks from the PowerShell team blog at http://blogs.msdn.com/b/powershell/.
- Check out the SQL Server PowerShell documentation on MSDN at https://msdn.microsoft.com/en-us/library/hh245198.aspx