Skip to content

Commit a7b68cd

Browse files
updating docs and fixing deployment issue
1 parent b6f388b commit a7b68cd

File tree

3 files changed

+41
-20
lines changed

3 files changed

+41
-20
lines changed

JEAnalyzer/functions/write/Export-JeaModule.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@ function {0}
130130
foreach ($folder in $folders)
131131
{
132132
Write-PSFMessage -String 'Export-JeaModule.Folder.Content' -StringValues $folder
133-
$null = New-Item -Path (Join-Path -Path $rootFolder.FullName -ChildPath $folder) -ItemType Directory -Force
133+
$folderItem = New-Item -Path (Join-Path -Path $rootFolder.FullName -ChildPath $folder) -ItemType Directory -Force
134+
'# <Placeholder>' | Set-Content -Path "$($folderItem.FullName)\readme.md"
134135
}
135136
#endregion Create Module folder
136137

JEAnalyzer/readme.md

Lines changed: 0 additions & 17 deletions
This file was deleted.

README.md

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,40 @@
11
# JEAnalyzer
2-
3-
Simplifies the implementation of Just Enough Administration by providing functions to convert Code, ScriptBlocks or Scripts into JEA role capability files.
2+
3+
## Synopsis
4+
5+
Simplifies the implementation and management of Just Enough Administration.
6+
7+
It provides tools to:
8+
9+
- Scan commands for potential danger when exposed in a JEA endpoint
10+
- Create JEA Endpoints in simple and convenient manner
11+
12+
## Getting Started
13+
14+
To install the module, run:
15+
16+
```powershell
17+
Install-Module JEAnalyzer
18+
```
19+
20+
Then you are ready to create a new JEA module:
21+
22+
```powershell
23+
$module = New-JeaModule -Name ServerOperations -Description 'JEA Module for basic Server Operations' -Author 'Friedrich Weinmann' -Company Contoso -Version 1.0.0
24+
'Restart-Computer', 'Get-ScheduledTask', 'Start-ScheduledTask', 'Stop-ScheduledTask' | Get-Command | New-JeaRole -Name 'ServerSystem' -Identity 'contoso\ServerSystemPermissions' -Module $module
25+
'Send-RDUserMessage', 'Get-RDUserSession', 'Disconnect-RDUser' | New-JeaRole -Name 'RDSHelpDesk' -Identity 'contoso\RDSHelpDeskPermissions' -Module $module
26+
$module | Export-JeaModule -Path '.'
27+
```
28+
29+
This will create a module in the current folder that can be deployed using default package management tools.
30+
31+
When installed on a target machine (under C:\Program Files\WindowsPowerShell\Modules), registering it as an endpoint is straightforward:
32+
33+
```powershell
34+
Register-JeaEndpoint_JEA_ServerOperations
35+
```
36+
37+
> Note: This requires elevation and must be run in the computer it is installed on.
38+
39+
Registering a JEA endpoint will restart the WinRM service on the computer, disconnecting all sessions.
40+
Executing this command via remoting will thus lead to an error, but not affect the results.

0 commit comments

Comments
 (0)