-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from LarryWisherMan/fix/FolderName-ProcessFolders
Add `Remove-UserProfilesFromRegistry`
- Loading branch information
Showing
63 changed files
with
5,620 additions
and
509 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,51 @@ | ||
class ProfileDeletionResult { | ||
class ProfileDeletionResult | ||
{ | ||
[string]$SID | ||
[string]$ProfilePath | ||
[bool]$DeletionSuccess | ||
[string]$DeletionMessage | ||
[string]$ComputerName | ||
|
||
# Constructor to initialize the properties | ||
ProfileDeletionResult([string]$sid, [string]$profilePath, [bool]$deletionSuccess, [string]$deletionMessage, [string]$computerName) { | ||
# Constructor 1: Full constructor | ||
ProfileDeletionResult([string]$sid, [string]$profilePath, [bool]$deletionSuccess, [string]$deletionMessage, [string]$computerName) | ||
{ | ||
$this.SID = $sid | ||
$this.ProfilePath = $profilePath | ||
$this.DeletionSuccess = $deletionSuccess | ||
$this.DeletionMessage = $deletionMessage | ||
$this.ComputerName = $computerName | ||
} | ||
|
||
# Constructor 2: Only SID and DeletionSuccess, with default values for others | ||
ProfileDeletionResult([string]$sid, [bool]$deletionSuccess) | ||
{ | ||
$this.SID = $sid | ||
$this.ProfilePath = $null | ||
$this.DeletionSuccess = $deletionSuccess | ||
if ($deletionSuccess) | ||
{ | ||
$this.DeletionMessage = "Operation successful" | ||
} | ||
else | ||
{ | ||
$this.DeletionMessage = "Operation failed" | ||
} | ||
$this.ComputerName = $env:COMPUTERNAME | ||
} | ||
|
||
# Constructor 3: Minimal constructor with defaults for all except SID | ||
ProfileDeletionResult([string]$sid) | ||
{ | ||
$this.SID = $sid | ||
$this.ProfilePath = $null | ||
$this.DeletionSuccess = $false | ||
$this.DeletionMessage = "No action performed" | ||
$this.ComputerName = $env:COMPUTERNAME | ||
} | ||
|
||
# Optional method | ||
[string] ToString() | ||
{ | ||
return "[$($this.SID)] DeletionSuccess: $($this.DeletionSuccess), Message: $($this.DeletionMessage)" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
Oops, something went wrong.