From 77bd3f929197d3b36237bbcdea01e1584aef4447 Mon Sep 17 00:00:00 2001 From: he3als <65787561+he3als@users.noreply.github.com> Date: Sun, 11 Aug 2024 19:08:40 +0100 Subject: [PATCH] fix: cleanup previous commits --- .../Modules/MicrosoftEdge/MicrosoftEdge.psm1 | 0 .../Scripts/Modules/UserPaths/UserPaths.psm1 | 26 +------------------ .../AtlasModules/Scripts/initPowerShell.ps1 | 9 ------- 3 files changed, 1 insertion(+), 34 deletions(-) delete mode 100644 src/playbook/Executables/AtlasModules/Scripts/Modules/MicrosoftEdge/MicrosoftEdge.psm1 delete mode 100644 src/playbook/Executables/AtlasModules/Scripts/initPowerShell.ps1 diff --git a/src/playbook/Executables/AtlasModules/Scripts/Modules/MicrosoftEdge/MicrosoftEdge.psm1 b/src/playbook/Executables/AtlasModules/Scripts/Modules/MicrosoftEdge/MicrosoftEdge.psm1 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/src/playbook/Executables/AtlasModules/Scripts/Modules/UserPaths/UserPaths.psm1 b/src/playbook/Executables/AtlasModules/Scripts/Modules/UserPaths/UserPaths.psm1 index 00a9481151..94e14d35c3 100644 --- a/src/playbook/Executables/AtlasModules/Scripts/Modules/UserPaths/UserPaths.psm1 +++ b/src/playbook/Executables/AtlasModules/Scripts/Modules/UserPaths/UserPaths.psm1 @@ -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, @@ -81,4 +57,4 @@ function Get-SystemDrive { throw "Failed to find the system drive!" } -Export-ModuleMember -Function Get-UserPath, Get-Accounts \ No newline at end of file +Export-ModuleMember -Function Get-UserPath, Get-SystemDrive \ No newline at end of file diff --git a/src/playbook/Executables/AtlasModules/Scripts/initPowerShell.ps1 b/src/playbook/Executables/AtlasModules/Scripts/initPowerShell.ps1 deleted file mode 100644 index aa60352f27..0000000000 --- a/src/playbook/Executables/AtlasModules/Scripts/initPowerShell.ps1 +++ /dev/null @@ -1,9 +0,0 @@ -$seperator = [IO.Path]::PathSeparator - -# Add modules path -$env:PSModulePath += "$seperator" + "$PWD\AtlasModules\Scripts\Modules" - -# Update PATH variable -$env:Path = [System.Environment]::GetEnvironmentVariable("Path",[System.EnvironmentVariableTarget]::Machine) + ` - $seperator + ` - [System.Environment]::GetEnvironmentVariable("Path",[System.EnvironmentVariableTarget]::User) \ No newline at end of file