Have I mentioned how awesome Powershell is? Let me show you how awesome. Real Life Scenario I need to change 300 something computers/servers to where the Deny Access from the network includes three users. Well that’s simple- there is a group policy item for that! Perfect..however sometimes you may not have the appropriate rights to [...]
Archive for February, 2012
Automation in Powershell using ntrights
Posted: 29th February 2012 by Ben in For the TechnicalTags: group policy, ntrights, powershell, SeDenyNetworkLogonRight, using powershell and ntrights
Copy-Item from: to: The Paranoid Powershell way with -whatif
Posted: 28th February 2012 by Ben in For the ForumsI am a paranoid person, maybe careful. Whatever the case may be: I don’t like mistakes. Fortunately, Powershell understands me- they enjoy my paranoia and play into it. Here is a good example: Real Life Example I need to copy several event logs between two different locations and ensure that they are deleted after I’ve [...]
It’s Friday- enjoy some beer! I may post a few, I’m cleaning out some of my scripts that I have acquired all over my desktop and such. I may even post a few old vbscripts I have laying around. Here is a good one on setting the event log actions for Overwriting as Needed: ####### [...]
Hi, For those who don’t know I went on and joined the bandwagon after advice from a friend and joined Twitter today. You can “follow” me if that’s what it’s called @awes0meMachine . Hopefully I did that right, I’m still new at this crap. Anyways- So say you have a crap ton of computers to [...]
Piping results of “For Each” loop to a variable- More Powershell
Posted: 14th February 2012 by Ben in For the TechnicalYou ever want to go inception on Powershell? You know go deeper and such? Here is a way to pipe results from something into another array of variable: function inception { $variable = gwmi win32_logicalDisk | where-object{$_.DriveType -eq “3″} foreach ($objItem in $variable) { $objItem.DeviceID } } $Selection = Inception This will help with a [...]
Here is the gist of the email: I need your help. I need a script that will read a text file of server names and query each of those servers event logs for event id ’10′. Can you please help? Well, hell yes I can!! People, I live for this: Send me more! $servers = [...]
Pissing you off? Yeah it is. Spice up your admin game, player. Go to: HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers NOTE: If you don’t have the “Layers” key, create it. I had to too. In this layers key, create a string value. The name of it will be the full path to your program (i.e c:\windows\system32\notepad.exe”) for the DATA [...]
Windows 7 Remove all network printers at once
Posted: 10th February 2012 by Ben in For the TechnicalAHHHH!! Windows 7 is awesome, but it lacks some cool functionality in some locations, at least it’s not the same and it is kind of like searching through the jungle to find resources about it. So I recently had to clear my printer cache of useless printers. No nonsense way to do it? wmic printer [...]
Not really any excuse, just as busy as normal I suppose. I’m going to try to start posting more but I’m pretty sure I’m the only one that reads this anyways! So here is a powershell tip of the day: Want to see what variables you have stored? Dir variable: This is a pretty neat [...]