Support Center

Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

InstallSchema.exe error

Andrew Notarian Jul 15, 2016 03:24PM CDT

I am having PowerShell problems. I am not a big PowerShell user. First I had to grant permissions to let scripts run, then I choco installed myself some powershell4. But for some reason the runtime still thinks its PowerShell 2:

PS C:\windows\system32> $PSVersionTable

Name Value
---- -----
PSVersion 4.0
WSManStackVersion 3.0
SerializationVersion 1.1.0.1
CLRVersion 4.0.30319.42000
BuildVersion 6.3.9600.16406
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0}
PSRemotingProtocolVersion 2.2

PS C:\MinionByMidnightDBA> .\InstallSchema.exe
ERROR: Import-Module : The version of the loaded PowerShell is '2.0'. The module 'C:\P
ERROR: rogram Files (x86)\Microsoft SQL Server\130\Tools\PowerShell\Modules\SQLASCMDLE
ERROR: TS\SQLASCMDLETS.psd1' requires a minimum PowerShell version of '4.0' to execute
ERROR: . Please verify the installation of the PowerShell and try again.
ERROR:
ERROR: At C:\Program Files (x86)\Microsoft SQL Server\120\Tools\PowerShell\Modules\SQL
ERROR: PS\SqlPsPostScript.ps1:8 char:33
ERROR: + if($m -ne $null) { Import-Module <<<< $m -Global }
ERROR: + CategoryInfo : ResourceUnavailable: (C:\Program File...LASCMDLE
ERROR: TS.psd1:String) [Import-Module], InvalidOperationException
ERROR: + FullyQualifiedErrorId : Modules_InsufficientPowerShellVersion,Microsoft.
ERROR: PowerShell.Commands.ImportModuleCommand
ERROR:
Enter your SQL Instance name?:

Up 0 rated Down
Sean McCown Jul 18, 2016 09:06AM CDT MinionWare Agent

Hey Andrew, don’t forget to answer the question I sent before… repeating it here for ease of use.

Ok what version of Windows and SQL are you installing it on?

Up 0 rated Down
Andrew Notarian Jul 18, 2016 10:27AM CDT
Microsoft SQL Server 2014 - 12.0.2269.0 (X64)
Jun 10 2015 03:35:45
Copyright (c) Microsoft Corporation
Developer Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1)

Microsoft Windows [Version 6.1.7601] (i.e Windows 7 x64)
Up 0 rated Down
Sean McCown Jul 18, 2016 03:12PM CDT MinionWare Agent

Can you tell me what versions of .Net you have installed? I’d like to try to repro this. I’ve seen it on servers that have SQL 2016 installed on them, but never on a straight install of 2014.
Run the following in PS and send me a screenshot of the results if you would…
get-windowsfeature | ?{$_.Name -match "NET"}

Up 0 rated Down
Sean McCown Jul 18, 2016 03:20PM CDT MinionWare Agent

I think I see your issue. We support Windows 2012 R2, which is v.6.3. You’ve got v.6.1, which I believe is Windows 2008 R2.
I didn’t notice the version number before.

Up 0 rated Down
Andrew Notarian Aug 08, 2016 09:39AM CDT
It's actually Windows 7. I was trying to get it running on my own workstation which is about the only place I would be remotely permitted to install unapproved software. If it can't run there I will have to play with it in my home environments which have no real workloads.
Up 0 rated Down
Sean McCown Aug 08, 2016 09:43AM CDT MinionWare Agent

Y there’s no way I can support this on Win7. I have no idea what the behavior would be or what it would take to get it running.

Post Your Public Answer

Your name (required)
Your email address (required)
Answer (required)
556ca399015f31edc97a62de2771be1a@minionware.desk-mail.com
https://cdn.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete