Skip to content

Commit

Permalink
fix: defaultuser0
Browse files Browse the repository at this point in the history
  • Loading branch information
Xyueta committed Oct 21, 2023
1 parent f1f7203 commit 0ea3b9f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/playbook/Configuration/tweaks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,7 @@ tasks:
# -----------------------------------------------------
- tweaks\statuses\status-security.yml
- tweaks\security\block-anonymous-enum-sam.yml
# This account should be deleted after OOBE
# - tweaks\security\delete-defaultuser0.yml
- tweaks\security\delete-defaultuser0.yml
- tweaks\security\disable-remote-assistance.yml
# Not needed on modern versions of Windows
# https://learn.microsoft.com/en-us/dotnet/framework/network-programming/tls
Expand Down
9 changes: 5 additions & 4 deletions src/playbook/Executables/CLEANUP.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# AtlasOS Post-Installation Cleanup Utility
$ErrorActionPreference = 'SilentlyContinue'

# As cleanmgr has multiple processes, there's no point in making the window hidden as it won't apply
function Invoke-AtlasDiskCleanup {
Expand Down Expand Up @@ -52,13 +53,13 @@ foreach ($drive in $drives) {
if (!($otherInstalls)) { Invoke-AtlasDiskCleanup }

# Clear the temporary user folder
Get-ChildItem -Path "$env:TEMP" -File | Remove-Item -Force -EA SilentlyContinue
Get-ChildItem -Path "$env:TEMP" -File | Remove-Item -Force

# Exclude the AME folder while deleting directories in the temporary user folder
Get-ChildItem -Path "$env:TEMP" -Directory | Where-Object { $_.Name -ne 'AME' } | Remove-Item -Force -Recurse -EA SilentlyContinue
Get-ChildItem -Path "$env:TEMP" -Directory | Where-Object { $_.Name -ne 'AME' } | Remove-Item -Force -Recurse

# Clear the temporary system folder
Remove-Item -Path "$env:windir\Temp\*" -Force -Recurse -EA SilentlyContinue
Remove-Item -Path "$env:windir\Temp\*" -Force -Recurse

# Disable Reserved Storage for updates
Set-WindowsReservedStorageState -State Disabled
Expand All @@ -67,7 +68,7 @@ Set-WindowsReservedStorageState -State Disabled
vssadmin delete shadows /all /quiet

# Clear Event Logs
wevtutil el 2>$null | ForEach-Object {wevtutil cl "$_"} 2>$null
wevtutil el | ForEach-Object {wevtutil cl "$_"}

Stop-Service -Name "dps" -Force
Stop-Service -Name "wuauserv" -Force
Expand Down

0 comments on commit 0ea3b9f

Please sign in to comment.