SQLPSX, redirected my documents, and 64-bit Windows
Summary:
These 3 things don’t really want to work together. Three issues I’ve noticed w/ SQLPSX, but ways around them to get these awesome cmdlets to work.
Based on SQLPSX 2.3.2.1
Workaround:
These 3 things don’t really want to work together. Three issues I’ve noticed w/ SQLPSX, but ways around them to get these awesome cmdlets to work.
Based on SQLPSX 2.3.2.1
Workaround:
- Run the MSI installation. It defaults to your my documents directory. Instead redirect the installation directory to your powershell module installation directory.
- Usually for 64-bit: C:\Windows\System32\WindowsPowershell\v1.0\Modules\
- 32-bit: C:\Windows\SysWow64\WindowsPowershell\v1.0\Modules\
- These feel backwards to me, but seems to be true.
- Once installed, you’ll need to copy the module folders into your my documents redirected location. You can get them from either the 64-bit or 32-bit paths above. The folders you need to copy are as follows:
- SQLMaint
- SQLServer
- Agent
- Repl
- SSIS
- Showmbrs
- SQLParser
- adolib
- Once you do so, you should be able to run ‘import-module sqlpsx’ successfully. To find out what new cmdlets are available to you, simply run the following:
- get-command | where {$_.module -match "SQLMaint|SQLServer|Agent|Repl|SSIS|ShowMbrs|SQLParser|adolib"}
- You can also make this a function and include it in your PS profile like so:
- Function Get-SQLcommands {get-command |where {$_.module -match "SQLMaint|SQLServer|Agent|Repl|SSIS|ShowMbrs|SQLParser|adolib"}}
Comments