Technique 1 (testé sur Win 10) :
Using Powershell 4 on Windows 2012 server I do something like following for deploying our printers.
I create a temporary printer called 'TEMP' in this example and use the Security Tab to define printer permissions I want to have on a particular users printer or set of printers then I get the security descriptor property and dump it into a text file, you can store it to a variable if you like vs. dumping out to a text file like I show here.
(Get-Printer 'TEMP' -Full).PermissionSDDL | Out-File 'C:\OregonOperation.txt'
Then I use something like this to pull my saved Security settings into a variable.
$perms = Get-Content 'C:\OregonOperation.txt'
Then to push it to particular printer you can do the following
Set-Printer 'NEWPRINTER' -PermissionSDDL $perms
If you wanted to target a remote computer, you need to add the -Computer parameter.
Set-Printer 'NEWPRINTER' -PermissionSDDL $perms -Computer 'SOMEWORKSTATION'
Hope this helps.
source :
http://stackoverflow.com/questions/26380502/get-and-set-printer-acl-in-powershell
Technique 2 :
SUBINACL /verbose=1 /printer "Color Laser" /grant=MYDOMAIN\Marketing=MP
source : http://www.robvanderwoude.com/subinacl.php
Technique 3 :
1. Log in as a computer admin, click on run, cmd and type regedit
2. Navigate to the following keys and delete any entries related to the printer you're having issues with
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Environments\
Windows NT x86\ Drivers\Version-2\
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers\
(That's a 32bit system - if a 64 bit, go to x64 key instead
3. Unplug your printer and reboot your system.
4. When the system comes up, navigate to "Devices and Printers" click on the printer and "Remove Device" and confirm deletion of the printer.
5. Plug the printer back in and Windows should re-install the drivers for you
- All permissions will be reset and you can re-assign new permissions making sure you don't lock yourself out this time.
source :
http://answers.microsoft.com/en-us/windows/forum/windows_7-security/mistake-on-printer-permissions-wont-allow-any/fd87ef4f-8913-4e28-8bf6-ba5cd41c5d1e?auth=1
Aucun commentaire:
Enregistrer un commentaire