![]() What I found out was that my automated process (Packer), even if it was running under the same account, does not share the script session's credential and the user session credential. I was using this method so I can create an image that already has a mounted network drive. I can write a scheduled task to re-add the cmdkey, but was wondering if it really is Sysprep that wipes out my Windows Credentials and if there's a way to avoid it. When I spin up the image again, I am able to log into my service account, but the cmdkey I added has disappeared. C:\Windows\Sysprep\Sysprep.exe /oobe /generalize /quiet /quit /mode:vm I then prepare the VM for image capture by running sysprep and generalizing it. The network is mapped and I am able to access the UNC path above. Then I add the network map via net use Z: \\.net\share /persistent:yes cmdkey /add.net /user:Azure\storage /pass:password In order to provide the credentials to access the file share, I save the credentials to Windows Credential Manager via the command below and have it run as my service account. The user needs access to an azure network file share. I have an automated process that's supposed to build out an image and have that image deployed with a user that is setup to run a service.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |