首页 > 解决方案 > 底层连接已关闭:neo4j powershell 脚本的连接意外关闭

问题描述

我有一个 powershell 脚本,我试图用它来在 neo4j 数据库上运行查询。按照此处的步骤操作:https ://github.com/RamblingCookieMonster/PSNeo4j 。

问题是,当我使用正确的凭据和 URL 运行代码时,出现连接关闭错误。我很难相信它也是通过“Invoke-WebRequest”命令发生的库。假设我的信用和网址是正确的,我有什么遗漏吗?

代码:

Import-Module PSNeo4j


$Password = ConvertTo-SecureString -String "dummypswd" -AsPlainText -Force

$Cred = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList 'username', $password

Set-PSNeo4jConfiguration -Credential $Cred -BaseUri 'http://localhost:7687'

# Did we connect?
Get-Neo4jUser

标签: powershellneo4jinvoke-webrequest

解决方案


推荐阅读