379 reputation
1624
bio website stackexchange.com/users/…
location England
age 38
visits member for 2 years, 1 month
seen 15 hours ago

profile for SteB on Stack Exchange, a network of free, community-driven Q&A sites
Disclaimer: I like to wait at least an hour before accepting an answer.

Software developer, sci-fi and film/TV fan working on LOB apps using Delphi, T-SQL, PHP, HTML, CSS and Powershell.

I like to relax with good films, TV or books including: The Matrix, Underworld, Stargate, Buffy, The West Wing, and works by Joss Whedon, Ridley Scott, David Weber or Peter F. Hamilton.

In my spare time I assist with the browser-based football game Football Glory.


Dec
26
accepted VLAN security compared to DMZ
Dec
25
asked VLAN security compared to DMZ
Dec
13
accepted Protect foreach loop when empty list
Dec
13
comment Protect foreach loop when empty list
I've used the first one (it's easier to understand), I couldn't get the second one to work (I was probably doing something wrong).
Dec
13
comment Protect foreach loop when empty list
@Dan - Doh, can't believe I didn't spot that, thanks.
Dec
13
answered Protect foreach loop when empty list
Dec
13
comment Protect foreach loop when empty list
@Dan - Tried both ($backups > 0) and (@($backups).count -gt 0), but neither work as expected when there are no files.
Dec
13
comment Protect foreach loop when empty list
$count = @($backups).count; almost works, but when there are no files if f($count -gt 0) is true!
Dec
13
comment Protect foreach loop when empty list
Adding if ($backups.count -gt 0) stops the loop executing even when there's 1 item in $backups. $backups.count even on it's own doesn't output anything.
Dec
13
asked Protect foreach loop when empty list
Dec
12
accepted Powershell enters foreach loop with null object
Dec
12
comment Powershell enters foreach loop with null object
It appears that I'm only running v2 (I used $psversiontable), I feel an upgrade coming on :) Thanks for your help.
Dec
11
comment Powershell enters foreach loop with null object
Yes, I am using PowerGUI. My powershell.exe in WindowsPowerShell/v1.0 is 6.1.7600.16385. $PSVersionTable gives CLRVersion: 4.0.30319.17929 and WSManStackVersion: 2.0
Dec
11
comment Powershell enters foreach loop with null object
I get an output of "Hi" and my $Host.Version gives 3.2.0.2237
Dec
11
asked Powershell enters foreach loop with null object
Dec
11
revised Zipping only files using powershell
added 60 characters in body
Dec
10
answered Zipping only files using powershell
Dec
10
accepted Zipping only files using powershell
Dec
10
comment Zipping only files using powershell
Sorry, it was my fault, I'd accidentally changed it to Test-Path-Path! That works great now.
Dec
10
comment Zipping only files using powershell
That looked good, but when I tried it nothing happened. I didn't get a zip file but I also didn't get any errors. Could you expand on what the Set-Content and ReadOnly = false lines do?