Copy file permissions with PowerShell

Setup: You want to copy all the permissions from one file to another with PowerShell Solution: Move to the folder of the source file Move to the folder of the destination file: This method is very useful for copying the permissions of .vhd files after you move/copy them between different folders/virtual machines. Before attaching a […]

Read More

Assign permissions to Virtual Machine service account on .vhd files

Setup: Hyper-V server Problem: On a Hyper-V server and when you start the VM you get an error 12290 like this in log Microsoft-Windows-Hyper-V-Worker/Admin ‘VMName’: IDE/ATAPI Account does not have sufficient privilege to open attachment ‘\Path_to_disk\disk.vhd’. Error: ‘General access denied error’ (0x80070005). (Virtual machine ID 545CC7B7-83B6-46A9-A29C-29AB56B09306) Solution: Open an elevated command prompt and run this […]

Read More