0% found this document useful (0 votes)
33 views9 pages

CMD

Uploaded by

tclt9146
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
Download as txt, pdf, or txt
0% found this document useful (0 votes)
33 views9 pages

CMD

Uploaded by

tclt9146
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1/ 9

Control Panel\System and Security\Windows Tools

secpol.msc

gpedit.msc

lusrmgr.msc

cmd
netsh advfirewall set allprofiles state off

reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v


EnableLUA /t REG_DWORD /d 1 /f
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v
ConsentPromptBehaviorAdmin /t REG_DWORD /d 2 /f

reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v


EnableLinkedConnections /t REG_DWORD /d 1 /f
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v
LocalAccountTokenFilterPolicy /t REG_DWORD /d 1 /f

sc stop WaaSMedicSvc
sc stop McpManagementService
sc stop NPSMSvc
sc stop NPSMSvc_1283f2

sc start wuauserv
sc config wuauserv start= auto
sc config wuauserv start= auto
powershell -command "Start-Process powershell -ArgumentList '-NoProfile -Command &
{Get-WindowsUpdate -AcceptAll -Install -AutoReboot}' -Verb RunAs"

Install-Module PSWindowsUpdate -Force


Get-WindowsUpdate -AcceptAll -Install -AutoReboot

# Check if each service is installed and its current status


Get-Service -Name WaaSMedicSvc, McpManagementService, NPSMSvc, NPSMSvc_1283f2

# Grant full control to the current user


Icacls "C:\Windows\WinSxS\Temp" /grant Admin:(OI)(CI)F /

mkdir C:\DriverBackup
dism /online /export-driver /destination:C:\DriverBackup
dism /online /add-driver /driver:C:\DriverBackup /recurse

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\
StartupApproved
Get-WinEvent -FilterHashtable @{LogName='System'; Level=2; StartTime=$startTime;
EndTime=$endTime}
winget install VideoLAN.VLC
sfc /scannow
Dism /Online /Cleanup-Image /RestoreHealth
sfc /scannow
@Nurse@2024@
shutdown /r /o /f /t 0

[email protected]

Start-MpScan -ScanType FullScan


**********************************
wbadmin start backup -backuptarget:F: -include:C: -allcritical -quiet

wbadmin get versions

mkdir C:\Tools
Expand-Archive -Path "<ZIP_PATH>\Handle.zip" -DestinationPath C:\Tools
cd C:\Tools
handle "F:\WindowsImageBackup\ANPC\Backup 2024-08-16 214054\3313b337-6925-44c0-
b904-8151e52dbb0c.vhdx"
Mount-VHD -Path "F:\WindowsImageBackup\ANPC\Backup 2024-08-16 214054\3313b337-6925-
44c0-b904-8151e52dbb0c.vhdx" -PassThru | Get-Disk | Set-Partition -NewDriveLetter G

cd C:\Tools
.\handle.exe "F:\WindowsImageBackup\ANPC\Backup 2024-08-16 214054\3313b337-6925-
44c0-b904-8151e52dbb0c.vhdx"

***********************************
DISM.exe /Online /Cleanup-image /StartComponentCleanup

tasklist /SVC /FI "IMAGENAME eq svchost.exe"

dism /online /get-features

dism /online /add-capability /capabilityname:Microsoft.WindowsDefender-


Features~~~~0.0.1.0
Get-MpComputerStatus

# Install Windows Defender Features


Enable-WindowsOptionalFeature -Online -FeatureName Windows-Defender-Features

Enable-WindowsOptionalFeature -Online -FeatureName Windows-Defender-Default-


Definitions
Get-WindowsOptionalFeature -Online | Where-Object {$_.FeatureName -like
"*Defender*"}

DISM /Online /Enable-Feature /FeatureName:Windows-Defender-Default-Definitions

sfc /scannow

dism.exe /Online /Cleanup-Image /StartComponentCleanup /NoRestart


Get-MpComputerStatus

******************************************************
# Grant full control to the current user
Icacls "C:\Windows\WinSxS\Temp" /grant Admin:(OI)(CI)F /T
***********************************************

DISM /Online /Enable-Feature /FeatureName:Windows-Defender-Default-Definitions

shutdown /r /o /f /t 0

C:\ProgramData\Microsoft\Windows\Start Menu\Programs
C:\Users\ANPC\Apps

pnputil /add-driver "D:\1-Programes\Utility\2-Dell Driviers\15-07-2024\handy\


driver.inf" /install

powercfg /energy

fixboot c:

***Re-register the Windows Store App

Get-AppxPackage -allusers Microsoft.WindowsStore | Foreach {Add-AppxPackage -


DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}

***Reinstall Microsoft Edge Protocols

Get-AppxPackage -AllUsers| Foreach {Add-AppxPackage -DisableDevelopmentMode -


Register "$($_.InstallLocation)\AppXManifest.xml"}

Get-AppxPackage *Windows.ImmersiveControlPanel* | Reset-AppxPackage


