PowerShell: Function to Set user object ScriptPath in Active Directory
Here a neat little function for you, it sets the logon script path using the Set-ADUser. # Name………..: Set-ScriptPath# Description …: Sets the specified users logonscript.# Syntax………: Set-ScriptPath User LogonScript# Example …….: Set-ScriptPath BloggsJ Default.bat# Parameters ….: $sAM, $Scriptpath# Author ……..: Raf DelgadoFunction Set-ScriptPath{param ($sAM, $scriptpath)Set-ADUser$check -Identity $sAM -ScriptPath $scriptpath = get-aduser -Identity $sAM -Properties […]