#!win32-perl use strict; $|++; use Win32::OLE; # Change Dial-In Status for a user # 20030308 - JDS # Version: 0.2a # The DC for the LDAP string my $ldapdc = "DC=nmh,DC=nmhschool,DC=org"; # OU of the user(s) you want to change my $ou = "IT"; # User name you want to change - likely will be enumerated from a group my $user = "JShearer"; # The Dial-In Status - either True or False depending on whether you want to Allow or Deny my $status = 'TRUE'; my $oContainer = Win32::OLE->GetObject("LDAP://CN=$user,OU=$ou,$ldapdc"); $oContainer->{msNPAllowDialin} = $status; $oContainer->SetInfo();