Add-Content$Log-Value((Get-Date-Formatg)+";Error;UE-V is not enabled")

Write-Host"Error: UE-V is not enabled."-ForegroundColorRed

Write-Host"Script action: Script will try enabled UE-V, after that system will be rebooted.`nYou need start process again, after system reboot.`nPress any key to continue or Ctrl + C for exit"-ForegroundColorYellow

$x=$host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")

Try

{

Enable-Uev

Add-Content$Log-Value((Get-Date-Formatg)+";Info;UE-V is enabled successful. System reboot")

Write-Host"UE-V is enabled successful. System reboot"-ForegroundColorGreen

Add-Content$Log-Value((Get-Date-Formatg)+";Error;UE-V service not found. You need to install UE-V agent using Software Center or please contact with system administrator")

Write-Host"Error: UE-V service not found. You need to install UE-V agent using Software Center or please contact with system administrator.`nPress any key to continue or Ctrl + C for exit"-ForegroundColorRed

$x=$host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")

Exit

}

if((Get-Service-NameUevAgentService).status-eq"Stopped")

{

Add-Content$Log-Value((Get-Date-Formatg)+";Error;UE-V is enabled. But service is stoped, script will try star UE-V service")

Write-Host"Error: UE-V is enabled. But service is stoped, script will try star UE-V service"-ForegroundColorRed

Try

{

Start-Service-NameUevAgentService

Add-Content$Log-Value((Get-Date-Formatg)+";Info;UE-V service is started")

Write-Host"UE-V configuration is correct `nSettingsStoragePath is "$UEVConfiguration.SettingsStoragePath"`nSettingsTemplateCatalogPath is "$UEVConfiguration.SettingsTemplateCatalogPath""-ForegroundColorGreen

Была задача получить список уникальных каталогов в appdata\local, у каждого пользователя. Что бы проанализирвоать какие каталоги стоит исключить из перемещаемого профиля.
There was a task to receive the list of unique catalogs in appdata \ local, at each user. What would be to analyze what catalogs should be excluded from the roaming profile.