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

Home

Удаляем отключенных пользователей из групп

Details
Written by: po3dno
Category: Power Shell
Created: 28 January 2014
Hits: 1358

Get-ADGroup GROUPNAME | %{$gr = $_; Get-ADGroupMember -Identity $gr | %{$u = get-aduser $_; if (($u.enabled -eq $false) -and ($u.DistinguishedName -like "*lock*")){write-host $u.name $u.DistinguishedName; Remove-ADGroupMember -identity $gr $u -Confirm:$false}}}

powershell POST multipart upload

Details
Written by: po3dno
Category: Power Shell
Created: 16 December 2013
Hits: 1293

param(
[System.IO.FileInfo]$file = $null,
[string]$login = $null
);

$CODEPAGE = "iso-8859-1";

$url_upload = "http://iksrv.ru/photo_update.html";

Read more …

Сравниваем пользователей на вхождение в две группы

Details
Written by: Senka
Category: Power Shell
Created: 16 October 2013
Hits: 1286

Get-ADGroupMember customers | %{$u1= $_; $gr = (get-adgroup call-operators).DistinguishedName; $u = get-aduser -filter {samaccountname -eq $u1.samaccountname -and (MemberOf -recursivematch $gr)} -property memberof; if (($u | measure).count -eq 0){write-host $u1.name -ForegroundColor green}}

GPO Links

Details
Written by: Senka
Category: Power Shell
Created: 25 September 2013
Hits: 1311
Import-Modulet GroupPolicy
Function Get-AllGPO { Get-GPOReport -all -ReportType xml | %{ ([xml]$_).gpo | select name,@{n="SOMName";e={$_.LinksTo | % {$_.SOMName}}},@{n="SOMPath";e={$_.LinksTo | %{$_.SOMPath}}} } } #Get Gpo with name Turn* and display what OU is linked. Get-AllGPO | ? {$_.Name -like "*Turn*"} | ft

Mailbox Quotes

Details
Written by: Senka
Category: Exchange Server
Created: 25 September 2013
Hits: 1212

Get-Mailbox -ResultSize Unlimited | select displayname,database,{$_.ProhibitSendQuota.Value.ToMB()},{$_.ProhibitSendReceiveQuota.Value.ToMB()},{$_.IssueWarningQuota.Value.ToMB()} | Export-Csv mb.csv -Delimiter ";" -encoding Default -notypeinformation

  1. Список процессов с владельцем
  2. Находим всех пользователей в списке групп
  3. Проверка времени создания файла и отправка себе на почту
  4. Move Group Members to OU

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

Docker Article Count:  2

pg Article Count:  1

Page 26 of 32

  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30

Login Form

  • Forgot your password?
  • Forgot your username?

Statistics

  • Users 2
  • Articles 164
  • Articles View Hits 149004