December 6, 2017 at 7:22 am
Kev,
Thanks but the sqlps module was replaced by the sqlserver module. Trying to import the sqlps module will return errors that the SMO objects are already present.
To follow up on previous posts of this thread, I also have a Win 10 laptop ( the company just replaced the Win 7 destops and laptops). I followed the same method of installing 17.3 and the sqlserver module on the laptop and I have the same issue with it. Since it is working for Steve and Sue_H I can only think that I have missed something somewhere.
MG
"There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies."
Tony Hoare
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
December 6, 2017 at 8:08 am
MG-148046 - Wednesday, December 6, 2017 7:22 AMKev,
Thanks but the sqlps module was replaced by the sqlserver module. Trying to import the sqlps module will return errors that the SMO objects are already present.To follow up on previous posts of this thread, I also have a Win 10 laptop ( the company just replaced the Win 7 destops and laptops). I followed the same method of installing 17.3 and the sqlserver module on the laptop and I have the same issue with it. Since it is working for Steve and Sue_H I can only think that I have missed something somewhere.
Your directories are a bit different from mine - those sqlserver powershell and manifest files (sqlserver.ps1 and sqlserver.psd1) are in my WindowsPowershell\Modules\SQLServer folder and I get the list of exported commands when I do get-module on sqlserver.
Can you try searching for sqlserver.ps1 and sqlserver.psd1 files and see if they exists somewhere else?
The manifest files should also be in the subfolders for the other versions but not the powershell file. I'd be most interested in where the sqlserver.ps1 file is located.
Sue
December 6, 2017 at 8:29 am
seems I've got them in 2 places:
C:\Program Files (x86)\WindowsPowerShell\Modules\SqlServer
C:\Program Files\WindowsPowerShell\Modules\SqlServer - this folder has the 21.0.17199 sub folder which is the latest release and a Get-Module displays this one.
FYI
PS> $env:PSModulePath -split ';'
C:\Users\mgreenbaum\Documents\WindowsPowerShell\Modules
C:\Program Files\WindowsPowerShell\Modules
C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
C:\Program Files (x86)\Microsoft SQL Server\130\Tools\PowerShell\Modules\ --> I believe this is for SSMS 16.3 which I have installed and that still uses the sqlps for the Start PowerShell function.
MG
"There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies."
Tony Hoare
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
December 6, 2017 at 10:29 am
MG-148046 - Wednesday, December 6, 2017 8:29 AMseems I've got them in 2 places:
C:\Program Files (x86)\WindowsPowerShell\Modules\SqlServer
C:\Program Files\WindowsPowerShell\Modules\SqlServer - this folder has the 21.0.17199 sub folder which is the latest release and a Get-Module displays this one.
FYI
PS> $env:PSModulePath -split ';'
C:\Users\mgreenbaum\Documents\WindowsPowerShell\Modules
C:\Program Files\WindowsPowerShell\Modules
C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
C:\Program Files (x86)\Microsoft SQL Server\130\Tools\PowerShell\Modules\ --> I believe this is for SSMS 16.3 which I have installed and that still uses the sqlps for the Start PowerShell function.
Is the manifest also in the Program Files\WindowsPowershell\Modules\Sqlserver as well as the sqlserver.ps1 file - manifest file is sqlserver.psd1.
The other thing I would check is the current Powershell version you have - I've seen things not load correctly when this hasn't been updated. Check using: $PSVersionTable
Sue
December 6, 2017 at 11:12 am
The manifest is in the same folder and the version of Powershell is 5.1.15063.632.
Unfortunately I can't spend any more time on this. I was hoping to resolve this quickly but I have a project to start on and need to put this on hold. SSMS 16.X works so I'll be continuing on with it.
Thank you all for your help. I really appreciate it.
5.1.15063.632
5.1.15063.632
MG
"There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies."
Tony Hoare
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
December 29, 2017 at 2:23 pm
Stupid question, but have you tried running
import-module sqlserver
and see if the cmdlets show up?
Joie Andrew
"Since 1982"
January 2, 2018 at 5:30 am
Yes - I have it in my profiles for Powershell ISE and Powershell cmd window. Unfortunately that doesn't help for SSMS
MG
"There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies."
Tony Hoare
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
January 2, 2018 at 8:59 am
I think that somehow the SSMS or SQL install didn't get the cmdlets registered correctly. Would it be worth an uninstall/reinstall of SSMS?
January 2, 2018 at 9:10 am
Thanks Steve but I did that early on in quest to no avail. I am waiting for our Desktop Architecture group to certify the latest version, SSMS 17.4, and I'll try again. If that fails, I am going to have them rebuild the desktop. I need the tool and no one else is having this issue so I suspect something went awry in the original Win 10 build for this desktop.
MG
"There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies."
Tony Hoare
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
January 2, 2018 at 10:53 am
Good luck, and sorry I don't have a solution. MS recommends reinstall. I know my desktop started with SQL 2016, then SSMS 16.x, now 17.4. I've skipped a few along the way, but if I start PoSh, I'm right in the SQLServer drive.
February 1, 2018 at 6:15 am
I finally tracked down what caused this issue, my profile. I used the sysinternals procmon tool to see what was being loaded/unload etc. There is a TON of data in the output and not being all that familiar with the tool, it took a while to filter it. I renamed my profile and started SSMS 17.4 and Powershell opened up right where it should. This was not an issue in the previous versions of SSMS including 16.5 which used the older version of the sqlserver module (20). I have a few functions in the profile so I need to go through a process of elimination. I will let you know what I find.
MG
"There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies."
Tony Hoare
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
July 16, 2018 at 10:37 am
Run this: Install-Module -Name SqlServer -AllowClobber
July 17, 2018 at 7:11 am
I just realized that I hadn't posted what I found out. I have a Start-Transcript in my profile and the SQLPS in Management Studio doesn't like that. I removed it and it now works. Sorry for not posting this sooner.
MG
"There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies."
Tony Hoare
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
July 17, 2018 at 8:57 am
Thanks for the note. That's good to know.
Viewing 14 posts - 16 through 28 (of 28 total)
You must be logged in to reply to this topic. Login to reply