Scenario: Create a PowerShell script that reads the CSV file and starts or stops the virtual machines based on the tag values. Present Situation: In addition to creating the CSV file with the columns names: VMName, ResourceGroupName, StartTag, StopTag, an

Sachin Wandale 0 Reputation points
2024-01-30T07:43:20.04+00:00

User's image

Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,071 questions
{count} votes

1 answer

Sort by: Most helpful
  1. tbgangav-MSFT 10,151 Reputation points
    2024-01-30T10:58:20.9866667+00:00

    Hi @Sachin Wandale ,

    Based on the error "Could not find a part of the path 'C:\Users.......csv'", looks like the issue is, while executing the runbook its not able to find the input CSV file in the expected path.

    Are you executing the runbook in a Hybrid worker or in Azure sandbox itself?

    Can you share your script or runbook?

    If its on Azure sandbox, its better to copy the CSV file to $ENV:temp location and then use it.

    0 comments No comments