4,668 reputation
1749102
bio website security.stackexchange.com
location Florida
age 32
visits member for 4 years, 1 month
seen 13 hours ago

I'm not the droid you're looking for.


Sep
23
comment Managing a drive - searching for files that are rarely in use (so I can delete them for space)
@RubenBaden Change C:\*path* to the network path you want searched. Example: \\FileServer\ShareName.
Sep
23
comment Way to list and cat all files that contain string X in powershell
@musher That's happening because, by default, Select-String returns all lines that match what you're looking for. Using the -Quiet parameter avoids that, and instead returns a simple Boolean value. The script in my answer also avoids the issue by using Select-String as part of another matching condition instead of actually taking the output directly.
Sep
23
comment Powershell script to open a number of files located inside subdirectories
@val I also suggest you try using PowerShell's built-in help functionality whenever you're having trouble with a command. The cmdlet is Get-Help. (Example: Get-Help Invoke-Item) Depending on what version of PowerShell you're using, you may need to Update-Help first.
Sep
23
comment Managing a drive - searching for files that are rarely in use (so I can delete them for space)
@RubenBaden Copy/paste.
Sep
23
comment Deleting all files that do not match a certain pattern - Windows command line
Note: PowerShell comes with Win 7/8. For Windows XP or Vista, you need to download and install it.
Sep
23
comment Deleting all files that do not match a certain pattern - Windows command line
From the CMD prompt, this should work: PowerShell.exe -Command "&{Remove-Item C:\MyFolder\* -Exclude '*.jpg'}"
Sep
23
comment how to boot without power button
Got a warranty? Send that sucker in before it expires and you're stuck with a broken power button for life!
Sep
23
comment how to boot without power button
Great idea... until the laptop runs out of power and shuts down completely one day.
Sep
23
comment Managing a drive - searching for files that are rarely in use (so I can delete them for space)
Nice job on the calculated value for Kbytes, too. I didn't realize you could do that.
Sep
23
comment Managing a drive - searching for files that are rarely in use (so I can delete them for space)
I'd suggest just dropping this on the PowerShell console, instead of running it as a PS1. Saves the hassle of having to work around ExecutionPolicy and such. I like the addition of Export-CSV!
Sep
23
comment Full permissions on folder when remoted in, but read only through the network
If your computer is not on the same domain, are you really supposed to be copying files from that server to your computer or vice-versa? Sounds like you may be trying to circumvent some corporate policy here.
Sep
23
comment Way to list and cat all files that contain string X in powershell
What kinds of files are these?
Sep
23
comment Way to list and cat all files that contain string X in powershell
Are you wanting the whole file contents, or just the lines containing the string? Also, what kind of files are these?
Sep
21
comment Run a command in a batch file on the system clock
Not sure if batch is really good for this. How do you feel about PowerShell?
Sep
19
comment Auto numbering based on repeating cells
It doesn't appear that your submissions have any naming or numbering system that can be used to identify duplicates. Is there something missing here?
Sep
16
comment DNS look up fail
...That will help you isolate the problem, to determine if it's due to your WiFi or other LAN components or something your ISP manages. If the first external device is the only one that drops, it's something on your ISP's network. If anything else drops, it's something on your network (though it might be the modem, which is usually the ISP's device - up to you to know what's what). If nothing drops, it could still be on your ISP's network but may be somewhere external to them - still, call your ISP.
Sep
16
comment DNS look up fail
May not be a Wi-Fi issue. Quite possibly a LAN/ISP issue. Run a traceroute to some external site (e.g.: Google). Check your router's configuration to find the default gateway. If the gateway is your cable/DSL modem, check that device to get its gateway. Essentially, you need to determine the first external device along the path to the Internet. Then, run a continuous ping against that device and all other devices between it and your system. When the Internet connection drops, see which ones aren't responding.
Sep
16
comment Make all files and directories read-only
@Ƭᴇcʜιᴇ007 is right, that copy operations will generally carry over the existing attributes. So, your only recourse is really to fix the attributes afterward. Should be relatively easy to do with PowerShell. Doesn't seem quite dead-simple, but shouldn't be too hard after a bit of Googling & testing either. Once you've got that down, you can even include it in a script that does the copy operation as well.
Sep
16
comment Force a single USB 3.0 port to work as USB 2.0
@RobinHood That's an all-or-none. The OP wants to pick and choose.
Sep
15
comment Preferred address not being updated/broadcast
You still haven't specified the OS on your client machine. If using Windows, have you tried the following from an elevated command prompt? ipconfig /flushdns Also, have you double-checked for any mappings in your hosts file?