Write-SmartState