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

Home

Move Group Members to OU

Details
Written by: Senka
Category: Power Shell
Created: 25 July 2013
Hits: 1261

Get-ADGroupMember $group | Move-ADObject -targetpath "OU=IT,OU=Users,DC=tcsbank,DC=ru"

Автоматическая загрузка и обновление фотографий пользователей в Exchange

Details
Written by: Senka
Category: Power Shell
Created: 26 June 2013
Hits: 1360

#Import-Module ActiveDirectory

#add-pssnapin Microsoft.Exchange.Management.PowerShell.E2010

. 'C:\Program Files\Microsoft\Exchange Server\V14\bin\RemoteExchange.ps1'

Connect-ExchangeServer -auto

Read more …

PowerShell can speak

Details
Written by: Senka
Category: Power Shell
Created: 25 June 2013
Hits: 1307
Add-Type -AssemblyName System.Speech
$synthesizer = New-Object -TypeName System.Speech.Synthesis.SpeechSynthesizer
$synthesizer.Speak('Hey, I can speak!')

Exchange photo resize

Details
Written by: Senka
Category: Power Shell
Created: 25 June 2013
Hits: 1251

Function Set-ImageSize

 

Read more …

Exchange photo export

Details
Written by: Senka
Category: Exchange Server
Created: 20 June 2013
Hits: 1376

# export photo

$a= Get-ADUser USERNAME -Properties thumbnailphoto

$a.thumbnailphoto | Set-Content c:\path\photo.jpg -Encoding byte

 

# have photo 

$date = (Get-Date).AddDays(-90)

Get-ADUser -Filter {lastlogontimestamp -gt $date -and EmailAddress -like '*' -and thumbnailphoto -notlike '*'} -property * | Select Name,SamAccountName,EmailAddress,Department,@{Name="Disabled"; Exp={$_.useraccountcontrol -band 2}}| ?{$_.Disabled -eq 0} | Sort-Object name | export-csv nophoto.csv -Delimiter ";" -NoTypeInformation -Encoding Default

 

Get-ADUser -Filter {lastlogontimestamp -gt $date -and EmailAddress -like '*' -and thumbnailphoto -like '*'} -property * | Select Name,SamAccountName,EmailAddress,Department,@{Name="Disabled"; Exp={$_.useraccountcontrol -band 2}}| ?{$_.Disabled -eq 0} | Sort-Object name | export-csv photo.csv -Delimiter ";" -NoTypeInformation -Encoding Default

 

# import photo

param ($name)

$login="$name@domen"

Import-RecipientDataProperty -Identity $login -Picture -FileData ([Byte[]]$(Get-Content -Path "f:\tasks\exchange_photo\photo\$name.jpg" -Encoding Byte -ReadCount 0))

 

To remove a photo use the following:

Set-Mailbox USERNAME -removepicture

  1. Удаление писем из почтовых ящиков
  2. Exchange права редактирования групп рассылки
  3. Отправка сообщения пользователю при добавлении в доменную группу
  4. Настройки в ini файле на C#W

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 28 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