In this article, I demonstrate how to test network connectivity for a list of computer names or IP addresses using PowerShell. Each target system is tested for ICMP reachability (ping) and TCP connectivity on port 445, which is commonly used for SMB.
I will explore Enter-AzVM cmdlet in this blog article which is a part of az.ssh module and establishes a connection over SSH port 22. In this article I will show how to setup windows server to accept SSH connection. Before you start, make sure you've using below commands.:
In this article I will explore running commands remotely on Azure VM without login and this doesn't require full RDP session. This is very useful feature if some information need to fetched or any configuration need to be done without much efforts. If you check on Azure portal navigate to Virtual Ma…
Enumeration is the action of mentioning a number of things one by one, often to count them or describe them but it has specific meanings in computer science, data types like enum for named constants.
In the PowerShell to list the enumeration information for a parameter, you will need to use elem…
This simple PowerShell script clones Nutanix Linux virtual machines. To use this script, first download and install the PowerShell cmdlets from Nutanix Prism Central. You can find the installed plugin folder under C:\Program Files(x86)\Nutanix folder. From there you can load plugins.
I recently received a task to rename a bunch of files by changing their numbering in the filename while working on a PowerShell DevOps project. I had multiple Markdown files with numbers at the start of their names, and I needed to change these numbers with the filename based on a mentioned in CSV f…
This article dives into the Test-TcpPort function, a compact script that resolves hostnames to IPs, pings for basic reachability, and tests port connectivity with a timeout. I will break down its mechanics in short. At its core, Test-TcpPort leverages .NET's System.Net and System.Net.Sockets namespa…
In this article, I will explore two PowerShell scripts that test network connectivity (Ping) and port availability (Port Query) on multiple computers. I will discuss the scripts, their differences, and how to use them effectively. First Script is used for Synchronous Network Testing. The first scrip…
While working with PowerShell Remoting (PSRemoting), I was able to successfully connect to a remote machine using Enter-PSSession, but any administrative command—such as resetting the local Administrator password—failed with:
After successfully configuring Microsoft PowerShell PSRemoting, I was able to login with local Administrator user without any issue. But after creating another user, adding it to Administrators group then logging with it was throwing error message of Access is denied.
This is very simple and easy instructions to configure PowerShell PSRemoting WinRM on Windows system which is not joined into domain (Basically they are in workgroup). On the the first system login and and open PowerShell as administrator and Run below commands to configure PowerShell Remoting.
This PowerCLI GUI script I have written to audit VMware ESXi clusters high availability (HA) inside vCenter Server. This script validates below ideal configuration is defined on the cluster and tells me whether configuration is correct with green tick and non-compliant with red cross.
When sorting CSV data with PowerShell, I observed unexpected results, as shown in the screenshot below. The initial command, Import-Csv C:\Temp\Numberings.csv, shows that the numbers in the CSV are out of sequence. To sort these numbers, I used the simple pipeline command Sort-Object specifying the
This is another script I have written to encode and decode string for Terraform using PowerShell GUI. These scripts helps me in the live demonstrations and PowerPoint to client about infrastructure as a code. Once script is executed in PowerShell GUI, it looks like below, It helps to Base64 Encode g…
I was delivering few demos for Azure Application Gateway client side, I got information, there will be very limited Internet and only specific things will work in the given environment. In one of the demo I wanted to created few Self Signed SSL Certificates for Azure Application Gateway. In the demo…
To create a byte array in PowerShell, you can use several methods, depending on whether you want to initialize it with values, specify a size, or convert data like a string or file. The simplest method is to cast an array to the [byte[]] type.
As an IT administrator, managing devices in your organization can be a daunting task. With the help of Microsoft Graph and PowerShell, you can automate device management tasks and streamline your workflow. In this article, You can explore how to use PowerShell to connect to Microsoft Graph, retrieve…
This PowerShell script leverages the Microsoft Graph API to synchronize Intune MDM devices. A previous iteration of the script was limited to fetching and syncing only the first 1000 devices due to pagination. To overcome this, the updated script iterates through the @odata.nextLink property, allowi…
This PowerShell script demonstrates automated management and synchronization of devices with Microsoft Intune via Microsoft Graph API. Using client credentials to authenticate against Azure AD, it retrieves an OAuth 2.0 token and lists all managed devices in the environment for reporting purpose.
This script helps creating SSL Self Signed Certificates and Private/Public key using PowerShell. PowerShell has inbuilt cmdlet command New-SelfSignedCertificate which is used to create proper SSL certificate which doesn't require third party applications such as OpenSSL or similar. There are multipl…