Close

PowerShell – Combine commands together using pipes

compare-object # similar to the diff command. but has a lot more feature for comparing tabular data. Hence can be used to compare # what is and is-not installed as well as versions for ordnance survey. ## Redirection Get-ChildItem | Out-File testfile.txt # This is the same as “ls -l=> testfile.txt” Get-ChildItem | Out-File testfile.txt […]

Read More

PowerShell – Running commands

There are different types of commands that you can run on the PowerShell Command line: cmdlet – Name for any powershell builtin command, e.g. get-service, set-location, get-childitem….etc aliases – these are nicknames for other commands. You can view a list of aliases using get-alias. It’s best to avoid aliases where possible. function – Small blocks […]

Read More

PowerShell – Using the builtin help system

Accessing the built-in help Powershell comes with a builtin help manual, which is really useful and is something you will rely on heavily. There are hundreds of commands at your disposal, you can view a whole list of them by running the get-command command: PS C:\Windows\system32=> Get-Command CommandType Name ModuleName ———– —- ———- Alias Begin-WebCommitDelay […]

Read More

What is PowerShell?

Powershell is the main command line utility for Microsofts Windows Operating Systems. It comes pre-installed with Windows 7 and onwards. As well as Windows Server 2008 and onwards. It is immensely powerfull and is regularly used my system administrators to automate repetitive windows tasks. To open up the Powershell Console, go to: start -> all […]

Read More

c# – Delegates

What if you want the output of one method, to be treated as an input parameter for another method? i.e. you want to do something similar to linux bash piping in the world of c#, but instead of piping from one command, to another, you are piping from one method to another. Here is an […]

Read More

c# – Abstract Classes

When you organise your code into parent and child classes (in order to fully utilize the concept of inheritance in order to cut down code duplication), you may end up with parent classes, that are just there for the purpose of holding base-class code. The class itself isn’t needed for instantiating objects. These types of […]

Read More

c# – The Interface

We previously came across the concept of inheritance, which is where a child class (implicitly) inherits the properties and methods from it’s parent class. However what if you don’t want a class to inherit methods and properties, but we do want class to have certain members (properties and methods) with particular names. That’s where “interfaces” […]

Read More

c# – Intro to Exceptions

Sometimes you might have a block of “dangerous code” in your program. These are code that could fail. When these blocks of “dangerous codes” fail, it will stop the program straight, and won’t attempt to carry on any further, and instead it will just output an error message. However sometimes you might want your program […]

Read More

c# – Using the “Null” object

Sometimes a method will ask for an input parameter, but that input parameter is optional. In these situation you can still trigger the method, without passing an input parameter, and instead pass in a “null” object in it’s place: [csharp] using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ExceptionExample { class Program […]

Read More