Vue normale

Il y a de nouveaux articles disponibles, cliquez pour rafraîchir la page.
À partir d’avant-hierLazyAdmin

How to Delete a File with PowerShell Remove-Item

Deleting files and cleaning up directories can be a time-consuming task, especially when you need to perform the same task on multiple computers regularly. But with PowerShell, we can create small scripts that will delete a file quickly and efficiently by using the Remove-Item cmdlet. ... Read moreHow to Delete a File with PowerShell Remove-Item

The post How to Delete a File with PowerShell Remove-Item appeared first on LazyAdmin.

How to use Azure Managed Identity

Azure resources, like Azure Automation or Azure Virtual Machines, often need to have access to other resources. For example, when accessing the Azure AD from within a Runbook. To grant access, you usually need accounts, passwords, or certificates. But you don’t want to store this ... Read moreHow to use Azure Managed Identity

The post How to use Azure Managed Identity appeared first on LazyAdmin.

How to use PowerShell If Else Statements

If-Else statements are the basis of any programming language, also in PowerShell. They are used to test if a condition is met, allowing you to perform different actions based on the result. Multiple conditions, if-not statements, and else-if statements give you a variety of options ... Read moreHow to use PowerShell If Else Statements

The post How to use PowerShell If Else Statements appeared first on LazyAdmin.

How to use Test-Path cmdlet in PowerShell

When working with files or folders in PowerShell, it’s important to test if the path exists, before you try to read or save contents. This is where the Test-Path cmdlet comes in. It checks if all elements of a path exist and returns $true or ... Read moreHow to use Test-Path cmdlet in PowerShell

The post How to use Test-Path cmdlet in PowerShell appeared first on LazyAdmin.

How to use PowerShell Get-Content to Read a File

The Get-Content cmdlet can be used to retrieve the contents from a file in PowerShell. It will retrieve the contents one line at a time, storing them in an array. This allows you to use or process each line in your PowerShell script. Get-Content comes ... Read moreHow to use PowerShell Get-Content to Read a File

The post How to use PowerShell Get-Content to Read a File appeared first on LazyAdmin.

How to Archive SharePoint Online?

SharePoint Online is a great tool to store and share files, collaborate on projects, and communicate with team members. However, as the amount of data stored in SharePoint Online grows, you will probably run out of storage space. You can buy additional storage in SharePoint ... Read moreHow to Archive SharePoint Online?

The post How to Archive SharePoint Online? appeared first on LazyAdmin.

How to Use PowerShell Array – Complete Guide

PowerShell Arrays are used to store a collection of items. They are a fundamental part of PowerShell, or any programming language because they allow you to store and structure a collection of items into a single variable. We can then use the array to perform ... Read moreHow to Use PowerShell Array – Complete Guide

The post How to Use PowerShell Array – Complete Guide appeared first on LazyAdmin.

How to Concatenate a String in PowerShell

When outputting data from PowerShell you often need to concatenate two or more strings or variables. Joining strings in PowerShell is primarily done using the + operator. But there are other ways to concatenate strings as well. The problem with joining strings or variables in ... Read moreHow to Concatenate a String in PowerShell

The post How to Concatenate a String in PowerShell appeared first on LazyAdmin.

Get-Date – How to get and use Dates in PowerShell

With Get-Date we can get the current date and time which is often used in PowerShell scripts to timestamp the output or in combination with logging. But besides timestamping, we can also use dates to compare or calculate the age of files, or in filters ... Read moreGet-Date – How to get and use Dates in PowerShell

The post Get-Date – How to get and use Dates in PowerShell appeared first on LazyAdmin.

❌
❌