Friday, January 29, 2021

PowerShell Script to repair WMI

 Below PowerShell Script help to Fix the WMI issue.

    Stop-Service Winmgmt -Force -ErrorAction SilentlyContinue

Start-Sleep -Seconds 20


    $status = $null

    Do 

    {

        $status = (Get-Service -Name Winmgmt).Status

    }

    While ($status -notlike "*Stopped*")


Rename-Item -Path C:\Windows\System32\wbem\repository -NewName 'Repository.old1' -Force -ErrorAction SilentlyContinue


Start-Sleep -Seconds 20


Start-Service -Name Winmgmt



Featured post

System-preferred multifactor authentication (MFA)

Popular Posts