Skip to content

Commit 258c425

Browse files
author
James Brundage
committed
feat: Namespace.get_Environment ( Fixes #1145 )
1 parent 0531a68 commit 258c425

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Types/Namespace/get_Environment.ps1

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<#
2+
.SYNOPSIS
3+
Gets the environment variables in the namespace.
4+
.DESCRIPTION
5+
Gets all the environment variables in the namespace.
6+
7+
These are all the environment variables where the name matches the pattern of the namespace.
8+
#>
9+
param()
10+
foreach ($variable in Get-ChildItem env:) {
11+
if ($variable.Name -match $this.Pattern) {
12+
$variable
13+
}
14+
}

0 commit comments

Comments
 (0)