Could you check your domain security policy? Maybe the setting "Devices: Allow removable media to be formatted and ejected" is set to something other than the default? The default setting is to allow "Administrators" and "Interactive users".
I checked that and it is set correctly. I'm wondering if it has something to do with PowerShell script.
Below is a copy of the script. I changed the source directory of the first copy for security reasons.
$os_type = (Get-WmiObject -Class Win32_ComputerSystem).SystemType -match ‘(x64)’
Copy-Item "location of ImDiskTk folder" C:\ -recurse
if ($os_type -eq "True") {
Copy-Item C:\ImDiskTk\driver\sys\amd64\imdisk.sys C:\Windows\system32\drivers
Copy-Item C:\ImDiskTk\driver\awealloc\amd64\awealloc.sys C:\Windows\system32\drivers
Copy-Item C:\ImDiskTk\driver\cpl\amd64\imdisk.cpl C:\Windows\system32
Copy-Item C:\ImDiskTk\driver\cli\amd64\imdisk.exe C:\Windows\system32
Copy-Item C:\ImDiskTk\driver\svc\amd64\imdsksvc.exe C:\Windows\system32
Copy-Item C:\ImDiskTk\driver\cpl\i386\imdisk.cpl C:\Windows\syswow64
Copy-Item C:\ImDiskTk\driver\cli\i386\imdisk.exe C:\Windows\syswow64
Copy-Item C:\ImDiskTk\driver\svc\i386\imdsksvc.exe C:\Windows\syswow64
CMD.exe /C sc.exe create imdisk type= kernel start= auto error= ignore binPath= system32\drivers\imdisk.sys
CMD.exe /C net start imdisk
CMD.exe /C sc.exe create awealloc type= kernel start= auto error= ignore binPath= system32\drivers\awealloc.sys
CMD.exe /C net start awealloc
}
else {
$os_type = (Get-WmiObject -Class Win32_ComputerSystem).SystemType -match ‘(x86)’
if ($os_type -eq "True") {
Copy-Item C:\ImDiskTk\driver\sys\i386\imdisk.sys C:\Windows\system32\drivers
Copy-Item C:\ImDiskTk\driver\awealloc\i386\awealloc.sys C:\Windows\system32\drivers
Copy-Item C:\ImDiskTk\driver\cpl\i386\imdisk.cpl C:\Windows\system32
Copy-Item C:\ImDiskTk\driver\cli\i386\imdisk.exe C:\Windows\system32
Copy-Item C:\ImDiskTk\driver\svc\i386\imdsksvc.exe C:\Windows\system32
Copy-Item C:\ImDiskTk\driver\cpl\i386\imdisk.cpl C:\Windows\syswow64
Copy-Item C:\ImDiskTk\driver\cli\i386\imdisk.exe C:\Windows\syswow64
Copy-Item C:\ImDiskTk\driver\svc\i386\imdsksvc.exe C:\Windows\syswow64
CMD.exe /C sc.exe create imdisk type= kernel start= auto error= ignore binPath= system32\drivers\imdisk.sys
CMD.exe /C net start imdisk
CMD.exe /C sc.exe create awealloc type= kernel start= auto error= ignore binPath= system32\drivers\awealloc.sys
CMD.exe /C net start awealloc
}
}
Is there anything wrong with this type of script? We have both x86 and x64 bit systems in production at the moment.
Thanks,
James