Author Posts

September 26, 2016 at 8:35 pm

I have the following resource setup in an Azure Automation DSC. For some reason it fails only sometimes and I can't figure out why. When searching I found a post on stackoverflow that had a link here, but that link resolves to a 404 now. So I'm hoping someone might recall/know why this fails sometimes. The error is:
"A specified logon session does not exist. It may already have been terminated."

File StorageShare
   {
    DestinationPath = "C:\Temp\Test\"
    Type            = "Directory"    
    Ensure          = "Present"
    Recurse         = $True
    SourcePath      = "\\account.file.core.windows.net\testshare\Web\Site1"
    Credential      = $Cred
   }

October 4, 2016 at 2:14 pm

When you say "only sometimes" can you give more detail? The same configuration sometimes works and sometimes doesn't with no changes or is it based on changes to the configuration properties?

Is the $cred object the storage account name and storage key or an Azure AD account?

October 4, 2016 at 4:22 pm

Michael,
Thanks for the reply! No changes to the configuration. I can let it sit on the same mof for days and I will see it switch between several compliant reports to a fail report and vice versa. The $cred is the storage account name and storage key.

-Nick