Might try creating the install media here and boot from it.
https://www.microsoft.com/en-us/software-download/windows10
--please don't forget to Accept as answer if the reply is helpful--
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
My computer refuses to install Version 20H2 feature update from Version 1909. It comes up with an error after apparently installing which is to do with "BOOT_SAFE" phase(?). Any help would be appreciated. By the way, I've gone through all the drivers in Device Manager & checked they're all up-to-date. I've tried to install this feature update many times already without success & it's starting to drive me nuts as I can't afford to replace my PC if I can't get this update in.
Might try creating the install media here and boot from it.
https://www.microsoft.com/en-us/software-download/windows10
--please don't forget to Accept as answer if the reply is helpful--
Hello,
I suggest you to temporarily disconnect all external devices connected to system and then try upgrade. Also, make sure you remove third-party AV or any security system to complete the upgrade.
If this doesn't works, I recommend you to upgrade to latest version i.e. Version 21H1 via ISO file. Note that 20H2 is no longer latest version and 21H1 is just released now.
Refer this step-by-step guide:
https://www.kapilarya.com/how-to-upgrade-to-windows-10-using-iso-file
Let us know if this helps!
Note: Included link in this reply refers to blog post by a trusted Microsoft MVP.
Hello there,
I think your computer may have issue in setup “Safe-OS” phase.
Since failure happened when using Feature update to upgrade, I suggest using other two ways to install Version 20H2.
https://www.microsoft.com/en-us/software-download/windows10
Plan A - Update Assistant
Plan B - Manual
Download Create Windows 10 installation media tool from the website and follow the instruction.
Note: If these two ways still can’t help, prepare a blank USB flash drive with at least 8GB of space, create a bootable installation media and start setup from the ISO file.
Best Regards,
Samson Peng
Open administrative Power Shell (PS) and copy and paste this script > click OK > post a share link using one drive, drop box, or google drive:
function wh
{
Param ( [parameter (Mandatory = $true)][string]$txt )
Write-Host $txt -ForegroundColor Green -BackgroundColor Black -NoNewline
##Example usage wh "Alias for `n Write-Host"
} ## End function wh
function StartScript
{
##Locating Temp Dir and writing Transcript
$global:tempDir = [System.IO.Path]::GetTempPath()
MD $tempDir\LOGS -EA SilentlyContinue
CD $tempDir\LOGS
$txtCount = Get-Item $tempDir/LOGS/*.TXT -EA SilentlyContinue
if((Get-Host).Version.Major -cge 5) ##WIN7 Not Supported
{
if($txtCount.Count -cge 1)
{Start-Transcript -Append -Path $tempDir/LOGS/Event-Search.TXT}
Else{Start-Transcript -Path $tempDir\LOGS\Event-Search.TXT}
}
$global:explore = $tempDir + "LOGS\"
$global:Ver = "1.6.3"
wh "`nLog Collection... (V$Ver)`n"
#clearing previous actions
Stop-Job *
#Initialize CheckBox Vars to $True/$False
$Global:EventsCollect = $true; $Global:SetupDiagCollect = $true
$Global:UpdatesCollect = $true; $Global:WLANCollect = $true
$Global:PowerCollect = $true; $Global:GPCollect = $true
$Global:miscCollect = $true; $Global:bingCollect = $true
$Global:eventOut = $false
#Clear Jobs
Stop-Job *
Remove-Job *
} ## End function Start-Script
function SetupDiagFunc
{
wh "`n Grabbing SetupDiag.exe ..."
Invoke-WebRequest https://go.microsoft.com/fwlink/?linkid=870142 -OutFile $tempDir\SetupDiag.exe -TimeoutSec 3 -UseBasicParsing
#check for successful download
if((Get-Item $tempDir\SetupDiag.exe).length -gt 100000)
{
wh "`nSuccessful DL!"
wh "`n Invoking SetupDiag.exe ..."
$SetupDiag = {CMD.EXE /C "%temp%\setupdiag.exe /Verbose /Output:%temp%\SetupDiag-Log.txt"}
## Kick-Off SetupDiagJob
Start-Job -Name SetupDiagJob -ScriptBlock $SetupDiag
}Else{Write-Host "`nDownload of SetupDiag.exe Failed!" -BackgroundColor RED }
} ## End Function SetupDiagFunc
function EventSearch
{
wh "`n Starting EventSearch Job-Function ...`n"
## Gathering Events from System using Get-WinEvent via Job
$EventSearchJob =
{
$evtPaths = Get-Item C:\Windows\System32\Winevt\Logs\*.evtx -Exclude "*PowerShell*",
"*known folders*" | Select-Object FullName
$i = $evtPaths.Count
$x = 0 ##For 1st Loop do Until x = i
$events = @()
$gatherEvents = @()
$eventsArray = @()
$searchResult = @()
$MaxEvents = 99
#Loading/Gathering Events Loop...
do {
##Getting Events w/ Get-WinEvent
$gatherEvents = Get-WinEvent -Path $evtPaths[$x].FullName -MaxEvents $MaxEvents -EA SilentlyContinue
$events = $events + $gatherEvents
$x++
}
Until ($x -eq $i)
$x = $x +1 ##Total Events Found!
$eventsLength = $events.Length ##Total events catalogged!
$xx = 0
# Write Event Properties to a row and roll it out - Collapsing Array ...
do {
$date = $events[$xx].TimeCreated | Get-Date -Format "yyyyMMdd".ToString() -EA SilentlyContinue ##EA SC for Blank Entries
$eventRow = new-object PSObject -Property @{
Date = $date;
Id = $events[$xx].Id;
Level = $events[$xx].LevelDisplayName;
Provider = $events[$xx].ProviderName;
Message = $events[$xx].Message;
}
$cRow = $date + " " + "ID:" + $events[$xx].Id + " " + "Level:" + $events[$xx].LevelDisplayName + " " + "Provider:" + $events[$xx].ProviderName + " " + "Message:" + $events[$xx].Message
$eventsArray += $cRow
$xx++
$d++
}
Until ($xx -eq $events.Length)
##Looking for patterns error or fail in $eventsArray
$search = $eventsArray | Select-String -pattern ("error|fail")
Return $search ## | Write-Output ##Output for job
} ## End $EventSearchJob
Start-Job -Name EventSearchJob -ScriptBlock $EventSearchJob
} ## End function Event-Search
function writeSearch ##
{
##Event Logs Cont.
MD $tempDir\LOGS\EVTX\ -EA SilentlyContinue
##output to file
$search | Group-Object | Sort-Object Count -Descending | Format-Table Count, Name -Wrap > TOP-ERRORS.TXT
$search > $tempDir\LOGS\SEARCH.TXT
if($Global:eventOut -eq $True)
{
$search | Group-Object | Sort-Object Count -Descending |
Select-Object -Property Count, Name | Out-GridView -Title "Top `"Errors`" via EVTX - V-$Ver"
}
wh "`n Collecting Matching EVTX Entries ...`n"
#Collecting all prev matching EVTX
#$evtx = Get-ChildItem C:\Windows\System32\Winevt\Logs\*.evtx
$evv = 0
$providerName =
(($search | Select-String "Provider:.*Message:").Matches.Value -Replace
" Message:", "" -Replace "Provider:", "" | Group-Object ).Name
#Converting Provider Name to Log Name
$providerName = (($providerName | ForEach-Object {Get-WinEvent -ProviderName $_ -MaxEvents 1 -EA SilentlyContinue}).LogName | Group-Object).Name
$providerName = $providerName -replace "Microsoft.", ""
$providerName = $providerName -replace "Windows.", ""
$providerName = $providerName -replace "`/.*$", ""
$evtx = $providerName | foreach{Get-ChildItem "C:\Windows\System32\winevt\logs\*$_*"}
Do{
COPY $evtx[$evv].PSPath $tempDir\LOGS\EVTX\
$evv++
}
Until($evv -eq $evtx.Count)
} #End function writeSearch
function GetUpdates
{
wh "`n Starting Get-WindowsUpdateLog Job-Function ...`n"
$updateJob = {get-WindowsUpdateLog}
if((Get-Host).Version.Major -cge 5) ##Modern Gatherer
{
Start-Job -Name GetUpdates -ScriptBlock $updateJob
}
##Legacy Gatherer
CP C:\Windows\WindowsUpdate.log $tempDir\LOGS\WindowsUpdate.log
##Installed-Updates/Packages
Get-WmiObject win32_quickfixengineering > $tempDir\LOGS\Installed_Updates.TXT
Get-WmiObject Win32_OperatingSystemQFE >> $tempDir\LOGS\Installed_Updates.TXT
DISM /Online /Get-Packages /Format:Table >> $tempDir\LOGS\Installed_Updates.TXT
} ## End function Get-Updates
function PrinterCheck
{
wh "`n Getting Printer Information ..."
get-printer | ft Name, ComputerName, Type, DriverName, PortName, Datatype, Location, DriverName > $tempDir\LOGS\Printers.TXT
get-printerDriver | fl >> $tempDir\LOGS\Printers.TXT
Get-ChildItem -Recurse Registry::"HKLM\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows NT x86\Drivers" | Out-File $tempDir\LOGS\Printers.TXT -Append
Get-ChildItem -Recurse Registry::"HKLM\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows x64\Drivers" | Out-File $tempDir\LOGS\Printers.TXT -Append
Get-ChildItem -Recurse Registry::"HKLM\SYSTEM\CurrentControlSet\Control\Print\Monitors" | Out-File $tempDir\LOGS\Printers.TXT -Append
write-output "## CBS ntprint CHECK ##" >> $tempDir\LOGS\Printers.TXT
$cbsCheck = (Get-ChildItem C:\Windows\Logs\CBS\*cbs* -Recurse | select-string -Pattern "E_INVALIDARG in eventsXml.*Microsoft-Windows-PrintService")
if($cbsCheck.Count -eq 0){Write-Output "## NO MATCHES IN CBS ##" >> $tempDir\LOGS\Printers.TXT} Else{$cbsCheck | Group-Object >> $tempDir\LOGS\Printers.TXT}
write-output "## ntprint.dll CHECK ##" >> $tempDir\LOGS\Printers.TXT
(Get-ChildItem C:\Windows\System32\ntprint.dll).VersionInfo | ft -AutoSize >> $tempDir\LOGS\Printers.TXT
(Get-ChildItem C:\Windows\SysWOW64\ntprint.dll).VersionInfo | ft -AutoSize >> $tempDir\LOGS\Printers.TXT
} ## End function PrinterCheck
function UpdateHelper
{
if((Get-Host).Version.Major -cge 5)
{
$winupdatelog = get-item $tempDir\LOGS\windows-update.log ##WIN-10 File
MD $tempDir\LOGS\Windows\Logs\WindowsUpdate\ -EA SilentlyContinue | Out-Null
CP C:\Windows\Logs\WindowsUpdate\*.etl $tempDir\LOGS\Windows\Logs\WindowsUpdate\ -EA SilentlyContinue
}
Else{$winupdatelog = get-item $tempDir\LOGS\windowsupdate.log} ##LEGACY File
$updateError = ($winupdatelog | select-string -pattern "error.*0x........");
$updateErrorSplit = $updateError -Split " "
$updateErrorCount = (($updateErrorSplit | select-string -pattern "0x........") -Replace "[(),'`.:]", "" -Replace "hr=", "");
$updateErrorCount | Group-Object | Sort-Object Count -Descending | Format-Table Count, Name | Out-File $tempDir\LOGS\UPDATE-ERRORS.TXT -Width 999
$updateError >> UPDATE-ERRORS.TXT
if($updateError.length -eq 0){"No `"error.*0x........`" patterns Found in Windows-Update.log" | Out-File $tempDir\LOGS\UPDATE-ERRORS.TXT}
($winupdatelog | Select-String "KB\d\d\d\d\d\d\d" | Select-string "fail") | Out-file $tempDir\LOGS\UPDATE-ERRORS.TXT -Append -width 999
} ## End function UpdateHelper
function getProcesses
{
wh "`nGetting Active Process ...`n"
Get-Process > $tempDir\LOGS\Running-Processes.TXT
CMD.EXE /C "tasklist /svc" | Out-File -Append $tempDir\LOGS\Running-Processes.TXT
} ## End function getProcesses
function GetApps
{
wh "`n Getting List of Installed Apps...`n"
Get-WmiObject -Class Win32_Product | Format-Table -Property Name, Version, Vendor > $tempDir\LOGS\Installed-Apps.TXT
Get-AppxPackage | ft Name, Version, InstallLocation, IspArtiallyStaged, SignatureKind, Status >> $tempDir\LOGS\Installed-Apps.TXT
} ## End function GetApps
function SetupLogs
{
wh "`nGetting Windows Setup Logs Independent of SetupDiage.exe...`n"
MD $tempDir\LOGS\SETUP\ -EA SilentlyContinue
dir C:\ > $tempDir\LOGS\Dir_Structure.txt
## Main Setup Collection
if($env:SystemDrive -eq 'C:') ##Verify SystemDrive
{
$SetupPaths = @()
$locations = @(
'C:\GetCurrent',
'C:\$Reset',
'C:\$SysReset',
'C:\$Windows.~BT',
'C:\$Windows.~WS',
'C:\Windows\Logs\',
'C:\Windows\Panther\',
'C:\Windows\inf\',
'C:\Windows\System32\LogFiles\',
'C:\Windows\System32\SysPrep\',
'C:\Windows10Upgrade',
'C:\Windows.old\Windows\Panther')
for($i = 0; $locations.count -gt $i; $i++)
{
if((get-item $locations[$i] -Force -EA SilentlyContinue).length -gt 0) ##Null Path Check -Force for Hidden
{
CD $locations[$i]
##Search includes setuperr/setupact only
$SetupPaths += Get-ChildItem * -Force -Recurse -Include setuperr.log, setupact.log, miglog.xml, *APPRAISER_Humanreadable.xml -EA SilentlyContinue
}
}
$cleanPaths = @()
for($i = 0; $SetupPaths.count -gt $i; $i++)
{
$cleanPaths += $SetupPaths[$i].PSParentPath.ToString() -replace "Microsoft\.PowerShell\.Core\\FileSystem\:\:C\:\\", ""
}
CD $tempDir\LOGS\SETUP\
MD $cleanPaths -Force
CD $tempDir\LOGS\
for($i = 0; $SetupPaths.count -gt $i; $i++)
{
$destPath = "$tempDir\LOGS\SETUP\" + $cleanPaths[$i]
$copyPathLog = ($SetupPaths[$i].ToString())
Copy $copyPathLog -Destination $destPath
}
}Else{Write-Host "`nSystem Drive is not C:... Setup Collection Aborted!`n"}
## End Main Setup Collection
## Setup Reg Output
Get-ChildItem HKLM:\SYSTEM\SETUP\ | Out-File $tempDir\LOGS\SETUP\HKLM_SYSTEM_SETUP-OOBE.TXT
Get-ChildItem HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\OOBE\Me* -recurse -EA SilentlyContinue | Out-File $tempDir\LOGS\SETUP\HKLM_SYSTEM_SETUP-OOBE.TXT -Append
Get-Childitem HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate | Out-File $tempDir\LOGS\SETUP\HKLM_SYSTEM_SETUP-OOBE.TXT -Append
## SetupAct String Search
$setupRegx = @("MOUPG SetupHost..Initialize:",
"============================",
(Get-ChildItem $tempDir\LOGS\*setupact.log -Recurse | Select-String "MOUPG SetupHost..Initialize. CmdLine"),
"",
"MOUPG Setup build & Host OS Build:",
"==================================",
"",
(Get-ChildItem $tempDir\LOGS\*setupact.log -Recurse | Select-String "MOUPG SetupHost..Setup build"),
"...",
(Get-ChildItem $tempDir\LOGS\*setupact.log -Recurse | Select-String "MOUPG Host OS"),
"",
"Watson Parameters (4&5):",
"=======================",
"",
(Get-ChildItem $tempDir\LOGS\*setupact.log -Recurse | Select-String "Watson Bucketing Parameters\[[4-5]\]" ),
"",
"\[0x........\]Error:",
"==================",
"",
(Get-ChildItem $tempDir\LOGS\*setupact.log -Recurse | Select-String "\[0x........\]\[0x.....\]"),
"",
"`"FATAL`":",
"======",
"",
(Get-ChildItem $tempDir\LOGS\*setupact.log -Recurse | Select-String "FATAL" | Select-String -NotMatch "FatalExecutionEngineError" | Select-String -NotMatch "non-fatal"),
"",
"`"Error `":",
"===========",
"",
(Get-ChildItem $tempDir\LOGS\*setupact.log -Recurse | Select-String "Error "),
"",
"MIGRATE.*DATA:",
"==============",
"",
(Get-ChildItem $tempDir\LOGS\*setupact.log -Recurse | Select-String "MIGRATE.*DATA"),
""
)
$q=0
Do {$setupRegx[$q] | Out-File $tempDir\LOGS\SETUP\SetupAct-Regex.TXT -Append -Width 999 ##spool out results
$q++
}Until($q -eq $setupRegx.Count)
} ## End function SetupLogs
function powerCFGInfo
{
MD $tempDir\LOGS\POWER\ -EA SilentlyContinue | Out-Null
wh "`n Grabbing PowerCFG, Sleep & Battery Info ...`n"
("`n" + "Available Sleep States (/A): `r" + "`n" +"============================`r" + "`r").ToString() | Out-File -Encoding ascii $tempDir\LOGS\POWER\POWERCFG_INFO.txt
powercfg /a | Out-File -Append -encoding ascii $tempDir\LOGS\POWER\POWERCFG_INFO.txt
("`n" + "-DeviceQuery Wake_Armed: `r" + "`n" +"========================`r" + "`r").ToString() | Out-File -Append -Encoding ascii $tempDir\LOGS\POWER\POWERCFG_INFO.txt
powercfg -devicequery wake_armed | Out-file -Append -encoding ascii $tempDir\LOGS\POWER\POWERCFG_INFO.txt
("`n" + "Last Wake (-lastwake): `r" + "`n" +"=====================`r" + "`r").ToString() | Out-File -Append -Encoding ascii $tempDir\LOGS\POWER\POWERCFG_INFO.txt
powercfg -lastwake | Out-file -Append -encoding ascii $tempDir\LOGS\POWER\POWERCFG_INFO.txt
("`n`r").ToString() | Out-File -Append -Encoding ascii $tempDir\LOGS\POWER\POWERCFG_INFO.txt
("`n" + "-Requests: `r" + "`n" +"==========`r" + "`r").ToString() | Out-File -Append -Encoding ascii $tempDir\LOGS\POWER\POWERCFG_INFO.txt
powercfg -requests | Out-file -Append -encoding ascii $tempDir\LOGS\POWER\POWERCFG_INFO.txt
$powerList = powercfg -list
$powerList | Out-File -Append -encoding ascii $tempDir\LOGS\POWER\POWERCFG_INFO.txt
$powerActive = $powerList | select-string "\*" | powercfg /QH "$_"
("`n`r").ToString() | Out-File -Append -Encoding ascii $tempDir\LOGS\POWER\POWERCFG_INFO.txt
("`n" + "Active Power Scheme Details: `r" + "`n" +"============================`r" + "`r").ToString() | Out-File -Append -Encoding ascii $tempDir\LOGS\POWER\POWERCFG_INFO.txt
$powerActive | Out-File -Append -encoding ascii $tempDir\LOGS\POWER\POWERCFG_INFO.txt
if((Get-Host).Version.Major -cge 5) ##WIN7 Does not Support powercfg /battery /sleepstudy
{
$ifbattery = Get-WmiObject win32_battery
if ( $ifbattery.__SERVER.count -cge 1 ) { CMD.EXE /C "powercfg /batteryreport /output %temp%\LOGS\POWER\battery-report.html" }
CMD.EXE /C "powercfg /sleepstudy /output %temp%\LOGS\POWER\sleepstudy-report.html"
}
CMD.EXE /C "powercfg /ENERGY /duration 10 /output %temp%\LOGS\POWER\energy-report.html"
} ## End function powerCFGInfo
function sysProductCheck
{
wh "`n Getting SystemProductName ...`n"
##SystemInformation Reg
reg query HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SystemInformation\ /v SystemProductName > $tempDir\LOGS\REG_SystemProductName.TXT
Get-WmiObject Win32_ComputerSystem > $tempDir\LOGS\WMI_Object_System.TXT
Get-WmiObject Win32_ComputerSystemProduct >> $tempDir\LOGS\WMI_Object_System.TXT
} ## End functions sysProductCheck
function showWLAN
{
wh "Generating NETSH WLAN Report...`n"
$showWLANjob = {
CMD.EXE /c "netsh wlan show networks mode=ssid > %temp%\LOGS\Network\wlan.txt"
CMD.EXE /c "netsh wlan show networks mode=bssid >> %temp%\LOGS\Network\wlan.txt"
CMD.EXE /c "netsh winhttp show proxy > %temp%\LOGS\Network\proxy.txt"
CMD.EXE /c "netsh wlan show wlanreport & COPY C:\ProgramData\Microsoft\Windows\wlanReport\wlan-report-latest.html %temp%\LOGS\Network\wlan-report-latest.html"
##WIN7 Does not Support netsh wlanreport
}
Start-Job -Name showWLAN -ScriptBlock $showWLANjob
} ## End function sysProductCheck
function getGPRESULT
{
wh "`nGetting GPRESULT...`n"
CMD.EXE /C "GPRESULT /V > %temp%\LOGS\GPRESULT.TXT"
} ## End function getGPRESULT
function reservedCheck
{
$reservedJob =
{
$vol = (mountvol /L | select-string -Pattern "\\\\")
$volstring = "mountvol y:" + $vol[0]
CMD.EXE /C $volstring
SLEEP 2
CMD.EXE /C "CHKDSK y: > %temp%\LOGS\SystemReserved.TXT"
SLEEP 2 # Pause after drive dismount
CMD.EXE /C "mountvol y: /D"
}
Start-Job -Name reservedJob -ScriptBlock $reservedJob
} ## End function reservedCheck
function fltmcCheck
{
wh "`n Getting fltmc Filters ...`n"
CMD.EXE /c "fltmc filters > %temp%\LOGS\fltmc_filters.TXT"
} ## End function fltmcCheck
function getDXDiag
{
wh "`n Grabbing DXDiag Info...`n"
C:\Windows\System32\dxdiag /x $explore\DxDiag
} ## End function getDXDiag
function getMSINFO
{
wh "`n Gathering MSINFO32 ...`n"
## check if msinfo is already gathering - if so stop
If((get-process | select-string -Pattern "msinfo").Pattern -eq "msinfo")
{Stop-Process -ProcessName msinfo32}
C:\Windows\System32\msinfo32.exe /nfo $tempDir/LOGS/MSINFO32.NFO
} ## End function getMSINFO
function getAV
{
if((Get-Host).Version.Major -cge 5) ##Modern OS Only
{
wh "`n Grab root\SecurityCenter2 AntivirusProduct ...`n"
$avPath = (Get-WmiObject -Namespace root\SecurityCenter2 -Class AntivirusProduct) | % {$_.pathtoSignedProductEXE}
"AV Info" + "`n========" | Out-File $tempDir/LOGS/SecurityProductInformation.TXT
$avPath | Out-File $tempDir/LOGS/SecurityProductInformation.TXT -Append
if($avPath[0] -match "exe")
{
$path = (Get-Item $avPath[0]).PSParentPath
Get-Item $path/*.ini | Out-File $tempDir/LOGS/SecurityProductInformation.TXT -Append
Get-Content $path/*.ini | Out-File $tempDir/LOGS/SecurityProductInformation.TXT -Append
}
Get-ChildItem "HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender\" -recurse -EA SilentlyContinue | Out-File $tempDir/LOGS/SecurityProductInformation.TXT -Append
}
} ## End function getAV
function getDrivers
{
wh "`n Grabbing Driver listing via DISM.EXE ...`n"
$drivers = cmd.exe /C "dism /online /get-drivers /format:table"
$drivers += cmd.exe /C "dism /online /get-drivers /all /format:table"
$drivers | Out-File $tempDir/LOGS/DISM-Get-Drivers.TXT
wh "`n Done!`n"
} ## End Function getDrivers
function getMISCLogs
{
wh "`nCopying misc. logs ...`n"
MD $tempDir\LOGS\WER\ -EA SilentlyContinue
MD $tempDir\LOGS\Windows\Logs\WindowsUpdate\ -EA SilentlyContinue
CP "C:\Users\All Users\Microsoft\Windows\WER\ReportArchive\*" $tempDir\LOGS\WER\ -Recurse -EA SilentlyContinue
CP "C:\Windows\Logs\CBS\*cbs*" $tempDir\LOGS\Windows\Logs\
CP "C:\Windows\Logs\DISM\*dism*" $TempDir\LOGS\Windows\Logs\
CP "C:\Windows\Logs\WindowsUpdate\*" $TempDir\LOGS\Windows\Logs\WindowsUpdate\
#DMP Collect
$dmp = @()
$dmp += Get-ChildItem C:\Windows\*.dmp
$dmp += (Get-ChildItem C:\Windows\LiveKernelReports\*.dmp -Recurse -EA SilentlyContinue)
$dmp += (Get-ChildItem C:\Windows\Minidump\*.dmp -Recurse -EA SilentlyContinue)
#Validate empty array
if($dmp.length -ne 0)
{
$dd=0
Do{
If($dmp[$dd].length -lt 2000000)
{ $destPath = $dmp[$dd].PSParentPath.Replace('C:\', '').Replace('Microsoft.PowerShell.Core\FileSystem::', '')
MD $destPath -EA SilentlyContinue
COPY -Path $dmp[$dd].PSPath -Destination $destPath }
$dd++
}
Until($dd -eq $dmp.Count)
}
#disk info
"`nGet-Disk:`n=========" > $tempDir\LOGS\Disk-Info.TXT
Get-Disk |fl >> $tempDir\LOGS\Disk-Info.TXT
"`nGet-Partition:`n==============" >> $tempDir\LOGS\Disk-Info.TXT
Get-Partition >> $tempDir\LOGS\Disk-Info.TXT
Manage-bde -protectors -get C: >> $tempDir\LOGS\Disk-Info.TXT
"`nIO Fail Search:`n===============`n" >> $tempDir\LOGS\Disk-Info.TXT
$search | Select-String ".*io.fail.*" | Select-String -NotMatch '0, 0, 0, 0' >> $tempDir\LOGS\Disk-Info.TXT
} ## End function getMISCLogs
function bingCollect
{
##O365 Firewall Check & Bing.com diagnostics.asp
##URIs based on Article:
##https://support.office.com/en-us/article/Network-requests-in-Office-365-ProPlus-and-Mobile-eb73fcd1-ca88-4d02-a74b-2dd3a9f3364d
MD $TempDir\LOGS\Network\ -EA SilentlyContinue
wh "Performing Bing & O365 URI Check ... `n"
$bingCheck = (Invoke-WebRequest -Uri https://www.bing.com/fdv2/diagnostics.aspx -UseBasicParsing)
$bingCheck | Out-File $tempDir\LOGS\Network\O365-URL-Query.TXT
$URIs = @('api.login.microsoftonline.com', #0 Standard Reply = 403
'api.passwordreset.microsoftonline.com', #1 Standard Reply = 200
'becws.microsoftonline.com', #2 Standard Reply = 403
'clientconfig.microsoftonline-p.net', #3 Standard Reply = 404
'companymanager.microsoftonline.com', #4 Standard Reply = 403
'device.login.microsoftonline.com', #5 Standard Reply = 200
'graph.microsoft.com', #6 Standard Reply = 404
'hip.microsoftonline-p.net', #7 Standard Reply = 404
'hipservice.microsoftonline.com', #8 Standard Reply = 404
'login.microsoft.com', #9 Standard Reply = 200
'login.microsoftonline.com', #10 Standard Reply = 200
'logincert.microsoftonline.com', #11 Standard Reply = 200
'loginex.microsoftonline.com', #12 Standard Reply = 200
'login-us.microsoftonline.com', #13 Standard Reply = 200
'login.microsoftonline-p.com', #14 Standard Reply = 200
'login.windows.net', #15 Standard Reply = 200
'nexus.microsoftonline-p.com', #16 Standard Reply = 403
'passwordreset.microsoftonline.com', #17 Standard Reply = 200
'provisioningapi.microsoftonline.com', #18 Standard Reply = 403
'stamp2.login.microsoftonline.com', #19 Standard Reply = 200
'ccs.login.microsoftonline.com', #20 Standard Reply = 401
'ccs-sdf.login.microsoftonline.com', #21 Standard Reply = 401
'accounts.accesscontrol.windows.net', #22 Standard Reply = 200
'secure.aadcdn.microsoftonline-p.com', #23 Standard Reply = 400
'windows.net', #24 Standard Reply = 200
'phonefactor.net', #25 Standard Reply = 200
'account.activedirectory.windowsazure.com', #26 Standard Reply = 404
'secure.aadcdn.microsoftonline-p.com', #27 Standard Reply = 400
'login.windows.net', #28 Standard Reply = 200
'provisioningapi.microsoftonline.com', #29 Standard Reply = 403
'mscrl.microsoft.com', #30 Standard Reply = 400
'secure.aadcdn.microsoftonline-p.com', #31 Standard Reply = 400
'windowsupdate.microsoft.com', #32 Standard Reply = 200
'update.microsoft.com', #33 Standard Reply = 200
'au.download.windowsupdate.com', #34 Standard Reply = 200
'download.windowsupdate.com', #35 Standard Reply = 200
'download.microsoft.com', #36 Standard Reply = 200
'tlu.dl.delivery.mp.microsoft.com'); #37 Standard Reply = 403
$count = 0;
$queryResult =@{};
Write-Host "Checking URIs .." -NoNewline
Do {
Try{
$queryResult[$count] = (Invoke-WebRequest -Uri ("http:`/`/" + $URIs[$count]) -Method Head -UseBasicParsing -TimeoutSec 2).RawContent
}Catch{ $catch = $_ }
if($queryResult[$count].Count -eq 0)
{$queryResult[$count] = ($catch[$catch.count -1].ToString()).Replace("`n", " ")}
Write-Host "." -NoNewline
$count++
}Until ($count -eq ($URIs.Count));
Write-Host "."
Get-Date | Out-File $tempDir\LOGS\Network\O365-URL-Query.TXT -Append
$queryResult | Out-File $tempDir\LOGS\Network\O365-URL-Query.TXT -Append
Write-Host " Bing Check", `n, "==========" | Out-File $tempDir\LOGS\Network\O365-URL-Query.TXT -Append
wh "`n`n`n`URL Check Finished...`n"
}
function smbConfig
{
$CMDs =
{ cmd.exe /c "net config server"
cmd.exe /c "net config workstation"
Get-SmbClientNetworkInterface
Get-SmbServerConfiguration
Get-SmbClientConfiguration
Get-ChildItem "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer"
Get-NetAdapterAdvancedProperty | ft }
ForEach-Object{Invoke-Command $CMDs | Out-File $TempDir\LOGS\NETWORK\$env:COMPUTERNAME-SMB-Config.TXT -Append}
$share = Get-SmbShare
ForEach-Object{Get-SmbShareAccess $share.Name | ft | Out-File $tempDir\LOGS\NETWORK\$env:COMPUTERNAME-SMB-Config.TXT -Append}
} ## End Function smbConfig
func
Just checking if there's any progress or updates?
--please don't forget to Accept as answer
if the reply is helpful--