locked
How to modify default value of Login Shell attribute via script RRS feed

  • Question

  • Hi all,

    I'm configuring the "UNIX Attributes" tab here in Active Directory Users and Computers. I've noticed that on the Login Shell option it has a default value: /bin/sh. So I had manually changed it to: /bin/bash.  I just change this value one bu one manually.  Now, I want to change this value for all users via script. Could you please help me to receive this goal?

    Thank you in advance.


    • Edited by alice_xzh Thursday, November 13, 2014 2:59 AM 1
    Thursday, November 13, 2014 2:49 AM

Answers

  • Use Get-AdUser / Set-AdObject

    Get-AdUser -Filter * | Set-AdObject -Replace @{unixhomedirectory='/bin/sh','bin/bash'} -WhatIf


    ¯\_(ツ)_/¯


    • Edited by jrv Thursday, November 13, 2014 7:21 AM
    • Proposed as answer by jrv Friday, November 14, 2014 11:41 AM
    • Marked as answer by ScriptingWife Tuesday, December 16, 2014 2:54 PM
    Thursday, November 13, 2014 7:21 AM

All replies

  • Use Get-AdUser / Set-AdObject

    Get-AdUser -Filter * | Set-AdObject -Replace @{unixhomedirectory='/bin/sh','bin/bash'} -WhatIf


    ¯\_(ツ)_/¯


    • Edited by jrv Thursday, November 13, 2014 7:21 AM
    • Proposed as answer by jrv Friday, November 14, 2014 11:41 AM
    • Marked as answer by ScriptingWife Tuesday, December 16, 2014 2:54 PM
    Thursday, November 13, 2014 7:21 AM
  • Ok, I got. Thank you very much.
    Friday, November 14, 2014 1:32 AM