Get-AppxPackage Microsoft.Windows.StartMenuExperienceHost | Reset-AppxPackage
Get-AppxPackage -Name "AppName" | Reset-AppxPackage

Get-WindowsDriver -Online

takeown /f C:\Windows /r /d y

Then, try renaming the folder again:

net start wuauserv


net start cryptSvc
net start bits
net start msiserver
Get-AppxPackage -AllUsers Microsoft.Windows.FileExplorer | Foreach {Add-AppxPackage
-DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}

DISM /Online /RestoreHealth /Source:WIM:G:\Sources\Install.wim:6 /LimitAccess

DISM /Online /Cleanup-Image /CheckHealth & DISM /Online /Cleanup-Image /ScanHealth


& DISM /Online /Cleanup-Image /RestoreHealth & sfc /verifyonly& DISM.exe /Online
/Cleanup-image /StartComponentCleanup & ipconfig /flushdns & ipconfig /registerdns
& ipconfig /release & ipconfig /renew & netsh int ip reset & netsh winsock reset

& shutdown /r /t 0

DISM /Online /Cleanup-Image /StartComponentCleanup /NoRestart

Dism /Image:C:\ /Cleanup-Image /RestoreHealth

ipconfig /flushdns & ipconfig /registerdns & ipconfig /release & ipconfig /renew &
netsh int ip reset & netsh winsock reset & exit

sfc/scannow

Dism /Mount-Wim /WimFile:C:\Temp\install.wim /Index:6 /MountDir:C:\Temp\Mount

Dism /Get-WimInfo /WimFile:G:\sources\install.wim (pws)

@echo off
echo Checking if image is mounted to C:\Mount\sources\Install.wim...
if exist "C:\Mount\sources\Install.wim" (
echo Image is mounted at C:\Mount\sources\Install.wim
) else (
echo Image is not mounted at C:\Mount\sources\Install.wim
exit /b
)

# Mount the ISO


$isoPath = "F:\2-Prog\New\Assets\Windows\Win 11\Win11_23H2_English_x64v2_2.iso"
$mountPath = "C:\Mounted ISO"

# Mount the disk image


Mount-DiskImage -ImagePath $isoPath

# Get the drive letter assigned to the mounted ISO


$isoDriveLetter = (Get-Volume -FileSystemLabel "CD_ROM" | Select-Object -First
1).DriveLetter

# Check if the path exists and create it if necessary


if (!(Test-Path $mountPath)) {
New-Item -ItemType Directory -Path $mountPath
}

# Create a symbolic link to the mounted ISO


New-Item -ItemType SymbolicLink -Path $mountPath -Target "$($isoDriveLetter):\"

Dism /Online /Cleanup-Image /RestoreHealth /Source:wim:"C:\Mounted ISO\Sources\


Install.wim":6 /limitaccess
Dismount-DiskImage -ImagePath $isoPath

# Attempt to mount the ISO using a different method


$isoPath = "F:\2-Prog\New\Assets\Windows\Win 11\Win11_23H2_English_x64v2_2.iso"
$mountPath = "D:\Mounted ISO"

# Mount with Mount-DiskImage and manually assign a drive letter


try {
$mountResult = Mount-DiskImage -ImagePath $isoPath -PassThru
$driveLetter = ($mountResult | Get-Volume).DriveLetter

# Create mount directory if it doesn't exist


if (!(Test-Path $mountPath)) {
New-Item -ItemType Directory -Path $mountPath
}

# Create symbolic link if drive letter was assigned


if ($driveLetter) {
New-Item -ItemType SymbolicLink -Path $mountPath -Target "$
($driveLetter):\"
Write-Output "Mounted successfully at $mountPath."
} else {
Write-Output "Drive letter assignment failed. Try restarting the system."
}
} catch {
Write-Output "Failed to mount the ISO. Error: $($_.Exception.Message)"
}

Index :#### REPLACE IT WITH 6


Name : Windows 11 Pro
Description : Windows 11 Pro
Size : 18,936,583,647 bytes

Dism /Online /Cleanup-Image /RestoreHealth /Source:wim:"G:\Sources\


Install.wim":6 /limitaccess
Dism /Online /Cleanup-Image /RestoreHealth /Source:esd:"G:\Sources\
Install.esd":# /limitaccess
Dism /Online /Cleanup-Image /RestoreHealth /Source:wim:"C:\Mount\sources\
Install.wim":6 /limitaccess

to just verify run


sfc /verifyonly

to fix run

Dism /Get-ImageInfo /C:\\GLOBALROOT\device\harddisk0\partition4\Recovery\WindowsRE\


winre.wim /index:1

irm https://massgrave.dev/ias | iex

sfc /SCANNOW

Nurse@2025
Akomuna@2024

xVqW3U-Lf@nD6jM

Here is the content exported to a text file:

Stop Services:
net stop wuauserv
net stop cryptSvc
net stop bits
net stop msiserver

