2

How-to : Recover totally bricked Nokia Lumia 820

-

When trying to recover my Lumia 820 from unsuccessful OS upgrade, phone went completely dead.

I was not able to turn it on or see any sign of activity in the device (boot manager damage happened probably).

At that stage I decided to look for tool which can recover my boot manager and then OS on Lumia.

Tool I found is available on Microsoft web site:

…and here is how it recovered my phone…

(more…)

0

How-to : Recover Nokia Lumia 820 when OS fails to load

-

When I tried to install Technical Preview of Windows 10 on my Nokia Lumia 820, I ended up with phone which went into infinite loop of updating.

As a result of that phone became unusable and there was no way to bring it back to life without any additional intervention.

To get phone back to life I used fostware available for free from Microsoft:

…and here is how that went…

(more…)

0

Code snippets : Restart IIS Application Pool in PowerShell

-

If you need to watch IIS application pool and start it once goes down and want to use PowerShell for that here is simple script for that.

Script includes also logging all restarts in log file which is created in same folder as script.

# AppPool to monitor
$AppPoolName = "AppPoolName"

# Log Destination
$LogToScreen = 1
$LogToFile = 1

# Determine script location for PowerShell
$ScriptDir = Split-Path $script:MyInvocation.MyCommand.Path

# Output log
$OutputLogPath = $ScriptDir + "\AppPoolRestart.csv"

#Check if file exists and create if it doesn't
If(!(Test-Path -Path $OutputLogPath)){
#Create file and start logging
New-Item -Path $OutputLogPath -ItemType File
}

###
# Function: LogMessage
###
function LogMessage($Msg, $ToScreen, $ToFile)
{
if ($ToScreen -eq 1)
{
Write-Host $Message
}

If ($ToFile -eq 1)
{
Add-Content -Path $OutputLogPath -Value $Message
}
}
###
# End Function: LogMessage
###

While (1 -eq 1){

Clear-Host

$AppPoolStatus = Get-WebAppPoolState -Name $AppPoolName

$DateTime = Get-Date

If ($AppPoolStatus.Value -eq "Stopped"){
Write-Host "Not Working"
Start-WebAppPool -Name $AppPoolName
$Message = "App Pool $AppPoolName restarted at $DateTime"
LogMessage $Message $LogToScreen $LogToFile
}Else{
Write-Host "Working"
}

Sleep 5
}