Categories

A sample text widget

Etiam pulvinar consectetur dolor sed malesuada. Ut convallis euismod dolor nec pretium. Nunc ut tristique massa.

Nam sodales mi vitae dolor ullamcorper et vulputate enim accumsan. Morbi orci magna, tincidunt vitae molestie nec, molestie at mi. Nulla nulla lorem, suscipit in posuere in, interdum non magna.

How to Shutdown, Restart, Log off your computer with VB.NET or C#

This is extremely easy using VB.NET or C# (pronounced C sharp) and the built in windows EXE file shutdown.exe. To shutdown, restart, or log off your computer is as simple as entering 1 line into your program, it just so happens that the 1 line is identical whether you’re using VB.NET or C#. Continue reading How to Shutdown, Restart, Log off your computer with VB.NET or C#

How to Create Message Box Pop Ups in VB.NET

Creating different types of messages boxes in Visual Basic is a simple one line statement. I’m going to run through how to create several different types of message boxes in this tutorial, including OK Only, OK/Cancel, Abort/Retry/Ignore, and a Critical message box. Continue reading How to Create Message Box Pop Ups in VB.NET

Combine or Join Two Text Files Using PowerShell

Merging files together, or to a seperate file, is a snap with PowerShell using the Get-Content cmdlet. If you’ve never used the Add-Content cmdlet, I would suggest first reading my other article Append Text to a File Using Add-Content. The first thing we need to do is identify our two files, in my case I’ll be using file1.log and file2.log. In the first example, I append all the text of file2.log into the end of file1.log. In the second example, I’ll create a completely new file and dump the contents of both the files into the newly created file. In the last example, I’ll add the current date to the filename of a completly new log file. Continue reading Combine or Join Two Text Files Using PowerShell

Add or Map a Custom Hostnames to IP Address without a DNS Server

There’s been several times where I had an Apache server running locally on my computer as a development (or dev) server. Now if this is on my home network, or if your system administrator won’t give you your own custom host name then you have to go the DIY (do it yourself) route. But, often times, I have to hard code host names, or I need several different websites hosted on my personal machine. Well that’s where the hosts file comes into play. Continue reading Add or Map a Custom Hostnames to IP Address without a DNS Server

Retrieve File Permissions using Get-Acl with PowerShell

Retrieving the owner and permissions of a file, folders and even registry keys is a breeze with PowerShell’s Get-Acl cmdlet. Let’s try checking to see who has access to to the C:\Documents and Settings\Administrator folder. Continue reading Retrieve File Permissions using Get-Acl with PowerShell

How to Ping a Computer using PowerShell

Pinging a computer is really simple, and of course since this is PowerShell we don’t want to use something as primitive as ping.exe, we want to use .NET and take advantage of all the method calls and filters. Continue reading How to Ping a Computer using PowerShell

Using the System.Environment Class in PowerShell

The Environment class has a huge array of information and accessing this information is very simple, I’m going to try and give a whole bunch of one line examples of how to do this using PowerShell. Continue reading Using the System.Environment Class in PowerShell

Send eMail and SMS Text Messages with PowerShell

Thanks to the .NET library sending emails with PowerShell is surprisingly very simple! One thing to remember is line breaks, when you need a new line, make sure to use the escape characters `n . In the first example, I’ll send just a regular email, in the second I’ll send a SMS text message. Continue reading Send eMail and SMS Text Messages with PowerShell

Check If File Exists with VB.NET

I was creating an application in Visual Basic the other day and I couldn’t remember how to check to see if a file exists, so I thought I would do a quick example to see if a file exitsts. If the file exists, the program will continue on, however, if the file doesn’t exist you will get a message box saying that the file does not exist, and the application will exit. Continue reading Check If File Exists with VB.NET

Append Text to a File Using Add-Content in PowerShell

Here’s a quick tutorial on how to add text to the end of a text file using the Add-Content or its alias ac in PowerShell. In this first example let’s add "This is the last line" to the end of a file. Continue reading Append Text to a File Using Add-Content in PowerShell