Windows server booting issue


First, I would like to confirm that if it is able to boot the computer as normal after launched repair.

 If the system cannot boot up, you may try the following steps:

     Reset BIOS

  1.     Use the Last Known Good Configuration startup option
  2.     Boot the computer in Safe Mode
  3.     Reset the registry in WinRE

 Reset the registry

===================

Cd  c:\windows\system32\config

Ren  default  default.old

Ren  sam  sam.old

Ren  security  security.old

Ren  software  software.old

Ren  system  system.old

Copy  c:\windows\system32\config\regback\default.old  default

Copy  c:\windows\system32\config\regback\sam.old  sam

Copy  c:\windows\system32\config\regback\security.old  security

Copy  c:\windows\system32\config\regback\software.old  software

Copy  c:\windows\system32\config\regback\system.old  system

 

Advertisements

FInd IE Version on Remote Computers using PowerShell


Function IEVersion {
$Prop = [ordered]@{}
$ComputerName = Cat C:\computers.txt
$ErrorActionPreference = “Stop”
foreach ($computer in $ComputerName)
{

Try {
$Syntax = GWMI win32_operatingsystem -cn $computer
$Prop.Computername = $Syntax.CSName
$Prop.OperatingSystem = $Syntax.Caption
$Prop.ServicePack = $Syntax.CSDVersion
$Reg = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey(‘LocalMachine’, $computer)
$RegKey= $Reg.OpenSubKey(“SOFTWARE\\Microsoft\\Internet Explorer”)
$Prop.IEVersion = $Regkey.GetValue(“svcVersion”)

New-Object PSObject -property $Prop
}

Catch
{

Add-Content “$computer is not reachable” -path $env:USERPROFILE\Desktop\UnreachableHosts.txt
}
}
}
#HTML Color Code
#http://technet.microsoft.com/en-us/librProp/ff730936.aspx
$a = “<!–mce:0–>”
IEVersion | ConvertTo-HTML -head $a -body ”

IE Version

” |
Out-File $env:USERPROFILE\Desktop\DomainController.htm #HTML Output
Invoke-Item $env:USERPROFILE\Desktop\DomainController.htm

Learning links

Monitoring when registry keys are modified

Check ntp stats


del ntp-time.log
$servers = get-content C:\servers.txt

foreach($Server in $servers) {

$ntp = W32tm /monitor /computers:$server | findstr “NTP:”
$source = w32tm /query /computer:$server /source
$ntp = $ntp -replace ” “,”`t”

$server + $ntp + “,” + $source >> ntp-time.log
$server + $ntp
$source

}

./ntp-time.log

LastLogonDate


Import-Module ActiveDirectory
Get-ADuser -filter * -Properties *|where{$_.enabled -eq $False -and $_.LastLogonDate -ge (Get-Date).AddDays(-30)}|Select Name, SAMAccountname, Mail, Displayname, Modified, LastLogonDate | Export-Csv -Path D:\
lastlogon_dont_delete\output.csv

Windows_activation_status


$ldapSearcher = new-object directoryservices.directorysearcher;
$ldapSearcher.filter = “(objectclass=computer)”;
$computers = $ldapSearcher.findall();

foreach ($computer in $computers)
{
$compname = $computer.properties[“name”]
$ping = gwmi win32_pingstatus -f “Address = ‘$compname'”
$compname
if($ping.statuscode -eq 0)
{
try
{
$ErrorActionPreference = “Stop”
$wpa = Get-WmiObject -class SoftwareLicensingProduct -ComputerName $compname | Where{$_.LicenseStatus -NotMatch “0”}
if($wpa)
{
foreach($item in $wpa)
{
$status = switch($item.LicenseStatus)
{
0 {“Unlicensed”}
1 {“Licensed”}
2 {“Out-Of-Box Grace Period”}
3 {“Out-Of-Tolerance Grace Period”}
4 {“Non-Genuine Grace Period”}
5 {“Notification”}
6 {“Extended Grace”}
default {“Unknown value”}
}
“Activation Status: {0}” -f $status
}
}
else
{
write-host (“Unlicensed”)
}
}
catch
{
write-host (“Computer does not have SoftwareLicensingProduct class, you have insufficient rights to query the computer or the RPC server is not available”)
}
finally
{
$ErrorActionPreference = “Continue”
}

}
else
{
write-host (“Offline”)
}
[console]::WriteLine()
}

%d bloggers like this: