Hi @Kevin Blackwell,
Please refer to the following link for guidance on migrating from Azure Automation State Configuration:
Azure Automation DSC runs under a full system context (like LocalSystem
), so it can run complex scripts, including mapping network drives and copying files from file shares.
Guest Configuration, on the other hand, is mainly designed for checking and enforcing compliance. It doesn't support full scripting functionality.
For example, New-PSDrive -Persist
doesn’t work in Guest Configuration because it requires an interactive user session, which Guest Configuration doesn’t support.
If you’re migrating to Guest Configuration, and need to copy files, consider using Invoke-WebRequest
or Azure Storage cmdlets instead:
$context = New-AzStorageContext -StorageAccountName '<storageName>' -StorageAccountKey '<key>'
Get-AzStorageFileContent -ShareName '<fileshare>' -Path 'myapp/install.exe' -Destination 'C:\temp\install.exe' -Context $context
This approach works without needing to map drives and is compatible with Guest Configuration.
Refer: https://learn.microsoft.com/en-us/azure/governance/machine-configuration/whats-new/migrating-from-azure-automation
Please feel free to let us know, as we are always here to help whenever you need us.
Additionally, if you have a moment, please do upvote it if the information provided has been helpful. This can be beneficial to other community members and would be greatly appreciated.
Thank you.