Win2012
Материал из support.qbpro.ru
Версия от 15:32, 12 октября 2026; Vix (обсуждение | вклад)
Как сменить тип профиля сети в Windows Server 2012
secpol.msc
- Нажмите кнопку OK, нажмите Политики диспетчера списка сетей, нажмите на нужной сети правой кнопкой мыши, выберите Свойства, перейдите на вкладку Сетевое расположение, установите отметку Публичное, нажмите кнопку OK.
Очистка кэшей и временных файлов на терминальном сервере
``` $users = Get-ChildItem -Path C:\Users | select Name
function Clear-CacheFolder {
[CmdletBinding()]
param(
[Parameter(Mandatory = $true)]
[string]$CachePath
)
Write-Host $CachePath
if (Test-Path -LiteralPath $CachePath) {
Get-ChildItem -LiteralPath $CachePath -Force |
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue
}
}
- ETLLogs
$cachePath ="C:\ProgramData\Microsoft\Diagnosis\ETLLogs\" $days = 5 $limit = (Get-Date).AddDays(-$days) Get-ChildItem -LiteralPath $cachePath -Recurse -Force -File |
Where-Object { $_.LastWriteTime -lt $limit } |
Remove-Item -Force -ErrorAction SilentlyContinue
foreach ($y in $users) {
Write-Host $y.Name $u=$y.Name #Get-ChildItem -Path "c:\users\"$u"\AppData\Local\Yandex\YandexBrowser\User Data\Default\Cache\"
- yandex
$cachePath = "c:\users\"+$u+"\AppData\Local\Yandex\YandexBrowser\User Data\Default\Cache\" Clear-CacheFolder -CachePath $cachePath $cachePath = "c:\users\"+$u+"\AppData\Local\Yandex\YandexBrowser\User Data\Default\Code Cache\" Clear-CacheFolder -CachePath $cachePath
- opera
$cachePath = "c:\users\"+$u+"\AppData\Local\Opera\Opera\cache\" Clear-CacheFolder -CachePath $cachePath $cachePath = "c:\users\"+$u+"\AppData\Local\Opera\Opera\code cache\" Clear-CacheFolder -CachePath $cachePath
- chrome
$cachePath = "c:\users\"+$u+"\AppData\Local\Google\Chrome\User Data\Default\Cache\" Clear-CacheFolder -CachePath $cachePath $cachePath = "c:\users\"+$u+"\AppData\Local\Google\Chrome\User Data\Default\Code Cache\" Clear-CacheFolder -CachePath $cachePath
- thumbvache
$cachePath = "c:\users\"+$u+"\AppData\Local\Microsoft\Windows\Explorer\" Clear-CacheFolder -CachePath $cachePath
- temp
$cachePath = "c:\users\"+$u+"\AppData\Local\temp\" Clear-CacheFolder -CachePath $cachePath
} ```
ИСТОЧНИК:
ПОЛЕЗНОЕ:
