Category: PowerShell

PowerShell: How to pass multiple parameters into a function in PowerShell with 2 proven steps

PowerShell: How to pass multiple parameters into a function in PowerShell

Loading

How to pass multiple parameters into a function in PowerShell – In this post, I will show how to pass multiple parameters into a function in PowerShell coding. Addition of numbers function using PowerShell example: Function with multiple parameters PowerShell cls #The below sample function will accept numeric parameters and do the addtion. Function Add-Numbers()

Continue reading

Error exception handling in PowerShell – Try catch finally 3 blocks rules

Exception or Error handling in PowerShell -Try/Catch/Finally Block Example

Loading

Error exception handling in PowerShell – Try catch finally – In this post, we will show how we can handle the exception in PowerShell coding using the try/catch/finally block and how we can write the error or exception message into the log file. Error exception handling in PowerShell: Exception handling using try/catch/finally block PowerShell example Refer

Continue reading

Create log file in PowerShell in 2 proven steps

Using PowerShell create a log file

Loading

Create log file in PowerShell – In this post, I will show how to build or create a logging function in PowerShell in the PowerShell “.ps1” file directory. However, we can change to any directory wherever we wish – only we need to change the directory path. Create log file in PowerShell – how to

Continue reading

Using PowerShell create a folder if not exists – in 2 proven steps

Using PowerShell - Create a folder if not exists

Loading

Using PowerShell create a folder if not exists – in this post, I will show how to create a folder or directory if not exist in the given directory or path using PowerShell code or script. The below PowerShell code will create a folder with the name “LogFiles” in the .ps1 file root directory if

Continue reading

In 2 steps instantly upload files to SharePoint document library using PowerShell CSOM

Upload files to SharePoint document library using PowerShell - Demo

Loading

Upload files to SharePoint document library using PowerShell (SharePoint Online) – here in this post – I will show how we can upload multiple files or documents to SharePoint online document library using PowerShell CSOM programmatically from the given directory. Upload files to SharePoint document library using PowerShell CSOM Below is the list of files

Continue reading

Instantly in 2 steps encode and decode an URL using PowerShell coding

Encode and decode an URL using PowerShell coding

Loading

Encode and decode an URL using PowerShell – here in this post, I will show how to encode and decode the URL using PowerShell coding, and also we will learn how to decode a SharePoint list id (GUID) using the online tool. Introduction: Encode and decode an URL using PowerShell coding A website’s URL, also

Continue reading

How to Easily Download Files from SharePoint using PowerShell with date filter

Download files from SharePoint document library using PowerShell script

Loading

Download files from SharePoint Online document library using PowerShell: Here in this post, I will show how we can download files or documents from SharePoint Online document library using PowerShell CSOM script programmatically from the given date by passing the “From Date” and “To Date” to the query. Download files from SharePoint document library (download

Continue reading

Fastest way to create multiple items in a list using PowerShell CSOM – O365

SharePoint list item - Create multiple items in a list using PowerShell

Loading

Create multiple items in a list (SharePoint Online) using PowerShell – here in this post, I will show how to create multiple list items in SharePoint online list using the PowerShell CSOM code programmatically. Create multiple items in a list using PowerShell CSOM script in SharePoint Online (Which is the fastest way to create multiple

Continue reading

2 ways instantly PowerShell to send email from SharePoint Online

PowerShell to send email from SharePoint online demo output

Loading

In this “send email from SharePoint Online” post, I will share how we can send emails from SharePoint Online using PowerShell script (CSOM) code programmatically and using the PnP PowerShell commands. PowerShell to send email from SharePoint Online Use the below PowerShell to send email from SharePoint Online: CLS #Load SharePoint CSOM Assemblies #Add-Type -Path

Continue reading