Rename Folders:

ren C:\Windows\SoftwareDistribution SoftwareDistribution


ren C:\Windows\System32\catroot2 catroot2.old

Start Services:
net start wuauserv
net start cryptSvc
net start bits
net start msiserver

Run DISM and SFC Commands:

DISM.exe /Online /Cleanup-Image /RestoreHealth


sfc /scannow

To list all installed drivers, use the command:

pnputil /enum-drivers

Export-WindowsDriver -Online -Destination D:\DriverBackup


To remove a driver, use the command:
pnputil /delete-driver
Replace <driver.inf> with the name of the .inf file of the driver you want to
remove. You can find the .inf file name from the output of the /enum-drivers
command.
Automate Removal (Optional):

If you want to automate the removal of all drivers, you can use PowerShell
scripting. Here’s a basic example:
$drivers = pnputil /enum-drivers | Select-String "Published name" | ForEach-Object
{ $_.ToString().Split(":")[1].Trim() }
foreach ($driver in $drivers) {
pnputil /delete-driver $driver /force
}

pnputil /enum-drivers | Out-String -Stream | Select-String -Pattern "Intel",


"Display"

$drivers = pnputil /enum-drivers | Where-Object { $_ -match "Intel" -and $_ -match


"Display" } | ForEach-Object { $_.Split(":")[1].Trim() }
foreach ($driver in $drivers) {
pnputil /delete-driver $driver /force
}

reg export "HKLM\Software\MyKey" "C:\Backup\MyKeyBackup.reg"


New-Item -Path "C:\Backup" -ItemType Directory -Force
reg export "HKLM\Software\MyKey" "C:\Backup\MyKeyBackup.reg"
icacls "C:\Windows\System32\config\*" /T /C /Q /RESET

Export-WindowsDriver -Online -Destination C:\DriverBackup


pnputil /add-driver C:\DriverBackup\*.inf /subdirs /install

Chipset_Driver_4HP0D_WN32_11.0.0.1163_A01.EXE (101.77 MB)


Intel-Rapid-Storage-Technology-Driver_CWF39_WIN_14.8.1.1043_A14_01.EXE (35.49 MB)
Intel-PCIe-Ethernet-Network-Driver_VP20T_WIN_24.1.0.0_A13_04.EXE (30.69 MB)

***********************************************************************************
*******************************
Get-History | ForEach-Object { $_.CommandLine } > D:\FINALPWSScommands.txt
doskey /history > D:\FINALcommands.txt
***********************************************************************************
*********************************
winget install --id Opera.OperaGX
winget upgrade --id Opera.OperaGX
winget list --name Opera

winget install --id Microsoft.Powershell --source winget


winget install --id Google.Chrome
winget install Daum.PotPlayer
winget install CrystalRich.LockHunter
winget install CCleaner.CCleaner
winget install InternetDownloadManager.InternetDownloadManager
winget install Voidtools.Everything
winget install --id 9WZDNCRDFNG7 --source msstore
winget install Proton.ProtonVPN
winget install --id Malwarebytes.Malwarebytes
winget install --id Malwarebytes.Privacy
winget install --id Malwarebytes.AdwCleaner
winget install --id BiniSoft.WindowsFirewallControl
winget download --id RevoUninstaller.RevoUninstallerPro --accept-package-agreements
--accept-source-agreements --download-directory .

winget upgrade --all

Get-AppxPackage *WindowsSubsystemForAndroid*
winget install --id=Microsoft.WindowsSubsystemForAndroid --source=msstore
winget install 9p3395vx91nr

Set-ExecutionPolicy Bypass -Scope Process -Force;


[System.Net.ServicePointManager]::SecurityProtocol =
[System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object
System.Net.WebClient).DownloadString('https://community.chocolatey.org/
install.ps1'))
choco --version

dism.exe /Online /Enable-Feature /All /FeatureName:Microsoft-Hyper-V


/FeatureName:Microsoft-Hyper-V-Management-Clients /FeatureName:Microsoft-Hyper-V-
Management-PowerShell
wsl --install
wsl --install -d Ubuntu
The system file ntoskrnl.exe (Windows NT operating system kernel) has a valid
digital signature, confirming that it has not been tampered with.

# Check if Microsoft Store is installed


Get-AppxPackage *Microsoft.WindowsStore*

# If it's not found, you can reinstall it using this command


Add-AppxPackage -register "C:\Program Files\WindowsApps\Microsoft.WindowsStore_*\
AppxManifest.xml" -DisableDevelopmentMode

*
# Check if Microsoft Store is installed
Get-AppxPackage *Microsoft.WindowsStore*

# If it's not found, you can reinstall it using this command


Add-AppxPackage -register "C:\Program Files\WindowsApps\Microsoft.WindowsStore_*\
AppxManifest.xml" -DisableDevelopmentMode

winget install --id=Microsoft.WindowsStore --source=msstore

winget install 9WZDNCRFHVN5

You might also like