I have installed SqlServer
moduled with Install-Module -Name SqlServer -Repository PSGallery -Verbose
command. PS says that it was successfuly.
But when I'm runneng import-module
I only see 3 items imported from this module:
PS >import-module sqlserver -erroraction stop -verbose
VERBOSE: Loading module from path 'C:\Program
Files\WindowsPowerShell\Modules\sqlserver\21.0.17240\sqlserver.psd1'.
VERBOSE: Populating RepositorySourceLocation property for module sqlserver.
VERBOSE: Loading module from path 'C:\Program
Files\WindowsPowerShell\Modules\sqlserver\21.0.17240\SqlServer.psm1'.
VERBOSE: Exporting function 'SQLSERVER:'.
VERBOSE: Exporting alias 'Encode-SqlName'.
VERBOSE: Exporting alias 'Decode-SqlName'.
VERBOSE: Importing function 'SQLSERVER:'.
VERBOSE: Importing alias 'Decode-SqlName'.
VERBOSE: Importing alias 'Encode-SqlName'.
Question: how to get all the commands (like Invoike-Sqlcmd
and other) from SqlServer
working?
PS Version
Name Value
---- -----
PSVersion 5.1.16299.251
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.16299.251
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
UPDATE:
Running Get-Command -Module SqlServer | Measure
gives even after force reinstall with Install-Module SqlServer -Force
:
PS H:\> Get-Command -Module SqlServer | Measure
Count : 3
Average :
Sum :
Maximum :
Minimum :
Property :
Checked event log. Found bunch of Information
records, when importing the SqlServer
module like this:
Context Information:
DetailSequence=1
DetailTotal=1
SequenceNumber=17
UserId=DOMAIN/User
HostName=ConsoleHost
HostVersion=5.1.16299.251
HostId=GUID
HostApplication=C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
EngineVersion=5.1.16299.251
RunspaceId=GUID
PipelineId=6
ScriptName=C:\Program Files\WindowsPowerShell\Modules\SqlServer\21.0.17240\SqlServer.psm1
CommandLine= Add-Type -Path $binaryPath
Details:
CommandInvocation(Add-Type): "Add-Type"
ParameterBinding(Add-Type): name="Path"; value="C:\Program Files\WindowsPowerShell\Modules\SqlServer\21.0.17240\Microsoft.SqlServer.Dmf.dll"