Tag: Basics
-
JSCAPE Database Connection String
Like much enterprise software, Redwood’s JSCAPE has its quirks. A glaring issue is its documentation and flexibility, but it’s a robust solution for managed file transfer. It solves the 25 mb problem with instant anonymous drop zone. It’s also smart enough to detect new files on remote servers so you only download unique uploads or… Read more
-
Azure Roles, Identity, and Governance
It’s not uncommon when supporting growing businesses, for roles and standards to be put in place. Standards make life easy for the business to interact with IT, as well as making IT services much easier to fulfill. I’m a meticulous person. I believe the world is plainly black-and-white. Regarding roles, each user of job title… Read more
-
Measure-Object: Quantifying data within PowerShell
With as useful as Measure-Object is, I’m surprised you don’t see more about this cmdlet online. While you can just type math into PowerShell and it will compute, cmdlets allow for the calculation of sums, averages, standard deviations, and more. Quantifying Numbers with Measure-Object This cmdlet can compute various statistical measures for numerical data in… Read more
-
Remote Command Execution with PowerShell
PowerShell can become a lot more fun when you can effortlessly remote into nearly every system to manage them. There are a handful of ways this can be done. First, you can have an interactive session open with another device. If you want to perform repeatable work, you can make a script that is run… Read more
-
Using Invoke-WebRequest and APIs for More Powerful PowerShell
Invoke-WebRequest is a tool that many in IT shy away from. It is essentially curl for Windows, which you can use as an alias if you’d like. I have worked with a small number of APIs, and I am passingly familiar with web protocols on my side of the fence. Since I work in automation,… Read more
-
Log Searching Quickly with PowerShell
Who would have thought log searching, one of the most soul crushing activities could be scripted? You’ll never “Clear Log” instead of “Clear Filter” in the GUI again! Log Searching Syntax There are a lot of ways to do this that very slightly from each other. The least confusing way I can think of to… Read more
-
Hash Tables in PowerShell for Quick Data Management
Hash tables in PowerShell (also known as Dictionaries) are lists of key-value pairs. They can be used to quickly retrieve or store data. Keep in mind that you can only order a hash table when initializing it. You cannot sort hash table after it’s been created. The alternative is creating an ordered hash table based… Read more
-
Using Switch in PowerShell for Better Comparisons
A PowerShell Switch is for when you’ve ascended beyond simple if statements and crave more power. The benefit allows for many conditionals in a small code block. This generally will be used with strings or integers but can work on many data types and even files. Switch Parameters Without parameters, the command will evaluate using… Read more
-
Using Subcommands in PowerShell for Simple Inline Queries
Subcommands in PowerShell are essentially an expression or query used in line to avoid having to define a new variable or break up a string. For instance, instead of: We can do this: Alternatively, we can also perform operations on variables without changing the variable data. This falls more in line with “command-line scripting” in… Read more
-
Functions in PowerShell: Building Better Commands
Functions are repeatable steps that you can use as commands. Is there a something you need to do but no module to get it from? You’re in luck, because you can create your own! Functions, like in arithmetic, are steps give output. Let’s say that I wanted to make a function that will tell me… Read more
-
Flow Control, Logic and Loops in PowerShell for Better Scripting
Flow control is an important step in your PowerShell journey. When I was in school, there was an entire unit on conditional statements and a separate one on loops. It’s not really that bad, and easy enough to combine into one long post. Conditional Statements Conditional statements fire off if something is true or false.… Read more
-
Using Expressions in PowerShell to Compare Values
A comparison is an expression that results in True or False based on two values. There are many operators, and they can be compare many different types of values. Comparison Operator Definition -eq Equal to -ne Not equal to -gt Greater than -ge Greater than or equal to -lt Less than -le Less than or… Read more
-
Variables Definition in PowerShell and Useful Commands
Variables in PowerShell are value that can change. You can identify them easily, as they begin with a dollar sign, and they are able to hold strings, integers, arrays, Booleans, or nothing at all. Definition To begin with, there are two ways to assign a variable. First, you can use the equals sign (=). This… Read more
-
How to Use Cmdlets in PowerShell
A cmdlet is a command in PowerShell. When you type cmdlets in the terminal or code editor, you’ll see a glow. For me, it’s yellow. Anything that color is something you’re telling the computer to do. To start, Cmdlets are made of two attributes, a verb and a noun. Usually, you’ll see the verbs Get… Read more
-
PowerShell: Automation for the IT World
Those in IT Infrastructure and Operations love using PowerShell. If you’re not familiar with it, you’ve probably met someone that uses it. Maybe the admin finally looks at the computer, opens a prompt, and types something which finally fixes that window popping up. Or a coworker takes a spreadsheet, runs a program and makes a… Read more