This PowerShell Script shows how to create custom refresh image.
The windows refresh feature does not enable you to create custom refresh points like Windows System Restore. Instead, refresh creates a Windows Installer Image that helps restore settings to the default state. This script lets users create custom refresh points.
Step1: Run the script in the Windows PowerShell Console, type the following command at the prompt: Import-Module <Script Path> .
For example, type Import-Module C:\Script\ SetRefreshImage.psm1
This is shown in the following figure.

Step 2: This PowerShell module provides the following cmdlets:
You can type the command Get-Help “cmdlet” -Full to display the entire help file for this function, such as the syntax, parameters, or examples. For example Get-Help New-OSCRefreshImage -Full

If (Test-Path -Path $Path)
{
Write-Host "Setting the current custom recovery image..." -ForegroundColor Green
Invoke-Expression -Command "recimg /setcurrent $Path"
}
Else
{
Write-Warning "Cannot find path '$Path' because it does not exist."
}
If (Test-Path-Path $Path) { Write-Host "Setting the current custom recovery image..."-ForegroundColor Green Invoke-Expression-Command "recimg /setcurrent $Path" } Else { Write-Warning"Cannot find path '$Path' because it does not exist." }
Example 1: Type New-OSCRefreshImage -Path C:\Script command in the Windows PowerShell Console.
This command creates an image to the "C:\Script" Folder.

Example 3: Type the Set-OSCTileRow
-RowNumber 3 command in the Windows PowerShell Console.
This command will use default Refresh point will be used instead of your custom refresh image.