Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions JEAnalyzer/JEAnalyzer.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# Version number of this module.

ModuleVersion = '1.3.17'
ModuleVersion = '1.3.19'

# ID used to uniquely identify this module
GUID = '346caa76-534a-4651-88f5-359e85cd71c0'
Expand All @@ -27,7 +27,7 @@
# Modules that must be imported into the global environment prior to importing
# this module
RequiredModules = @(
@{ ModuleName = 'PSFramework'; ModuleVersion = '1.8.289' }
@{ ModuleName = 'PSFramework'; ModuleVersion = '1.12.346' }
)

# Assemblies that must be loaded prior to importing this module
Expand Down Expand Up @@ -80,13 +80,13 @@
PSData = @{

# Tags applied to this module. These help with module discovery in online galleries.
# Tags = @()
Tags = @('jea')

# A URL to the license for this module.
# LicenseUri = ''
LicenseUri = 'https://github.com/PSSecTools/JEAnalyzer/blob/master/LICENSE'

# A URL to the main website for this project.
# ProjectUri = ''
ProjectUri = 'https://github.com/PSSecTools/JEAnalyzer'

# A URL to an icon representing this module.
# IconUri = ''
Expand Down
5 changes: 5 additions & 0 deletions JEAnalyzer/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 1.3.19 (2025-05-07)

- Upd: New-JeaModule - better service account validation and processing
- Fix: Install-JeaModule - unexpected error when failing to connect to remote computer

## 1.3.17 (2023-06-18)

- New: Get-JeaEndpoint - Retrieve JEA Endpoints and their capabilities from target computers.
Expand Down
3 changes: 2 additions & 1 deletion JEAnalyzer/en-us/strings.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
'Export-JeaModule.Role.VisibleCmdlet' = '[Role: {0}] Adding visible Cmdlet: {1}{2}' # $role.Name, $commandName, $parameterText
'Export-JeaModule.Role.VisibleFunction' = '[Role: {0}] Adding visible Function: {1}{2}' # $role.Name, $commandName, $parameterText

'FileSystem.Directory.Fail' = 'Not a directory: {0}' # <user input>, <validation item>
'Validate.FileSystem.Directory.Fail' = 'Not a directory: {0}' # <user input>, <validation item>
'Validate.ServiceAccount' = 'Invalid account name: Must be a valid NTAccount name notation (<domain netbios name>\samaccountname)' # <user input>, <validation item>

'General.BoundParameters' = 'Bound parameters: {0}' # ($PSBoundParameters.Keys -join ", ")

Expand Down
3 changes: 2 additions & 1 deletion JEAnalyzer/functions/construct/New-JeaModule.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
[string]
$Identity,

[PsfValidateScript('JEAnalyzer.Validate.ServiceAccount', ErrorString = 'JEAnalyzer.Validate.ServiceAccount')]
[string]
$ServiceAccount,

Expand Down Expand Up @@ -120,7 +121,7 @@
Company = $Company
}
if ($Identity) { $module.Roles[$Name] = New-JeaRole -Name $Name -Identity $Identity }
if ($ServiceAccount) { $module.ServiceAccount = $ServiceAccount }
if ($ServiceAccount) { $module.ServiceAccount = $ServiceAccount -replace '\$$' }
if ($RequiredModules) { $module.RequiredModules = $RequiredModules }
if ($ModulesToImport) { $module.ModulesToImport = $ModulesToImport }
foreach ($scriptFile in $PreImport) { $module.PreimportScripts[$scriptFile.Name] = $scriptFile }
Expand Down
2 changes: 1 addition & 1 deletion JEAnalyzer/functions/deploy/Install-JeaModule.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
if ($failedServers)
{
if ($EnableException) { Stop-PSFFunction -String 'Install-JeaModule.Connections.Failed' -StringValues ($failedServers.TargetObject -join ", ") -Target $failedServers.TargetObject -EnableException $EnableException }
foreach ($failure in $failedServers) { Write-PSFMessage -Level Warning -String 'Install-JeaModule.Connections.Failed' -StringValues $failure.TargetObject -ErrorRecord $_ -Target $failure.TargetObject }
foreach ($failure in $failedServers) { Write-PSFMessage -Level Warning -String 'Install-JeaModule.Connections.Failed' -StringValues $failure.TargetObject -ErrorRecord $failure -Target $failure.TargetObject }
}
if (-not $sessions)
{
Expand Down
3 changes: 3 additions & 0 deletions JEAnalyzer/internal/scriptblock/validateServiceAccount.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Set-PSFScriptblock -Name 'JEAnalyzer.Validate.ServiceAccount' -Scriptblock {
$_ -match '^[^\\]+\\[^\\]+$'
} -Global
5 changes: 4 additions & 1 deletion JEAnalyzer/tests/general/strings.Exceptions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ $exceptions['LegalSurplus'] = @(
)
#>
$exceptions['LegalSurplus'] = @(

'Validate.FileSystem.Directory.Fail'
)

$exceptions['NoTextNeeded'] = @(
Expand All @@ -28,6 +28,9 @@ $exceptions['NoTextNeeded'] = @(
'Validate.Uri.Absolute'
'Validate.Uri.Absolute.File'
'Validate.Uri.Absolute.Https'

'FileSystem.Directory.Fail'
'Validate.FileSystem.Directory.Fail'
)

$exceptions