Skip to content

Commit bbff80b

Browse files
committed
upate the steps for powershell
1 parent cb678e9 commit bbff80b

File tree

1 file changed

+36
-54
lines changed

1 file changed

+36
-54
lines changed

modules/ROOT/pages/installation/windows.adoc

Lines changed: 36 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -113,31 +113,27 @@ bin\neo4j restart
113113

114114
The Neo4j PowerShell module allows administrators to install, start, and stop Neo4j Windows® Services, as well as perform various administrative tasks using `Neo4j Admin` and `Cypher Shell`.
115115
The PowerShell module is installed as part of the https://neo4j.com/deployment-center/[ZIP file] distributions of Neo4j.
116-
117-
118-
[[powershell-requirements]]
119-
* System requirements:
120-
121-
* PowerShell 5.1 or later (PowerShell 7.x recommended).
122-
* Supported on 64-bit Windows operating systems.
116+
It requires PowerShell 5.1 or later (PowerShell 7.x recommended) and is supported on 64-bit Windows operating systems.
123117

124118
. Unblock the downloaded Neo4j ZIP file if necessary to be able to import the module:
125-
126119
.. Right-click on the ZIP file and choose *Properties*. +
127120
A dialog appears with an *Unblock* button.
128121
.. Click the *Unblock* button to enable the import of the module.
129-
+
130-
Running scripts has to be enabled on the system.
131-
This can, for example, be achieved by executing the following from an elevated PowerShell prompt:
122+
.. Click *Apply* and then *OK* to close the dialog.
123+
. Right-click the downloaded file and select *Extract All* to extract the contents of the archive.
124+
. Run the following command from an elevated PowerShell prompt to enable script execution:
132125
+
133126
[source,powershell]
134127
----
135-
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
128+
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
136129
----
137130
+
138131
For more information, see https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-7.5[About execution policies].
139-
132+
+
133+
[NOTE]
134+
====
140135
The PowerShell module displays a warning if it detects that you do not have administrative rights.
136+
====
141137

142138
. Set the environment variable `NEO4J_HOME` to point to the directory where you have installed Neo4j.
143139
For example, you can run the following command in your PowerShell session, assuming you have installed Neo4j in `C:\Neo4j`:
@@ -146,7 +142,6 @@ For example, you can run the following command in your PowerShell session, assum
146142
----
147143
$env:NEO4J_HOME = "C:\Neo4j"
148144
----
149-
+
150145
. Import the Neo4j PowerShell module by running the following command:
151146
+
152147
[source,powershell]
@@ -172,15 +167,15 @@ To stop the server, use `Ctrl-C` in the console window, created by the command.
172167
[[powershell-help]]
173168
==== Inspect the module
174169

175-
You can get all available commands in the module by running the following command:
176-
170+
. Get all available commands in the module by running the following command:
171+
+
177172
[source,powershell]
178173
----
179174
Get-Command -Module Neo4j-Management
180175
----
181-
176+
+
182177
The output should be similar to the following:
183-
178+
+
184179
[source, shell, subs="attributes"]
185180
----
186181
CommandType Name Version Source
@@ -192,57 +187,44 @@ Function Invoke-Neo4jImport {neo4j-version-exact} N
192187
Function Invoke-Neo4jShell {neo4j-version-exact} Neo4j-Management
193188
----
194189

195-
The module also supports the standard PowerShell help commands
196-
197-
[source,powershell]
198-
----
199-
Get-Help Invoke-Neo4j
200-
----
201-
202-
Run the following to see examples of help commands:
203-
204-
[source,powershell]
205-
----
206-
Get-Help Invoke-Neo4j -examples
207-
----
208-
209-
210-
[[powershell-examples]]
211-
==== Example usage
212-
213-
* List of available commands:
190+
. See what each command does by running the following command, replacing `<command-name>` with the name of the command you want to inspect, for example, `Invoke-Neo4j`:
214191
+
215192
[source,powershell]
216193
----
217-
Invoke-Neo4j
194+
Get-Help <command-name>
218195
----
219196

220-
* Current status of the Neo4j service:
197+
. Run the following to see some usage examples of that command:
221198
+
222199
[source,powershell]
223200
----
224-
Invoke-Neo4j status
201+
Get-Help <command-name> -examples
225202
----
226-
227-
* Install the service with verbose output:
228203
+
229-
[source,powershell]
230-
----
231-
Invoke-Neo4j windows-service -Verbose
232-
----
204+
.Usage examples
205+
[options="header", cols="3m,1a"]
206+
|====
207+
| Command
208+
| Description
233209

234-
* Available commands for administrative tasks:
235-
+
236-
[source,powershell]
237-
----
238-
Invoke-Neo4jAdmin
239-
----
210+
| Invoke-Neo4j
211+
| Outputs the available commands.
212+
213+
| Invoke-Neo4j status
214+
| Current status of the Neo4j service.
240215

216+
| Invoke-Neo4j windows-service
217+
| Install the service.
241218

242-
[[powershell-common-parameters]]
243-
==== Common PowerShell parameters
219+
| Invoke-Neo4jAdmin
220+
| Available commands for administrative tasks.
221+
|====
244222

223+
[TIP]
224+
====
245225
The module commands support the common PowerShell parameter of `Verbose`.
226+
You can add `-Verbose` to any command to get more detailed output.
227+
====
246228

247229
== Access Neo4j
248230

0 commit comments

Comments
 (0)