Search found 12093 matches

by jvierra
Mon Apr 11, 2011 3:36 am
Forum: VBScript
Topic: Seperating data from strings?
Replies: 2
Views: 546

Seperating data from strings?

Use InStr to locate a string inside of a string. http://msdn.microsoft.com/en-us/library/wybb344c(VS.85).aspx You could also use regular expression matching with RegExp. http://msdn.microsoft.com/en-us/library/yab2dx62(VS.85).aspx Brute force method str1 = "OK (30 msec)"   If Instr( str1, "OK") Then...
by jvierra
Sun Apr 10, 2011 6:28 pm
Forum: Windows PowerShell
Topic: Line breaks gone when inserting text into ISE
Replies: 2
Views: 449

Line breaks gone when inserting text into ISE

cat $filename | %{$psiSE.CurrentFile.Editor.InsertText("$_`n")}

by jvierra
Wed Apr 06, 2011 8:39 am
Forum: Windows PowerShell
Topic: Create global security groups from server names
Replies: 3
Views: 823

Create global security groups from server names

Too much code. It looks like VBScript. THis is all you need: (New-Object System.DirectoryServices.DirectorySearcher('OperatingSystem=Windows*Server*')).FindAll() |     ForEach-Object{      "$($_.Properties['name'])_A"     } Properties are case sensitive so the bit in red will only work if you use lo...
by jvierra
Wed Apr 06, 2011 2:05 am
Forum: VBScript
Topic: Need help with a Verification Script
Replies: 1
Views: 587

Need help with a Verification Script

In the following thread I posted two functions that return DCOM and WMI permissions.

http://www.scriptinganswers.com/forum2/ ... p?TID=4458
Unlike most other methods these functions can be used remotely by just specifying the computer name.
by jvierra
Tue Apr 05, 2011 7:57 pm
Forum: Windows PowerShell
Topic: using PropertyGrid with writable properties
Replies: 4
Views: 1265

using PropertyGrid with writable properties

I just thought that it might be good if you put together an example of you rimplementation and posted it in the 'Script Sharing' section. There are many reasons to use of the Property control in Powershell.
by jvierra
Tue Apr 05, 2011 5:01 am
Forum: VBScript
Topic: Unable to create object named MSWinsock.Winsock
Replies: 5
Views: 6122

Unable to create object named MSWinsock.Winsock

I found this Article winsock-fix-for-windows-7 I don't test it yet but i want to understand what this batch can do ? Thanks !! This has nothing to do with the MSWinsock control. They are unrelated issues. A control is an automation object. If the control is NOT installed it cannot be created. 'wins...
by jvierra
Tue Apr 05, 2011 3:18 am
Forum: VBScript
Topic: Unable to create object named MSWinsock.Winsock
Replies: 5
Views: 6122

Unable to create object named MSWinsock.Winsock

Sorry - I just realized that that object does not exist on Windows 7.

by jvierra
Tue Apr 05, 2011 3:12 am
Forum: VBScript
Topic: Unable to create object named MSWinsock.Winsock
Replies: 5
Views: 6122

Unable to create object named MSWinsock.Winsock

Are you running as a 32 bit session with VBS? I don't think you can instantiate this object from a 64 bit session.


by jvierra
Tue Apr 05, 2011 1:58 am
Forum: VBScript
Topic: Replacement script
Replies: 3
Views: 652

Replacement script

Sheet1.Cells.ClearContents