英文:
SQLServer module installed but SQLSERVER:\ drive not found
问题
我已在我的Windows机器上安装了SqlServer模块,没有出现任何问题。然而,当我尝试cd到SQLSERVER:\驱动器时,它说它不存在。我必须在SqlServer模块提供的函数上运行帮助,然后它似乎会进行一些隐式加载,允许我cd到SQLSERVER:\驱动器。这一切都是远程完成的(尽管我已尝试在远程桌面连接到该计算机后进行了测试,结果相同)。有没有办法修复这个解决方法?
运行Get-Module -Name SqlServer -ListAvailable返回:
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 22.0.59 SQLServer {Add-RoleMember, Add-SqlAvailabilityDatabase, Add-SqlAvail...
但在运行帮助之前运行cd SQLSERVER:\返回:
cd : 无法找到驱动器。名为 'SQLSERVER' 的驱动器不存在。
英文:
I've installed the SqlServer module on my windows machine with no issues. However, when I try to cd into the SQLSERVER:\ drive, it says it does not exist. I have to run a help on a function provided by the SqlServer module, and THEN it seems to do some implicit loading which allows me to cd into the SQLSERVER:\ drive. This is all done remotely (though I've tried it after RDPing into the box with the same result). Is there a way to fix this workaround?
Running Get-Module -Name SqlServer -ListAvailable returns:
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 22.0.59 SQLServer {Add-RoleMember, Add-SqlAvailabilityDatabase, Add-SqlAvail...
But running cd SQLSERVER:\ before I run a help returns:
cd : Cannot find drive. A drive with the name 'SQLSERVER' does not exist.
答案1
得分: 1
只需首先导入该模块。
英文:
Just import the module first
Import-Module SQLServer;
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论