14 lines
455 B
PowerShell
14 lines
455 B
PowerShell
function Get-AllAffectingProfilesAsText {
|
|
[CmdletBinding()]
|
|
[OutputType([string[]])]
|
|
param()
|
|
|
|
$resultingProfile = ""
|
|
$allProfilePaths = ($profile | Get-Member -MemberType NoteProperty).Name
|
|
foreach ($profileName in $allProfilePaths) {
|
|
$resultingProfile += "`n #File read from $profileName`n"
|
|
$resultingProfile += Get-Content -Path $profile.$profileName -ErrorAction Ignore -Raw
|
|
}
|
|
|
|
return $resultingProfile
|
|
} |