Search found 15436 matches
- Mon Feb 08, 2010 11:46 pm
- Forum: VBScript
- Topic: VBScript to check Web Proxy
- Replies: 10
- Views: 16449
VBScript to check Web Proxy
What you are trying to do won't work. It is not possible to do this using IE. You must use the HTML object. You could also use the NET WEbCLient from PowerShell. If you gewt permisions failures from the object load then you have a broken DCOM or MSXML subsystem which would have to be fixed first. Po...
- Mon Feb 08, 2010 9:02 am
- Forum: PowerShell
- Topic: Common Issues?
- Replies: 4
- Views: 1429
Common Issues?
Should be:
dir 'c:program files' |where{$_.Attributes -eq 'Directory'}|%{"$($_.Fullname)"}
dir 'c:program files' |where{$_.Attributes -eq 'Directory'}|%{"$($_.Fullname)"}
- Mon Feb 08, 2010 8:50 am
- Forum: PowerShell
- Topic: Common Issues?
- Replies: 4
- Views: 1429
Common Issues?
Yes. YOu can force a collection or array but it is not usually needed. WHen you do a slect-object you are returning a subset of properties. This changes nothing. You cannot suscript in your case as it will never work the way you are doing it even with a collection. In case you want a trailing slash ...
- Sun Feb 07, 2010 11:14 pm
- Forum: VBScript
- Topic: VBScript to check Web Proxy
- Replies: 10
- Views: 16449
VBScript to check Web Proxy
This accesses a page that doesn't exist and returns the status code. sURL="http://www.scriptinganswers.com/test.aspx" Set oXml=CreateObject("Microsoft.XMLHTTP") oXml.Open "Get", sURL, False oXml.Send "" wscript.echo "getting " & sURL WScript.Echo...
- Sat Feb 06, 2010 3:36 am
- Forum: PowerShell
- Topic: Capitalise words in a string
- Replies: 4
- Views: 17376
Capitalise words in a string
A one line equivalent using static methods off of teh type: [regex]::Replace("test.one.two.three.four","b[a-z]",{($args[0].ToString()).ToUpper()}) Or in a pipeline: $lines = "test one","of two tests","with four lines","of text","or may...
- Fri Feb 05, 2010 4:11 am
- Forum: PowerShell
- Topic: Capitalise words in a string
- Replies: 4
- Views: 17376
Capitalise words in a string
Ok - you win. Taa! Daa! Will the real RegEx please stand up..... Drum roll... More drums roll. Throat clearing. $str = "test.one.two.three.four" $regex=[regex]"b[a-z]" $regex.Replace($str,{($args[0].ToString()).ToUpper()}) Do you want teh instuctions that go with it or fo you see...
- Fri Feb 05, 2010 3:28 am
- Forum: PowerShell
- Topic: Capitalise words in a string
- Replies: 4
- Views: 17376
Capitalise words in a string
Here is a quick and dirty way to do it: $str = "test.one.two.three.four"$str = $str -replace "ba","A"$str = $str -replace "bb","B"$str = $str -replace "bc","C"$str = $str -replace "bd","D"$str = $str -replace &...
- Fri Feb 05, 2010 1:41 am
- Forum: PowerShell
- Topic: Start-Job with -Credential
- Replies: 2
- Views: 2912
Start-Job with -Credential
Works fine for me on XP and WS2003.
I suspect the account you are using doesn't have permissions to run job or to access the service. Try it will the local admin account.
I suspect the account you are using doesn't have permissions to run job or to access the service. Try it will the local admin account.
- Thu Feb 04, 2010 9:07 am
- Forum: VBScript
- Topic: objshell.run using variables that have spaces
- Replies: 7
- Views: 6700
objshell.run using variables that have spaces
Nope - sorry - no future. We haven't invented time travel yet. Check back next week. Ras is still working on it.
- Thu Feb 04, 2010 7:39 am
- Forum: VBScript
- Topic: objshell.run using variables that have spaces
- Replies: 7
- Views: 6700
objshell.run using variables that have spaces
To esacpe a quote in a string we use another quote. This is a string conttining one quote - """" - notice that there are four quotes. One quote opens the string. Two quotes create a quote iwthing the string and the final quote closes the string. """" say open ...