Jump to content

ScriptingNewbie

Members
  • Posts

    6
  • Joined

  • Last visited

Everything posted by ScriptingNewbie

  1. On Windows 7 x64 the _Hide() function does not work. This is the fix for it. Func _Hide() If ControlGetHandle("[CLASS:#32770]", "", "[CLASS:DirectUIHWND; INSTANCE:1]") <> "" And WinGetState("[CLASS:#32770]") <> @SW_HIDE Then ;The Window Exists $hWnd = WinGetHandle("[CLASS:#32770]") WinSetState($hWnd, "", @SW_HIDE) EndIf EndFunc Just change the SysAnimate32 to DirectUIHWND
  2. I think I figured out how to create Exchange 2010 accounts using PowerShell in 1 line. Create just a mailbox. $sAMAccountName = "AutoIt" $databaseName = "Exchange Datebase Name" RunWait("C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe add-pssnapin Microsoft.Exchange.Management.Powershell.E2010 ; Enable-Mailbox -Identity " & $sAMAccountName & " -Database '" & $databaseName & "'") This hides the user from the GAL RunWait("C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe add-pssnapin Microsoft.Exchange.Management.Powershell.E2010 ; Set-Mailbox -Identity " & $sAMAccountName & " -HiddenFromAddressListsEnabled $true") Change the $true to $false to show them in the GAL It seems you can use semicolon to do another command. So in theory you can move the mailbox etc. I hope this helps others who need to deal with Exchange 2010.
  3. Thank you that has worked with the 16.
  4. From the Active Directory Schema.
  5. The SamAccountName is called test.account. It is a test account I created for this. When I run it, I get; COM Error Encountered in Change Photo.au3 AD UDF version = 1.3.0 @AutoItVersion = 3.3.8.1 @AutoItX64 = 0 @Compiled = 0 @OSArch = X86 @OSVersion = WIN_XP Scriptline = 2479 NumberHex = 80020009 Number = -2147352567 WinDescription = The attribute syntax specified to the directory service is invalid. Description = Source = HelpFile = HelpContext = 0 LastDllError = 0 ======================================================== +>09:09:18 AutoIt3.exe ended.rc:0 >Exit code: 0 Time: 0.887
  6. I am trying to use AutoIt to edit the thumbnailPhoto attribute on a users account. However I think I need to make the image into a byte array, but I am not sure. Can anyone help? #include <AD.au3> _AD_Open() _AD_ModifyAttribute("test.account","thumbnailPhoto","D:\testaccount.JPG") _AD_Close()
×
×
  • Create New...