Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code cleanup #6

Merged
merged 3 commits into from
Jan 4, 2023
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
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