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

Инвентаризация серверов

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

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

Read more …

Активные пользователи в AD

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

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

Get-ADUser -Filter {lastlogontimestamp -gt $date} -property * | Select SamAccountName,Name, EmailAddress,CanonicalName,Manager,lastlogontimestamp,@{Name="Disabled"; Exp={$_.useraccountcontrol -band 2}}| ?{$_.Disabled -eq 0} | export-csv active_users.csv -Delimiter ";" -NoTypeInformation -Encoding Default

 

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

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

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

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

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$_ } 

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

Page 10 of 11

  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11

Login Form

  • Forgot your password?
  • Forgot your username?

Statistics

  • Users 2
  • Articles 164
  • Articles View Hits 149004