Hi all, I am trying to find forum about Azure Image Builder

Venelin Ustabashiev 0 Reputation points
2023-02-01T16:53:53.9333333+00:00

How in Azure Image Builder PowerShell inline customize I can map file share? Internal server with share or Azure file share. Where to find forum to ask Azure Image Builder developers questions?

Thank you!

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,198 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Limitless Technology 43,966 Reputation points
    2023-02-02T16:46:55+00:00

    Hi. Thank you for your question and reaching out. I’d be more than happy to help you with your query.

    Azure Image Builder is a service that makes it easy to create custom images for Azure Virtual Machines and other services. In addition to the GUI-based Image Builder user interface, you can also customize images via PowerShell Inline. This allows you to further automate your image creation process, and even map file shares, either from an internal server or an Azure file share.

    Map File Shares with PowerShell Inline

    Mapping file shares with PowerShell Inline is a simple process. First, create a PowerShell script that defines the file shares you wish to map to the image. The PowerShell script should use the New-PSDrive cmdlet with the File parameter set to true for each file share you wish to map. For example:

    New-PSDrive -Name "share1" -PSProvider FileSystem -Root "\server1\share1" -File

    New-PSDrive -Name "share2" -PSProvider FileSystem -Root "\server2\share2" -File

    Then, add the script to your Image Template within the PowerShellInline block. For example:

    "scriptInline": "[New-PSDrive -Name "share1" -PSProvider FileSystem -Root "\server1\share1" -File]

    [New-PSDrive -Name "share2" -PSProvider FileSystem -Root "\server2\share2" -File]"

    When the image is built, the file shares will be mapped to the image and available at the next boot. Note that your file shares must be accessible to the image builder service.

    Ask Azure Image Builder Developers Questions

    If you have any questions about using Azure Image Builder, there are several resources available to you. You can search the Azure documentation for more information, or you can use the Azure Image Builder tag on Stack Overflow to ask a specific question. You can also join the [Azure Image Builder Slack channel https://join.slack.com/t/azureimagebuilder/shared_invite/zt-hbryn7zf-SNSjJ8zvnQI

    If the reply was helpful, please don’t forget to upvote or accept as answer, thank you.


  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more