Jump to content

jp10558

Active Members
  • Posts

    120
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

jp10558's Achievements

Adventurer

Adventurer (3/7)

0

Reputation

  1. So I'm writing a post install script for my Win7 boxes, and I log in as a local user the first time to do some things that only seem to work from within a user account. I want to check that the domain join succeeded or try it again, but the obvious @LogonDomain or @LogonDNSDomain only show if the account currently logged in is part of the domain - which it isn't. How can I check the domain name from a local user account? If I right click on Computer and go to Properties, it says "Domain" and shows the domain name "example.com"... I want to check "example.com" against a value, but I'm not sure how to pull that value?
  2. Is it possible to get the drive letter of a partition if I only know the Volume label? The reason is I want to access a USB drive, but only the label is constant as far as I know.
  3. I've been away a bit, but in Server 2008R2, if you have a Server 2008R2 forest, using ADSI Edit, you can create a NISobject and NISMap object without extending the schema. I just want to script calling that ADSI GUI creation, like the create user function if possible.
  4. Is there a way to create a nisMap class and nisObject class object via the UDF?
  5. So I have a need to create a bunch of shortcuts in a user logon script to network shares that may or may not be accessible. The problem I'm having is for my 15 or so shortcuts, it's taking 9 minutes to create all of them. I don't know why, I'm guessing Windows timeouts on the shares that aren't there. Is there a quicker way to create these shortcuts than FileCreateShortcut, or some flag to just create all of them in parallel?
  6. Thanks. Now I'm trying to use $groupMembers = _AD_GetGroupMembers($groupSelected) And turn the resulting array into something readable, but when I then do: For $i in $groupMembers $escapedString = StringReplace($i,",","\,") MsgBox(0,"String",$escapedString &" " & _AD_FQDNToSamAccountName($escapedString)) next the sAMAccount name lookup remains blank. Am I overthinking this? I just don't want to display FQDN to users as they are far more used to seeing the sAMAccountname.
  7. Doesn't that return the long number, not normal date results? for example, 135543600000000000 instead of July 9th, 2030...
  8. Is there a way to query the account expiration date so I can pass that into a GuiControlCreateDate as the pre-selected date?
  9. lol. Seemed it was UAC related then. Darn. Sorry for the question.
  10. I'm trying to use the _AD_CreateUser, _AD_SetPassword and _AD_ModifyAttribute functions from a non-admin account on an OU where in AD I have delegated permissions. This doesn't seem to work? Is there a way to do this?
  11. I actually was trying without the DriveMapDel initially and it was failing in the same way, so I added it in to clear out one of the potential causes I was aware of.
  12. I have a samba server and while net use works to map a drive with credentials, with my Autoit script using DriveMapAdd I only get an error, specifically Undefined / Other error. Windows API, where @extended is set to 0. I'm really running out of ideas, this used to work, but I'm not sure what the interaction issue may be. The big change was to a RHEL HA clustered samba service. I've tried everything I can find from Windows and Linux, and it seems to work with native tools at a logged in user at the command line. But if I then, with the same user, run a compiled autoit script to map the drive, it fails. It even fails if I do a RunWait("cmd /c net use X: servershare password /user:userName", "", @SW_HIDE) ... note, if I do net use X: servershare password /user:userName at the command line in the same session, it works. I'm prefacing my attempts to map a drive with a DriveMapDel("x:") to avoid trying to map 2 times to the same drive letter... Any ideas?
  13. Is it possible to get the RID from AD in Autoit? Unfortunately, doing $SIDhex = _AD_GetObjectAttribute($user,"objectSid") returns hexadecimal rather than the usual display SID. $SID = _HexToString($SIDhex) doesn't seem to convert to the usual display format... I was going to take the SID and do StringRegExpReplace($SID,"-([0-9]*)\Z","\1") but if I can't get the info in a format I expect, mmm. I could go out to powershell maybe, but I'm not sure if I can capture the output of a powershell snippet.
×
×
  • Create New...