Leveraging Citrix XenServer Tools

Watch out! This tutorial is over 6 years old. Please keep this in mind as some code snippets provided may no longer work or need modification to work on current systems.

Ideally, you should use the “Quick Instances” and other VM templates provided by our Xen Orchestra Dashboard when creating virtual servers for your project. These have been optimised with tools and drivers designed to get the best performance from your virtual machine, and to access advanced features such as safe shutdown in the event of power outage. But what if your VM was built from scratch, can you still access these tools?

Continue reading

How To Configure DHCP Server 2016 Filters

Watch out! This tutorial is over 6 years old. Please keep this in mind as some code snippets provided may no longer work or need modification to work on current systems.

DHCP Filters are primarily used to further shield an infrastructure by allowing or denying specific clients based on their MAC addresses. Setting up DHCP Filters is quite simple and works at the server level, not at Scope level.

Continue reading

Using Xen Orchestra to create Virtual Machines

Watch out! This tutorial is over 7 years old. Please keep this in mind as some code snippets provided may no longer work or need modification to work on current systems.

Using VirtualBox, HyperV or similar in the labs is a great way to fire up Virtual Machines. However, this method pretty much ties you to that lab machine, unless you are willing to do a (pretty big) export/import of your VM on a regular basis… not very realistic. What if you could access your VMs from anywhere in the college… or even outside… using just a browser? Well now you can!

Continue reading

GIMP as a Photoshop Alternative

Watch out! This tutorial is over 7 years old. Please keep this in mind as some code snippets provided may no longer work or need modification to work on current systems.

For those of you who are unaware of GIMP, here is how the software describes itself:

GIMP is the GNU Image Manipulation Program. It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.

Continue reading

Hello World in C#

Watch out! This tutorial is over 8 years old. Please keep this in mind as some code snippets provided may no longer work or need modification to work on current systems.

This is how you would display “Hello World” in C#.

public class HelloWorld
{
   public static void Main()
   {
      System.Console.WriteLine("Hello World!");
   }
}

Hello World in Visual Basic .NET

Watch out! This tutorial is over 8 years old. Please keep this in mind as some code snippets provided may no longer work or need modification to work on current systems.

This is how you would display “Hello World” in Visual Basic.

' Allow easy reference to the System namespace classes.
Imports System

' This module houses the application's entry point.
Public Module modmain
   ' Main is the application's entry point.
   Sub Main()
     ' Write text to the console.
     Console.WriteLine ("Hello World using Visual Basic!")
   End Sub
End Module

The command line for compiling the program is the following:

vbc.exe /t:exe /debug+ /optionstrict+ /out:.\HelloVB.exe HelloWorld.vb

In the previous line, /out specifies the output file, and /t indicates the target type.

Hello World in PowerShell

Watch out! This tutorial is over 8 years old. Please keep this in mind as some code snippets provided may no longer work or need modification to work on current systems.

This is how you would display “Hello World” in PowerShell.

Note: PowerShell commands also have the ability to be run in a script with the .ps1 extension but running scripts are disabled by default for security purposes. Firstly, you will need to set the Execution Policy. The cmdlet Get-ExecutionPolicy will show you that the initial policy is set to ‘Restricted’. This will prevent scripts from running. You can change it with the Set-ExecutionPolicy cmdlet. There are four options Restricted, Remote-signed, Signed and Unrestricted. We recommend Remote-Signed as it will allow you to run the scripts that you have created locally and still keep your machine secure.

So, just type

Set-ExecutionPolicy RemoteSigned

Now you can use notepad to create your first script. In Notepad type:

Write-Host "Hello World"

This will need to be saved in a file called something like HelloWorld.ps1.

Then from a PowerShell console type

.\HelloWorld.ps1

The reason you need the .\ is because a PowerShell security feature ensures that you are targeting a specific script in a specific location,. And that’s all there is to it.