Clean up after restoration
This commit is contained in:
parent
53032abea3
commit
d96a1bf913
2 changed files with 7 additions and 0 deletions
|
@ -42,4 +42,5 @@ function Restore-WindowsInstallation([Context] $context) {
|
|||
Restore-PersonalFiles $context;
|
||||
Restore-PersonalApps $context;
|
||||
Remove-Item -Recurse $context.RootDir;
|
||||
$context.Cleanup();
|
||||
}
|
||||
|
|
|
@ -273,4 +273,10 @@ class Context {
|
|||
Restart-Computer;
|
||||
exit;
|
||||
}
|
||||
|
||||
[void] Cleanup() {
|
||||
$this.DeregisterNewUserReboot();
|
||||
$this.RemoveAutologin();
|
||||
Remove-Item $($this.EnsureConfigKey().PSPath);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue