Category: Powershell

  • Understand the Error of your ways.

    We all have different way to accomplish a task that is given to us. Sometimes we make mistakes and we are panicking to fix the errors better know as PowerShell error handling. Sometimes, knowing your mistakes is better than googling or trying to the answers. I’m comfortable with PowerShell, the errors are defined in a…

    ·
  • Storing Objects and Text.

    The best case scenario in my opinion of using variables is to leverage objects. I know some of the users prefer text only, but objects carry much more information, that can be logged or leveraged. Here is an example: Having computer’s name vs and object with multiple properties. The 3 last lines are are magic……

    ·
  • Using Object properties

    A lot of people see PowerShell as conversion tool, but it can do so much more. It can uninstall apps, inventory your applications. Rename files to a standard. Create shares, modify files and sessions and give an Administrator access to a computer without interrupting a session. It is built on .net/c# so it can do…

    ·
  • PowerShell Importing Data from Excel

    If you want to import Excel data I recommend giving the people who toke the time to develop this module Import-Excel. It can be Read about on the PSGallery here: https://www.powershellgallery.com/packages/ImportExcel/ After reading we will try to find the module using built im module package for powershell : “find-module importexcel” we can pipe this into…

  • Convert from OATime

    One of my favorite reasons I love PowerShell is because can tap into its programming roots for added power. I will demonstrate later in my post. Here is why: An OLE Automation date is implemented as a floating-point number whose integral component is the number of days before or after midnight, 30 December 1899, and…

    ·
  • Formatting dates from text or objects

    Ever imported data just to have a non readable date stamp? Get-date can take your text that is a date and turn it into something more readable. Take “15-FEB-20” for example. It’s not really a wildly used format. Pipe that to get-date like so: Then you can format your date to remove time and what…

  • Planning stops the issues from Spanning.

    Planning is vital to any infrastructure environment and when scripting or using PowerShell is by no means any different. when you add a high level plan/structure and use it as a map of to-dos and things you want to add later and things you would like to change. Failure to plan can mean data loss…

    ·
  • PowerShell: Convert .ps1 Files to .exe Files

    Have you ever dreamed of creating exe files out of your PowerShell scripts? If yes, read on. In this post I will show you how you can create exe … PowerShell: Convert .ps1 Files to .exe Files

    ·
  • Does anyone object?

    Writing scripts and functions we sometimes just want something to do or be one way with one purpose. I have mulled over things and re-coded tools to work with different things. The one thing I find to be the best in every situation is always script or code with objects in mind so that the…

    ·
  • Google cloud and the absence of PowerShell.

    I was looking into google cloud to explore some options for a client to leverage some automation elements and was very interested until I learned of the lack of PowerShell support. For the life of me I cannot understand Google’s purpose to neglect populations of individual platforms and still want professionals to take their platform…

    ·