Skip to content

Commit

Permalink
fix: cleanup previous commits
Browse files Browse the repository at this point in the history
  • Loading branch information
he3als committed Aug 11, 2024
1 parent 682c0fd commit 77bd3f9
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 34 deletions.
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -43,30 +43,6 @@ public class KnownFolder
}
}

function Get-Accounts {
$accounts = Get-CimInstance Win32_UserAccount -Filter "Disabled=False"
$userProfiles = Get-CimInstance Win32_UserProfile

$profileLookup = @{}
foreach ($profile in $userProfiles) {
$profileLookup[$profile.SID] = $profile.LocalPath
}

$data = $accounts | ForEach-Object {
$account = $_
$profilePath = $profileLookup[$account.SID]

[PSCustomObject]@{
Name = $account.Name
Caption = $account.Caption
Path = $profilePath
SID = $account.SID
}
}

return $data
}

function Get-SystemDrive {
@(
$env:SystemDrive,
Expand All @@ -81,4 +57,4 @@ function Get-SystemDrive {
throw "Failed to find the system drive!"
}

Export-ModuleMember -Function Get-UserPath, Get-Accounts
Export-ModuleMember -Function Get-UserPath, Get-SystemDrive

This file was deleted.

0 comments on commit 77bd3f9

Please sign in to comment.