Chirag Nagrekar has Published 465 Articles

How to enable soft delete for Azure Storage blobs using PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 01-Sep-2021 09:01:11

389 Views

To enable soft delete for Azure Storage blobs in Storage account properties using PowerShell, we can use the Enable-AzureStorageDeleteRetentionPolicy command. From the Azure portal, we need to access the Data Protection property of the Azure Storage account.You can also provide the retention days to keep the soft-deleted data. To perform the ... Read More

How to create the Azure Storage context using PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 01-Sep-2021 08:56:04

3K+ Views

Storage context is helpful when you are working with the Storage accounts in the PowerShell session. It is like authenticating for Azure storage. Generally, we use the Azure storage account key and the connection string to create the Azure storage context.To create a new storage context, we need to use ... Read More

How to use Azure Rest API in PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 01-Sep-2021 08:53:45

4K+ Views

To use the Azure Rest API using PowerShell, we first need to connect to the Azure cloud account using the Connect-AzAccount. Once you are connected to the Azure Account, you can use the below authorization header (same has been provided on the MS website) which contains a bearer token to ... Read More

How to resolve - Relative path is not supported in PowerShell DSC?

Chirag Nagrekar

Chirag Nagrekar

Updated on 01-Sep-2021 08:35:58

445 Views

“Relative path is not supported” error generally occurs with the PowerShell DSC when we download a file from online or Website and we use “File” DscResource for that.In the below example, we are downloading the PowerShell 7.1.4 version from GitHub using DSC to the local computer and we get the ... Read More

How to install DSC resources using PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 01-Sep-2021 08:21:55

455 Views

To install the DSC resource using PowerShell, we can use the same command to install modules in PowerShell (Install-Module).The Find-DscResource command would get all the available DSC resources. To search the specific DSC resource, you can provide the -Name parameter in the Find-DscReource command. For example, we need to search for ... Read More

How to generate multiple reports in HTML using PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 01-Sep-2021 08:18:57

438 Views

To generate or append multiple outputs in the HTML file using PowerShell, we need to use the - Fragment parameter in the ConvertTo-HTML command.For example, let say we need to generate the computer utilization report which includes the top 5 consuming processes, stopped services, and the disk utilization report. A ... Read More

How to generate an HTML report using PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 01-Sep-2021 08:16:26

4K+ Views

To generate an HTML report using PowerShell, we can use the ConvertTo-HTML command. For example, let say we need to get the services to report in HTML format then we can use ConvertTo-HTML as a pipeline.Get-Service | ConvertTo-Html | Out-File C:\Temp\Services.html ii C:\Temp\services.htmlThe first command will retrieve the output in ... Read More

How to create dynamic columns (headers) in CSV using PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 01-Sep-2021 08:08:14

2K+ Views

To create dynamic columns or headers using CSV, we can use multiple methods but the one method that I find most suitable is the PSObject method.Let assume that your CSV column headers depend on the input provided by the user. Input can be a text file, user prompt for headers, ... Read More

How to delete the azure blob (File) using Azure CLI in PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 01-Sep-2021 08:06:45

4K+ Views

To delete the Azure blob using Azure CLI, we can use “az storage blob” command with the “delete” parameter. Before running this command, we first need to make sure that the azure account is connected (az login) and the proper subscription is set (az account set).To work with the azure ... Read More

How to get the Azure storage container blobs (Files) using PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 01-Sep-2021 08:01:43

1K+ Views

To get blobs inside the Azure storage container using PowerShell, we will use the Get-AzStorageBlob command. . Before running this command, we need to make sure that the Azure cloud account is connected (Connect-AzAccount) and the proper subscription is set in which the storage account resides (Set-AzContext).To work with the ... Read More

Previous 1 ... 4 5 6 7 8 ... 47 Next
Advertisements