Upgrade to Pro — share decks privately, control downloads, hide ads and more …

PowerShellでActive Directoryを操作してみよう (グループ編)

PowerShellでActive Directoryを操作してみよう (グループ編)

minase

June 07, 2016
Tweet

More Decks by minase

Other Decks in Programming

Transcript

  1. • • • Get-ADGroup -Filter * Get-ADGroup -Filter * -SearchBase

    'OUのDN' Get-ADGroup -Filter {Name -like "*開発管理部*"}
  2. • New-ADGroup -Name 'TestGroup' ` -Description 'test' ` -GroupScope Global

    ` -GroupCategory Security ` -Path '作成先OUのDN'
  3. • • • • Set-ADGroup -Identity 'TestGroup' -Description 'Change' Rename-ADObject

    -Identity 'グループのDN' -NewName 'TestGroup' Set-ADGroup -Identity 'TestGrop' -GroupCategory Distribution Get-ADGroup -Identity 'TestGroup' | Set-ADGroup -Description 'change'
  4. • • • • Add-ADGroupMember -Identity 'TestGroup' -Members minase,isami Remove-ADGroupMember

    -Identity 'TestGroup' -Members yamashita Get-ADGroup -Identity 'TestGroup' | Add-ADGroupMember -Members yamashita Get-ADGroup -Identity 'TestGroup' | Remove-ADGroupMember -Members isami