Tag Archives: powershell
For some time now I’ve wanted to create text files with line numbers. An example of this could be: This can be useful if I want to use the line numbers to refer to. For example, having a text file … Continue reading
The following code can be used as a function template. I’ve found that using BEGIN, PROCESS and END blocks makes the function more structured and my life a lot easier.
$PSBoundParameters is one example of a PowerShell automatic variable. As the documentation tells us: … variables that store state information for PowerShell. These variables are created and maintained by PowerShell. Some basic examples of using this variable are as follows: … Continue reading
I often have the need to create numbered test files such as for example: myfile.txt.001 myfile.txt.002 : myfile.txt.099 or whatever the maximum numbered test file is. It doesn’t have to be 99 of course. In this example, I’m going to … Continue reading
The .NET Framework class Form represents a window or dialog box that makes up an application’s user interface. In other words this is how we can build a GUI interface to an application with forms and dialog boxes. The StartPosition property of … Continue reading
There may come a time when you want to display just a few lines from a text file. The following PowerShell code can be used to achieve this. The examples will be based upon a sample text file containing the … Continue reading