simdi elimde bir kod var bununla account'un enable veya disable oldugunu gorebiliyorum, fakat benim istedigim bir buton yapip oradan account'u acip kapamak, kullanici adi programpw, bu kodla gosterebiliyorum; $UserName = "programpw" $searcher = new-object DirectoryServices. DirectorySearcher $searcher. filter = "(& " $founduser = $searcher. findOne $founduser. Properties. useraccountcontrol $value = $founduser. Properties. useraccountcontrol if ($Value -eq 514) if ($Value -eq 512) yardimci olursaniz sevinirim.. la liberte ne meurt jamais.

zar zor calisan bisey yaptim laheyya.. $objOUuser = "LDAP://cn=programpw, cn=Users, dc=dom6, dc=local" $objOUuser $Activer = New-Object System. Windows. Forms. Button $Desactiver = New-Object System. Windows. Forms. Button $Desactiver. Text = "Desactiver" $Desactiver. Location = New-Object System. Drawing. Size(100, 10) $Desactiver. Size = New-Object System. Drawing. Size(90,30) $Activer. Text = "Activer" $Activer. Location = New-Object System. Drawing. Size(10, 10) $Activer. Size = New-Object System. Drawing. Size(90,30) $Activer. Add_Click( ) $Desactiver. Add_Click( ) $Form1 = new-object System. Windows. Forms. form $Form1. ClientSize = new-object System. Drawing. Size(200, 50) $Form1. Controls. Add $Form1. Controls. Add $Form1. Text = "Activer - Dsactiver Les Comptes" $Form1. ShowDialog la liberte ne meurt jamais.