0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

俺でもわかるActiveDirectory Group属性 Info(説明)を変更したいPowerShellコマンドレット

Last updated at Posted at 2020-09-15

俺です。

グループの説明を変えたい

このようなグループがあり、info(Notes, 説明)を変えたいと思ったとします。

PS C:\Windows\system32> Get-ADGroup group -Properties info


DistinguishedName : CN=group,OU=sandbox,DC=saikou,DC=jp
GroupCategory     : Security
GroupScope        : Global
info              : unko
Name              : group
ObjectClass       : group
ObjectGUID        : XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
SamAccountName    : group
SID               : XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

image.png

Set-ADGroup -Replaceを使う

はい無事漏れました!

PS C:\Windows\system32> Set-ADGroup -Identity "CN=group,OU=sandbox,DC=saikou,DC=jp" -Replace @{Info="buriburi"}
PS C:\Windows\system32> Get-ADGroup group -Properties info


DistinguishedName : CN=group,OU=sandbox,DC=corp,DC=andgate,DC=co,DC=jp
GroupCategory     : Security
GroupScope        : Global
info              : buriburi
Name              : group
ObjectClass       : group
ObjectGUID        : XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
SamAccountName    : group
SID               : XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

image.png

トイレは2回流そう!な!

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?