• Home
  • Linux
  • Docker
  • Windows
    • PS
    • C#
    • Exchange Server
  • Other
    • Perl
    • IPV6
    • MacOS
  • DB
    • MSSQL
    • MariaDB
    • PG

Home

Активность POP/SMTP почтовых ящиков

Details
Written by: Senka
Category: Exchange Server
Created: 11 June 2013
Hits: 1264

$mailboxs = Get-Mailbox -server Mail

'Name;PrimarySmtpAddress;Received;Sent' > mbald.csv

foreach ($mailbox in $mailboxs)

{

  $received = Get-TransportServer | Get-MessageTrackingLog -ResultSize unlimited -Start (Get-Date).AddDays(-7) -End (Get-Date) -EventId "RECEIVE" -Recipients $mailbox.PrimarySmtpAddress | Measure-Object

  $sent = Get-TransportServer | Get-MessageTrackingLog -ResultSize unlimited -Start (Get-Date).AddDays(-1) -End (Get-Date) -EventId "RECEIVE" -Sender $mailbox.PrimarySmtpAddress | Measure-Object

  '"' + $mailbox.name + '";"' + $mailbox.PrimarySmtpAddress + '";"'+ $received.count + '";"'+ $sent.count + '"' >> mbald.csv

}

Список пользователей в группе

Details
Written by: Senka
Category: Power Shell
Created: 11 June 2013
Hits: 1303

$group = Get-AdGroup "Users"

Get-ADUser -Filter {MemberOf -recursivematch $group.DistinguishedName} | select name,samaccountname

Инвентаризация ПО в компании

Details
Written by: Senka
Category: Power Shell
Created: 11 June 2013
Hits: 1387

Import-Module ActiveDirectory

$computers = Get-ADComputer -filter * -Properties * | Select Name,OperatingSystem,OperatingSystemVersion,OperatingSystemServicePack,PrimaryGroup, IPv4Address,IPv6Address,CanonicalName,WhenCreated,LastlogonTimestamp, PasswordLastSet,@{Name="Disabled"; Exp={$_.useraccountcontrol -band 2}}| ?{$_.Disabled -eq 0}

 

Read more …

Тестируем скорость открытия файлов из шары

Details
Written by: Senka
Category: Power Shell
Created: 11 June 2013
Hits: 1253

Get-Content "filetest.txt" | ForEach-Object {$t1 = get-date -Format hh:mm:ss.fff; $content = Get-ChildItem $_ | Select-Object -First 1 *; $t2 = get-date -Format hh:mm:ss.fff; echo $t1`t$t2`t$_ } 

Создание контактов в Exchange

Details
Written by: Senka
Category: Exchange Server
Created: 11 June 2013
Hits: 1433

param ($i,$f,$mail)

$match = [regex]::Match($mail,"^([a-z]+\.[a-z]+)@.+$")

$alias = $match.groups[1].value

New-MailContact -ExternalEmailAddress SMTP:$mail -Name "$i $f" -Alias $alias -FirstName "$i" -Initials '' -LastName "$f" -OrganizationalUnit 'Domen/Mail_contacts/OU'

  1. Список отделов в организации
  2. Пользователи за 3 месяца и за месяц отправкой по почте
  3. Формируем списки устаревших пользователей для руководителей

Subcategories

Power Shell Article Count:  53

C# Article Count:  10

Perl Article Count:  1

Exchange Server Article Count:  15

Other Article Count:  24

MSSQL Article Count:  17

Windows Article Count:  25

MariaDB Article Count:  3

Linux Article Count:  8

Docker Article Count:  2

pg Article Count:  2

Page 31 of 32

  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32

Login Form

  • Forgot your password?
  • Forgot your username?

Statistics

  • Users 2
  • Articles 176
  • Articles View Hits 157832