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)...
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}...
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...
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...
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
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...
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...
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, _...
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.
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...
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...
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)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.