KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.4.58 (Win64) OpenSSL/3.1.3 PHP/8.2.12
System : Windows NT SERVER-PC 10.0 build 26200 (Windows 11) AMD64
User : ServerPC ( 0)
PHP Version : 8.2.12
Disable Function : NONE
Directory :  C:/Windows/diagnostics/system/BITS/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : C:/Windows/diagnostics/system/BITS/TS_Main.ps1
# Copyright © 2015, Microsoft Corporation. All rights reserved.
# :: ======================================================= ::

#====================================================================================
# Initialize
#====================================================================================
Import-LocalizedData -BindingVariable Strings_Main -FileName CL_LocalizationData  

#====================================================================================
# Load Utilities
#====================================================================================
. ./CL_Service.ps1

#====================================================================================
# Main
#====================================================================================

Write-DiagProgress -Activity $Strings_Main.ID_PROG_MAIN_Initializing
	
# Checking for root causes
. .\RC_BITSDLL.ps1 | Out-Null
. .\RC_BITSACL.ps1 | Out-Null
. .\RC_BITSRegKeys.ps1 | Out-Null

Write-DiagProgress -Activity (($Strings_Main.ID_STATUS_START_SERVICE).Replace('%ServiceName%','Bits'))

# Clear bits queue
Set-Service bits -StartupType Automatic -ErrorAction SilentlyContinue
& "$env:windir\system32\bitsadmin.exe" /reset /allusers

$output = net start bits 2>&1
if ((IsServiceInstalled "bits") -eq $true)
{
	Get-Service bits -DependentServices -ErrorAction SilentlyContinue | Start-Service -ErrorAction SilentlyContinue
}

if($output)
{
	$sb = New-Object System.Text.StringBuilder
	$sb.Append(($Strings_Main.ID_BITS_ERROR_MSG_SERVICE))
	$sb.Append("`n")
	foreach($o in $output)
	{
		if($o)
		{
			$sb.append($o.tostring().Trim() + ' ')
		}
	}
	($sb.ToString()) | ConvertTo-Xml | Update-DiagReport -ID 'TS_Main' -Name 'Service Status' -Verbosity Informational;
}

Anon7 - 2021