This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# указываем сколько дней с момента последнего изменения чтобы считать устаревшим | |
$dateLimit = 365 | |
# Путь к папкам профилей | |
$usersPath = "C:\Users" | |
# список пользователей, которых не трогаем | |
$excludeList = "Public", "Administrator", "root", "adm.*" | |
# Путь к папке, куда будем бэкапить профили | |
$backupPath = "C:\Backup" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Авто монтирование сетевой папки | |
[Automount] | |
Where=/mnt/print | |
TimeoutIdleSec=30 | |
[Install] | |
WantedBy=graphical.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
set server=ZAGS-SERVER | |
set share=ZAGS32 | |
set disk=Z | |
set check=%disk%:\zags32.exe | |
rem Если сетевой диск смонтирован, то просто запускаем программу | |
if exist %check% goto run | |
:loop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
userconf="$HOME/.anydesk/user.conf" | |
# Указываем файл в "облаке", если его нет, он будет создан автоматически | |
cloud="$HOME/MEGAsync/anydesk.txt" | |
if ! [ -f "$userconf" ]; then | |
echo -e "Ошибка: Файл $userconf не найден!\n\tСкорее всего не установлен AnyDesk" >&2 | |
exit 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Основные переменные | |
$proxyServer = "10.0.46.52:3128" | |
# какие адреса не проксируем, через ; | |
$bypassList = "192.168.*;10.*;localhost;127.*" | |
$cert = "ca-root.crt" | |
# каким пользователям не назначаем прокси | |
$excludeList = "Public", "maximax;)" | |
$wifiProfile = "wifi.xml" | |
# Для совместимости со старыми версиями powershell, где нет этих переменных |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Clear-Host | |
#Указываем папку c webdriver.dll и драйвером нужного браузера | |
$seleniumPath = 'C:\scripts\selenium' | |
#Указываем браузер | |
$browser = 'firefox' | |
#Арес веб-интерфейса роутера | |
$url = 'http://192.168.1.1' | |
#Добавляем путь до webdrivera в переменные окружения пользователя | |
if (($env:Path -split ';') -notcontains $seleniumPath) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$server = "localhost" #Адресс сервера (в моем случае локальный) | |
$db = "Skif_Bp" #База данных | |
$back_dir = "E:\backup" #Куда сохранять бэкапы | |
$file_name = $db + "_" + (Get-Date -Format yyyy-MM-dd) + ".bak" #имя бэкапа вида BaseName_2018-12-31.bak | |
$arch_type = "7z" #Тип архива | |
$days = 14 #сколько дней хранить бекапы | |
#Для бекапа сетевой базы нужно будет использовать логин и пароль для доступа к серверу | |
#cм. справку к команде Backup-SqlDatabase | |
Set-Location $back_dir |