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
9 changes: 9 additions & 0 deletions .github/PSModule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,12 @@ Test:
# Build:
# Docs:
# Skip: true
Linter:
env:
VALIDATE_BIOME_FORMAT: false
VALIDATE_BIOME_LINT: false
VALIDATE_GITHUB_ACTIONS_ZIZMOR: false
VALIDATE_JSCPD: false
VALIDATE_JSON_PRETTIER: false
VALIDATE_MARKDOWN_PRETTIER: false
VALIDATE_YAML_PRETTIER: false
8 changes: 7 additions & 1 deletion src/functions/public/Test-Admin.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@
.SYNOPSIS
Test if the current context is running as a specified role.

.DESCRIPTION
This function checks if the current user context has Administrator privileges on Windows or is root on Unix-based systems.
It returns $true if the user has the required privileges, otherwise $false.

.EXAMPLE
Test-Role
```pwsh
Test-Admin
Copy link

Copilot AI Oct 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The example section should include the expected output to make it more helpful for users. Consider adding a line showing what the function returns, such as '$true' or '$false'.

Suggested change
Test-Admin
Test-Admin
# Output (if running as Administrator/root)
$true

Copilot uses AI. Check for mistakes.
```

Test if the current context is running as an Administrator.

Expand Down
Loading