Skip to content

Commit

Permalink
Merge pull request #6 from akunzai/cleanup
Browse files Browse the repository at this point in the history
Code cleanup
  • Loading branch information
akunzai authored Jan 4, 2023
2 parents 9cb209f + 329bc21 commit 321b6aa
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
Sample output

````markdown
# Windows Secure Auditor: 0.0.4
# Windows Secure Auditor: 0.0.5

## System Information

Expand Down
2 changes: 1 addition & 1 deletion README.zh-TW.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
範例輸出

````markdown
# Windows Secure Auditor: 0.0.4
# Windows Secure Auditor: 0.0.5

## 系統資訊

Expand Down
2 changes: 0 additions & 2 deletions SecureAuditor.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ Import-Module ([IO.Path]::Combine($PSScriptRoot, 'SecureAuditor.psm1')) -Force
$i18n = Data {
# culture="en-US"
ConvertFrom-StringData @'
Match = match
NotMatch = not match
SystemInfo = System Information
Error = Error
'@
Expand Down
4 changes: 2 additions & 2 deletions SecureAuditor.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# RootModule = ''

# Version number of this module.
ModuleVersion = '0.0.4'
ModuleVersion = '0.0.5'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down Expand Up @@ -63,7 +63,7 @@
# NestedModules = @()

# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
FunctionsToExport = @('Get-IniContent', 'IsLocalAdministrator', 'Write-CheckList', 'Write-RequireAdministrators')
FunctionsToExport = @('Get-IniContent', 'IsLocalAdministrator', 'Write-CheckList', 'Write-RequireAdministrator')

# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
CmdletsToExport = @()
Expand Down
2 changes: 1 addition & 1 deletion SecureAuditor.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function IsLocalAdministrator() {
return $false;
}

function Write-RequireAdministrators($ruleName) {
function Write-RequireAdministrator($ruleName) {
Write-Host "`n> $($i18n.SkipRule): $($ruleName) ($($i18n.RequireAdministrator)) ..."
}

Expand Down
2 changes: 1 addition & 1 deletion rules/EventLogs.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if ($PSUICulture -ne 'en-US') {
function Test($config) {
if (-not (IsLocalAdministrator)) {
$ruleName = [System.IO.Path]::GetFileNameWithoutExtension($PSCommandPath)
Write-RequireAdministrators($ruleName)
Write-RequireAdministrator($ruleName)
return
}
$logNames = $config.EventLogs.LogNames -split ',\s*'
Expand Down
2 changes: 1 addition & 1 deletion rules/Login.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if ($PSUICulture -ne 'en-US') {
function Test($config) {
if (-not (IsLocalAdministrator)) {
$ruleName = [System.IO.Path]::GetFileNameWithoutExtension($PSCommandPath)
Write-RequireAdministrators($ruleName)
Write-RequireAdministrator($ruleName)
return
}
$days = [int]::Parse($config.Login.Days) * -1
Expand Down
2 changes: 1 addition & 1 deletion rules/PasswordPolicy.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if ($PSUICulture -ne 'en-US') {
function Test($config) {
if (-not (IsLocalAdministrator)) {
$ruleName = [System.IO.Path]::GetFileNameWithoutExtension($PSCommandPath)
Write-RequireAdministrators($ruleName)
Write-RequireAdministrator($ruleName)
return
}
# https://learn.microsoft.com/windows-server/administration/windows-commands/secedit-export
Expand Down
2 changes: 0 additions & 2 deletions zh-TW/SecureAuditor.psd1
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# culture="zh-TW"
ConvertFrom-StringData -StringData @'
RequireAdministrator = 需要管理者權限
Match = 符合
NotMatch = 不符合
SkipRule = 略過規則
SystemInfo = 系統資訊
Error = 錯誤
Expand Down

0 comments on commit 321b6aa

Please sign in to comment.