7th November 2008, 01:28 pm
One of my favorite things to do as an administrator is to open Domain Controller Security Event Logs and manually thumb through them looking for evil doers… NOT! Opening, filtering, and sorting entries is as exciting as watching paint dry, well actually paint dries quicker…
PowerShell introduced a cool cmdlet called Get-EventLog… Hold on I know what you are thinking! You've used Get-EventLog and it only gathers information from the local computer, and your right! Because of this limitation some of you have opted to use WMI to connect to remote logs. Since PowerShell utilizes .NET, how do we use .NET to gather Event log info from a remote computer? If you would like to learn how to use PowerShell and .NET to remotely connect to your Domain Controller and gather information from the security log keep reading on…
Continue reading ‘Enumerate The Remote Event Log with .NET’ »
9th October 2008, 10:00 am
I had perviously provided a download link for the VMware VI Toolkit within the "PowerShell Downloads" section on this site. To be quite honest the download statistics have been minimal at best. My thoughts were that since this site caters to those whom are learning PowerShell, the readers of this site may not yet have been exposed to virtulization technologies. The way the industry is heading you will… And VMware ESX is most likley the product you will be working with.
While putting together my schedule for VMworld there it was, "Managing VMware with PowerShell." I didn't know what to expect? How well is PowerShell being received as a management tool for VM? Seems kind of strange that a Microsoft technology is utilized to manage a non-Microsoft environment, but that is exactly what's happening here. I got to the break-out session early and was able to get a good seat. By the time the presentation began it was a packed house, they were turning folks away at the door. Clearly those working with VMware were interested in how PowerShell was going to make administration eaiser and I was one of them…
Continue reading ‘PowerShell Big Hit at VMworld 2008’ »
14th August 2008, 10:11 am
I received a request from a colleague asking if I had a script that would poll a file and send him an email if a file's size became larger than 2k. Apparently they are using an application that was written by a friend-of-a-friend who is no longer in the Software Business so there is no support for the product. How does this kind of stuff happen???
My reaction was wow! What happens when the file grows larger than 2k(yes you are reading this correctly, 2k)? My colleague replied, "The app slows down, sometimes locks up, and users start to complain. Our course of action is to delete the file, the application regenerates it and we start all over again. Attempting to be pro-active, we periodically check the file size by manually browsing the file properties. Most of the time we are able to catch and fix the problem before the users are affected. It's just the times we miss all hell breaks loose." I said, "I can help you with that issue…"
Continue reading ‘How to Send Alerts to Your Mailbox using .NET’ »
8th July 2008, 10:44 am
I've been searching for a PowerShell editor to free me from writing my code in notepad. I've tried a number of them on the market, Primal Script by far was the best! Yet, my 45-day trial was over and my boss is dragging his feet with a purchase. So where do I turn?
Shell Tools was nice, yet another 45-day trial (they extended it another 45-days) yet eventually leading to a purchase. Don't get me wrong I'm not a tight-wad I'm a Tech (o.k. same thing…). I just wanted a simple editor which I found in the last place I thought I would ever look… A GUI Tool for PowerShell.
PowerShell Pro! adopted the philosophy of "teach an man person to fish…" so you would think that promoting a tool that "does the work for you" would be sacrilegious. Not being close minded, I ventured a download and began working with the tool. There were two major findings that prompted me to write this article…
Continue reading ‘Want a Free PowerShell Editor? No, Really it’s Free…’ »
17th June 2008, 05:54 pm
I was going through the mail-bag the other day and noticed the same question kept popping up. "How do I know how much memory is in my system?" I thought to myself, that question is too easy to answer and the PowerShell solution has to be available on at least a few thousand websites. But, in my haste to get through the mail the actual question was not sinking into my thick skull…
I was reading "How much memory" not "How much memory is installed in my system and how many DIMM slots do I have available?" Great question! Wouldn't it be nice to run a PowerShell Script that would give you the amount of RAM installed and the available slots in the system. How many of you still shut the server down, open the box, and inventory the DIMM count? Well those days are over…
Continue reading ‘How to become a DIMM-wit!’ »
5th March 2008, 01:59 pm
I enjoy the Microsoft PowerShell Script Repository and all the examples provided. I have used many of the examples within PowerShell Tutorials and Articles (including this one) written on this site. However, there is a problem with using the "Write-Host" cmdlet that has frustrated myself along with many others; I have the hate-mail to prove it!
So what is the issue that is being discussed here? You will want to read on…
Continue reading ‘A Problem with the Microsoft Script Repository?’ »
8th February 2008, 09:20 am
Over the last couple of weeks I've been working on a 3 part tutorial for WMI. In my adventures to see what others have written about on the subject, I found a remarkable tool (actually a .ps1 script) written by Marc van Orsouw aka "ThePowerShellGuy." This is a tool even Batman should have on his utility belt, it has gotten me out of a couple of jams…
Continue reading ‘WMI Explorer : Script-O-Matic for PowerShell’ »
10th January 2008, 10:55 am
I've written a few posts and a couple of tutorials that discuss connecting to remote machines. For example:
In each of these articles an array is used to connect to multiple remote computers. The procedure consists of placing computer names in a text file which is then read by the "Get-Content" cmdlet which creates the array.
I've received comments and emails asking how to query Active Directory for all the computer accounts. Well, here is how we do that…
Continue reading ‘How to retrieve a list of Computer Accounts from Active Directory’ »
9th January 2008, 11:59 am
DR. Tom Moreau posed the following question, "Is there a way to call a function that resides in a separate script, along the lines of Perl’s use statement? I don’t want to have to load each function script manually into the current PS session."
I said sure, take a look at my article on organizing script code and calling functions using dot sourcing.
Tom's response, "That’s close to what I’d like. Ideally, I’d like to refer to the script name just once and then refer to the functions therein as required. I’m wondering what to do if I have a .PS1 script that contains multiple functions and I want to execute a specific function within that PS1 script."
What a great idea. To have a PowerShell script that contains multiple functions in which specific functions could be called from other scripts. How do we do this?
Continue reading ‘Why would I want to call a function that exists in a separate script?’ »