PowerShell:- Datatype – Array – Declaration & Initialization – Bug ? – Patrick Meinecke Response

Background A quick feedback on our last post.   Referenced Work PowerShell:- Datatype – Array – Declaration & Initialization Link Source Code Control GitLab PowerShell - Array - Declaration & Initialization - Sample - nameList Link Bug Report Microsoft PowerShell An Uninitialized declared array leads to string concatenation #17313 Link Feedback Patrick Meinecke ( SeeminglyScience … Continue reading PowerShell:- Datatype – Array – Declaration & Initialization – Bug ? – Patrick Meinecke Response

PowerShell:- Datatype – Array – Declaration & Initialization

Background In this post let us consider how to declare, initialize, populate, and iterate an array. Introduction We have a few avenues for declaring an Array in PowerShell. Our options are:- PowerShell @() String Array .Net System.Collections.ArrayList Script Outline Array Declare Array Declare And Initialized An Array [string[]]$nameListInitialized = $null; Declare An Array [string[]]$nameListInitialized; Populate … Continue reading PowerShell:- Datatype – Array – Declaration & Initialization

Powershell:- Function – Invocation – Error – ParameterArgumentTransformationError

Background Last evening I wanted to make a function out of a piece of Powershell Code Block, but ran into an error. Let us quickly go over the error.   Script Code   Error Error - Image Error - Text Error - Explanation The error reads:- Cannot process argument transformation on parameter 'ch'. Cannot convert … Continue reading Powershell:- Function – Invocation – Error – ParameterArgumentTransformationError

Powershell:- Get Machine Name

Background I needed to confirm a machine name. It is easy to do so via accessing the machine and running a few system commands. But, want to do so programmatically, as well. Choices Here are some of the options for getting a machine name in PowerShell. Get Computer Name Using Environment Variables .Net Class System.Environment … Continue reading Powershell:- Get Machine Name

Programming Languages:- Repeat Characters

Background When programming one will have to use various datatypes and consult API for each of the data types.   DataTypes Number/Integer Arithmetic String Concatenation Length Character Repeat   Character For instance, if we will like to place an underline against a title, we will get the length of the title, and repeat the underline … Continue reading Programming Languages:- Repeat Characters

Powershell:- String Across Multiple Lines

Background While programming, occasionally there will be a need to have string contents that exceed a single line. In this post, we will discuss some of the tools that Powershell offers.   Outline Here String String Concatenation Using Plus Sign   Options Here String Basic Code   Output Image Text   with whitespace before the … Continue reading Powershell:- String Across Multiple Lines

Windows Powershell ISE:- File Encoding

Background Last week I was trying to get a Powershell code to work. As we have different "environments" this particular script needs to work on at least one machine in each distinct environment.   Command File The script creates extracts each time it runs. I really did not want those extracts to be saved all … Continue reading Windows Powershell ISE:- File Encoding

Powershell – Install-PackageProvider – NuGet – Error – “WARNING: MSG:UnableToDownload”

Background Tried installing the SQLServer module for Powershell, but ran into a stumbling error.   Error Recreation The command for installing the SQLServer module for Powershell is simple enough. It goes:- Our error reads:- Errors Error Message - WARNING: MSG:UnableToDownload «https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409» «» Error Message - Image Error Message - Textual   Error Explanation Install-Module : … Continue reading Powershell – Install-PackageProvider – NuGet – Error – “WARNING: MSG:UnableToDownload”

Powershell:- Modules – sqlServer – Install

Background A few posts back spoke about trying to get a Vendor Script working. We will need to install the Powershell SQLServer module, as well.   Timeline Win OS:- IIS Management Tools ( web-mgmt-console ) install Link   Errors Here is the error message. Error Message - "The SQLServer powershell is not installed" Image Textual … Continue reading Powershell:- Modules – sqlServer – Install

Win OS:- IIS Management Tools ( web-mgmt-console ) install

Background Earlier today I had a bit of a hard time trying to run one of the scripts that our vendor wanted us to run. Errors Here is the error message. Error Message - "IIS Management Tools is not installed" Image Textual TroubleShooting Read through the error message Let us make sure that we understand … Continue reading Win OS:- IIS Management Tools ( web-mgmt-console ) install