Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: sn0rg
  • Order by date
  1. sn0rg

    Chart - DataSeries Order

    To answer my own question: (variables are different, but you get the idea) $mySeries1 = new-object System.Windows.Forms.DataVisualization.Charting.Series [void]$mySeries1.Points.Add(14) [void]$mySeries1.Points.Add(34) [void]$mySeries1.Points.Add(42) [void]$mySeries1.Points.Add(18)...
  2. sn0rg

    Chart - DataSeries Order

    Hi All I'm a bit of a novice with PS, and have been trying to create a graphic, following the tutorial here. There a section where he enters x & y values using an array: # add data to chart $Cities = @{London=7556900; Berlin=3429900; Madrid=3213271; Rome=2726539; Paris=2188500}...
  3. sn0rg

    Determine file type

    Thanks guys... feeling somewhat embarrassed that I didn't spot the $, but it works great.
  4. sn0rg

    Determine file type

    Thanks for your help strongm, but I'm struggling. I get an error of "Microsoft VBScript compilation error: Invalid character" when the "isunicode =" line runs. I made the following script based on your response: Const ForReading = 1, ForWriting = 2 Const TriStateTrue = -1...
  5. sn0rg

    Determine file type

    Hi guys I am opening text files in vbscript, and need to discover if I should use TriStateTrue or TriStateFalse. e.g. Set objInputFile = objFSO.OpenTextFile(strFilePath, ForReading, False, TristateTrue) is there a way to interrogate the file before I open it? If I open in the wrong format...
  6. sn0rg

    Create user in another AD

    Thanks for the help - solution turned out to be: Set objNamespace = GetObject("LDAP:") Set objOU = objNamespace.OpenDSObject("LDAP://otherforest.com/OU=TheOUToCreateTheUserIn,DC=otherforest,DC=com", strUsername, strPassword, 0) objOU.Create("user", "CN=Username") Where 0 is the encryption flag
  7. sn0rg

    Create user in another AD

    Hi all, I've got to create a user account (with vbscript) in a different Forest. I know the account I'm using has the relevant permission in that Forest, but am struggling to create the object. On the objUser.setinfo line, I get the error: -2147016651 The server is unwilling to process the...
  8. sn0rg

    Text file strangeness

    The answer? Unicode characters. I had to open with "TriStateTrue
  9. sn0rg

    Text file strangeness

    Hi Guys i've created a CSV file with a vbscript and the filesystemobject. Now I want to read the content of that file into an array. Trouble is, when I attempt to read the file using objFile.readline, it's garbage. Always starts with "ÿþF", and nothing else will echo out. I can manually...
  10. sn0rg

    Query another AD forest

    Hi Guys My Company has joined with another, and we have both got a Win 2003 AD. I want to run a query against their AD via ADO as follows: set ons=getobject("LDAP:") set ocontainer=ons.OpenDSObject( _ "LDAP://Company2DC.company2.com/cn=users,dc=company2,dc=com", _ szUsername, _...
  11. sn0rg

    Redim preserve multi dimensional array

    Thanks for the answer. In the end, I decided to loop through the rows of the spreadsheet, and construct the array size, then go back to the beginning, Dim the array, then Redim it with the variable, and add the items into the array for a For statement.
  12. sn0rg

    Redim preserve multi dimensional array

    Hi all I'm trying to build a 2 dimensional array from values in a spreadsheet. I am used to using the redmin preserve array(x) command to add values, but when I try this for a multi-dimentsional array I get an "out of range" error. Can anyone help? n = 0 intColumn = 1 dim m Dim...
  13. sn0rg

    Declare multiple variables

    I need to have a load of similar string variables in my script, with the same name, but incremented with a number. Normally I would do something like: dim item1, item2, item3, item4, item5, item6 I was hoping that there may be an easier way to refer to these, but am a bit rusty on vbscript...
  14. sn0rg

    Display domain\user from SID (Exchange 55)

    Looking at the output of hssid, it doesn't look like a Hex string - there are no letters in it. Certainly the value echoed out doesn't match the Hex version of the string displayed via the Exchange 5.5 Admin tool (using Raw mode). Any thoughts? (thanks for help so far)
  15. sn0rg

    Display domain\user from SID (Exchange 55)

    It reports "Byte()" basid = oRS.Fields("Assoc-NT-Account") wscript.echo typename(basid)
  16. sn0rg

    Display domain\user from SID (Exchange 55)

    Thanks - ossid (in the for/next routine) is not defined anywhere though - I assume you mean basid? Even so, if I run the code below I get the same error while doing the last line: <null> : catastrophic failure at character 7 basid = oRS.Fields("Assoc-NT-Account") hssid="" for i=0 to...
  17. sn0rg

    Display domain\user from SID (Exchange 55)

    Thanks tsuji, I'm using the code below, but the line in red crashes with <null> : catastrophic failure at character 7. Dim basid Const ADS_SID_RAW = 0 Const ADS_SID_HEXSTRING = 1 Const ADS_SID_SAM = 2 Const ADS_SID_UPN = 3 Const ADS_SID_SDDL = 4 const ADS_SID_WINNT_PATH = 5 const...
  18. sn0rg

    Display domain\user from SID (Exchange 55)

    I'm trying to audit our Exchange 55 environment as part of a migration (finally) to E2k3. One of the jobs I'm doing means I want to know what accounts are permissioned against mailboxes, so I'm using an LDAP query that returns the SID of Assoc-NT-Account. I've got ADsSecurity.dll installed...
  19. sn0rg

    Call a vbscript from inside HTML

    dm4ever, thats great - opened up a new world of possibilities there. Will have a good play around. Some of the scripts I want to run can take an hour to execute, so I want to see the HTML update dynamically. I assume I can find a way to do this in the HTA. As for the parameters, well, some...
  20. sn0rg

    Call a vbscript from inside HTML

    Err, I'm not very aware of what a HTA file is or does, or how and why I would do that? The modus operandi here is to execute a script, have it output the results in HTML, and place a button on that page which allows the operator to rerun the script using some variables captured during the first...

Part and Inventory Search

Back
Top