$Date1=(Get-Date).Date
$Date2=(Get-Date).Date.AddDays(7)
$NextBirthdays = Get-ADUser -filter "Enabled -eq 'True'" -properties birthday -SearchBase 'DC=firma,DC=local' |
Select-Object birthday, Name |
Where-Object { $_.birthday -ge $Date1 -and $_.birthday -le $Date2 }
# Формируем текст письма
$messagetemplate = " {0}: {1}`r`n"
$message = ""
foreaach ($b in $NextBirthdays) {
$message += $messagetemplate -f $b.Name, $b.birthday
}
# Ну и тут их шлём кому попало
Send-MailMessage ....
ProgramError: TypeError: 'BigInteger' - определение отсутствует
# PSv7 $cert = [Convert]::ToBase64String((Get-Content D:\Path\To\Certificate.pfx/cer -AsByteStream), 'InsertLineBreaks')
# PSv5.1 $cert = [Convert]::ToBase64String((Get-Content D:\Path\To\Certificate.pfx/cer -Encoding Byte), 'InsertLineBreaks')
$Cert = @"
MIILYgIBAzCCCx4GCSqGSIb3DQEH
.....
.....
.....
1y1lZqkQICB9A=
"@
#LocalMachine
$location = [System.Security.Cryptography.X509Certificates.StoreLocation]::CurrentUser
#ls Cert:\CurrentUser\
#ls Cert:\LocalMachine\
$storeName = 'TrustedPublisher'
$store = [System.Security.Cryptography.X509Certificates.X509Store]::new($storeName, $location)
$store.Open('ReadWrite')
[byte[]]$content = [Convert]::FromBase64String($cert)
$certificate = [System.Security.Cryptography.X509Certificates.X509Certificate2]::new($content)
$store.Add($certificate)
$store.Close()
function Make-LLD () {
For ($i=1; $i -le 3; $i++){
$VPNName = ...
$VPNStatus =
if ($VPNName -eq 'NoSuchInstance'){Break}
@{'#VPN.NAME' = $VPNName; '#VPN.NAME.STATUS' = $VPNStatus}
}
}
$vpns = Make-LLD
$result = ConvertTo-Json @{"data" = [array]$vpns} -Compress
Write-Host $result
postsFile = open('posts.txt','r+') # Открываем файл на чтение и запись
posts = postsFile.read().splitlines() # Читаем файл и помещаем строки в список posts
у вас будет подключение к базе данных, создание таблицы, если надоpostsFile.writelines(url+'\n') # И ссылку записываем в файл posts.txt
всегда первый фулл бэкап создался из исходных данных? а не склеивался уже сущ данными?
<?php
$data = "https://upload.ton.place/uploads/videos/tmp/91ee572b-cd30-4209-5651-7e049c155529.mp4";
print("HASH\n");
foreach (hash_algos() as $v) {
$r = hash($v, $data, false);
printf("%-12s %3d %s\n", $v, strlen($r), $r);
}
$key = hex2bin('e9644439636b8e794ff8c82293bf182c');
print("HMAC\n");
foreach (hash_hmac_algos() as $v) {
$r = hash_hmac($v, $data, $key, false);
printf("%-12s %3d %s\n", $v, strlen($r), $r);
}
?>
[Windows.Graphics.Capture.GraphicsCaptureSession, Windows.Graphics.Capture, ContentType=WindowsRuntime] | Out-Null
[Windows.Graphics.Capture.GraphicsCaptureSession]::IsBorderRequired = $true