Author Posts

August 21, 2018 at 9:49 am

Hi,

Does anyone know what determines the "Client" user getting created on a target machine, i.e. the folder at c:\users\Client?

I'm using Azure Automation with DSC to install some packages with PDscResources and I'd been using that users temp folder to hold the log files of the installs.

On some machines this Client folder has been created and using "$env:TEMP\filebeat_InstallLog.txt" for the log path was working nicely.

On other machines there's no Client folder so I get an error due to the folder not existing.

Any idea why?

August 21, 2018 at 10:54 am

Are you using the File resource to to ensure that the directory exists?  If so, are you using DependsOn on whatever resource you're using for the package installation to ensure that the directory exists before the package attempts to run?

August 21, 2018 at 11:57 am

@Will, I think, her is talking about a folder 'client' which is already there in Users folder.
@OffColor – correct me if I'm wrong.

August 21, 2018 at 12:59 pm

@kvprasoon, that's possible, but the solution remains the same, if the folder doesn't exist, the installation will fail.  Thus you have a dependency on the folder existing.  So the File resource should be used to ensure the directory exists, and if not, create it.  Then, have the package configured with the DependsOn property to that File resource.

August 21, 2018 at 3:17 pm

The "client" folder isn't one that I've ever created. I was presuming that it's one that got created via DSC at some point as using $env:TEMP within a Configuration resolves to c:\users\Client as can be seen from where this has worked on other servers.

So the question is more around what circumstances would result in that folder getting created and why it's not there on all servers.

August 21, 2018 at 6:20 pm

IMO, DSC doesn't create any folders for the execution. There could be some other reason for the failure. Can you try creating the folder manually and try pushing the configuration.

August 21, 2018 at 6:58 pm

There's something external that's likely creating the directory.  Like I mentioned before, if you use the File resource, it can create the folder for you if it doesn't exist.  If it does exist, it simply won't do anything.

August 23, 2018 at 8:27 am

I'm using another folder instead now that I've got direct control over.

I've no idea where the Client one comes from then, but given its location and that $env:TEMP resolves to it does seem to imply that it's related to DSC and/or Azure Automation.