Subscribe to Windows IT Pro
January 23, 2012 08:47 AM

Use PowerShell to Bulk Replace Logon Scripts for Active Directory Users

Windows IT Pro
InstantDoc ID #141439
Rating: (0)

I had to change the logon script for a select group of users who had a particular logon script configured in their Active Directory (AD) profiles. I discovered that this task is easy to accomplish using Quest Software’s ActiveRoles Management Shell for Active Directory, which provides a free a set of cmdlets for AD. You just need to use the Get-QADUser cmdlet with the -LogonScript argument to list all users configured with the old script, then pipe the results to the Set-QADUser cmdlet with the -LogonScript argument to replace the old logon script with the new one. The command looks like

Get-QADUser -LogonScript OldFile |

  Set-QADUser -LogonScript NewFile

 

where OldFile is the old logon script and NewFile is the new logon script. You can download the free ActiveRoles cmdlets at  Free PowerShell Commands for Active Directory.

Related Content:

ARTICLE TOOLS

Comments
    There are no comments to display. Be the first one!
You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.