Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources: Active Threads
Viewing all articles
Browse latest Browse all 8411

Bulk Replace Description and Info on security groups

$
0
0

Hi.

I have several houndreds of groups where description and info fields are empty or false. Therefore, I'm trying to create script that can automate the following for me, however I cannot put it together:

1) Replace Description

2) Replace Info

3) Create log in c:\logs

I have created a part of it - listet here:

Import-Csv .\GroupOwner.csv | foreach-object { $info=$_.Owner; Set-ADGroup -identity $_.Group -Replace @{info=”Owner: $info”} }

 

CSV-fil:

Group,Description,Owner

Part of GroupName,Group gives access to printer salesdep,Owner:JohnDoe`r`nAccess: Everyone in Dept Sales`r`nRemember to ask Owner first

Can anybody help me out?


Viewing all articles
Browse latest Browse all 8411

Latest Images

Trending Articles



Latest Images