Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

Droit utilisateurs pour defragmentation via GPO

4 réponses
Avatar
sofiane
Bonjour,
Peut on permettre aux utilisateurs du domaine de défragmenter leur poste via
un GPO sans leurs donner des droit administrateur,

J'ai essayé au niveau des GPO attribution des droits aux utilisateurs sur
effectuer des tâches de maintenance, activé pour utilisateur simple, mais la
permission ne s'effectue pas l'utilisateur n'a toujours pas le droit de
défragmenter le message dit que vous n'avez les droits administrateurs pour
défragmenter ce volume.

Je vous remercie d'avance,

4 réponses

Avatar
sofiane
Bonsoir,

l'utilisation du défragmenteur de disk est un droit administratif.

Cordialement,
______________________________________
Sofiane ALI-MOUSSA
MCSA/MCSE Windows Server 2K3





Bonjour,
Peut on permettre aux utilisateurs du domaine de défragmenter leur poste via
un GPO sans leurs donner des droit administrateur,

J'ai essayé au niveau des GPO attribution des droits aux utilisateurs sur
effectuer des tâches de maintenance, activé pour utilisateur simple, mais la
permission ne s'effectue pas l'utilisateur n'a toujours pas le droit de
défragmenter le message dit que vous n'avez les droits administrateurs pour
défragmenter ce volume.

Je vous remercie d'avance,


Avatar
Jonathan Bismuth
Hello Sofiane,

Pourquoi ne pas déployer sur les postes un petit .exe type AutoIT permettant
d'exécuter le defrag en tant qu'admin? Idéalement basé sur un compte du
domaine pour lequel tu as délégué par GPO le droit d'être admin des postes
de travail?

--
Jonathan BISMUTH
NET2S Group
MVP Windows Server - Directory Services
MCSE 2000/ADSI-AutoIT Scripter
Transcript (ID: 691839, code: MCSE2000)
www.portail-mcse.net
pour me contacter http://cerbermail.com/?fCeVUi7Icd


"sofiane" a écrit dans le message de
news:
Bonsoir,

l'utilisation du défragmenteur de disk est un droit administratif.

Cordialement,
______________________________________
Sofiane ALI-MOUSSA
MCSA/MCSE Windows Server 2K3





Bonjour,
Peut on permettre aux utilisateurs du domaine de défragmenter leur poste
via
un GPO sans leurs donner des droit administrateur,

J'ai essayé au niveau des GPO attribution des droits aux utilisateurs sur
effectuer des tâches de maintenance, activé pour utilisateur simple, mais
la
permission ne s'effectue pas l'utilisateur n'a toujours pas le droit de
défragmenter le message dit que vous n'avez les droits administrateurs
pour
défragmenter ce volume.

Je vous remercie d'avance,




Avatar
Lord Of The Ping
Bonjour,

j'utilise un script VB qui marche à merveille:
il defrag toutes les partitions sur XP et 2003 avec un rapport txt à
la racine de la partition
il utilise la commande système defrag

'--------------------------------------------------------------
'defrag_all2.vbs
'Defrags all hard disks - Can be run as a Scheduled Task
'Modified to create an error log and display it
'© Doug Knox - 4/13/2002

Option Explicit

Dim WshShell, fso, d, dc, ErrStr(), Return, X, A(), MyFile, I, MyBox,
Drive

Set WshShell = WScript.CreateObject("WScript.Shell")
Set fso = CreateObject("Scripting.FileSystemObject")
X = 0

Set dc = fso.Drives
For Each d in DC
If d.DriveType = 2 Then
X = X + 1

'Determine drive letter of first fixed disk
'This is the drive that the error report will be placed on
If X = 1 Then
Drive = d
End If
End If
Next

ReDim A(X)
ReDim ErrStr(X)

X = 0
For Each d in dc
If d.DriveType = 2 Then
X = X + 1
Return = WshShell.Run("defrag " & d & " -f", 1, TRUE)

'Determine the Error code returned by Defrag for the current drive and
save it
If return = 0 then
ErrStr(x) = ErrStr(x) & "Drive " & d & " Defrag completed
successfully" & vbCRLF
elseif return = 1 then
ErrStr(x) = ErrStr(x) & "Drive " & d & " Defrag aborted with error
level " & return & " (defrag was cancelled manually) " & vbCRLF
elseif return = 2 then
ErrStr(x) = ErrStr(x) & "Drive " & d & " Defrag aborted with error
level " & return & " (there was a command line error. Check your
command line for valid switches and drives)" & vbCRLF
elseif return = 3 then
ErrStr(x) = ErrStr(x) & "Drive " & d & " Defrag aborted with error
level " & return & " (there was an unknown error)" & vbCRLF
elseif return = 4 then
ErrStr(x) = ErrStr(x) & "Drive " & d & " Defrag aborted with error
level " & return & " (defrag could not run due to insufficient memory
resources)" & vbCRLF
'errorlevel 5 is not currently used
elseif return = 5 then
ErrStr(x) = ErrStr(x) & "Drive " & d & " Defrag aborted with error
level " & return & " (general error)" & vbCRLF
elseif return = 6 then
ErrStr(x) = ErrStr(x) & "Drive " & d & " Defrag aborted with error
level " & return & "(System error: either the account used to run
defrag is not an administrator, there is a problem loading the
resource DLL, or a defrag engine could not be accessed. Check for
proper user permissions and run Sfc.exe to validate system files)" &
vbCRLF
elseif return = 7 then
ErrStr(x) = ErrStr(x) & "Drive " & d & " Defrag aborted with error
level " & return & " (There is not enough free space on the drive.
Defrag needs 15% free space to run on a volume)" & vbCRLF
else
ErrStr(x) = ErrStr(x) & "Drive " & d & " Defrag aborted with an
unknown error level: " & return & vbCRLF
end if

End If
Next

'Create the Error Report in the root of the first fixed disk.
Set MyFile = fso.OpenTextFile(Drive & "defragreport.txt", 2, True)
MyFile.WriteLine(Date) & vbCRLF
MyFile.WriteLine(Time) & vbCRLF
For I = 1 to X
MyFile.WriteLine(ErrStr(I))
Next
MyFile.Close

Set WshShell = Nothing
Set fso = Nothing
'--------------------------------------------------------------

Cordialement,
Mathieu CHATEAU
http://lordoftheping.blogspot.com


On Fri, 12 May 2006 09:08:29 +0200, "Jonathan Bismuth"
wrote:

Hello Sofiane,

Pourquoi ne pas déployer sur les postes un petit .exe type AutoIT permettant
d'exécuter le defrag en tant qu'admin? Idéalement basé sur un compte du
domaine pour lequel tu as délégué par GPO le droit d'être admin des postes
de travail?


Avatar
Pascal TURDINE
Bonjour,

La même chose que le script VB de "Lord Of The Ping", cette fois en cmd
*-*-* DEBUT *-*-*
@ECHO OFF
REM Pascal CROZET - ManPower pour Teintureries de la Turdine (c) 04/2005
REM Double d,fragmentation d'un disque avec journalisation
REM
REM ParamStre . passer : la lettre du disque
REM ex %0 C:

REM Titre de la fen^tre de commandes
TITLE D,fragmentation de disque

REM Pas de paramStres =} message d'aide
IF ~%1==~ GOTO Aide

REM Demande d'aide en paramStre
REM utilisation de la commande FOR
REM pour ,viter de multiplier le nombre de ligne de commande
FOR %%i in (-h, -H, /h, /H) DO IF %%i~==%1~ GOTO Aide
FOR %%i in (C:, c:, D:, d:, E:, e:, F:, f:, G:, g:, H:, h:, I:, i:, J:, j:, K:, k:) DO IF
%%i~==%1~ GOTO Debut
ECHO.&&ECHO Le paramStre ne parait pas ^tre un nom de disque local valide.
GOTO Aide

:Debut
ECHO *** DEBUT *** >"%userprofile%Mes documentsDblDefrag.log"
ECHO D,but de la proc,dure %0 %1>>"%UserProfile%Mes documentsDblDefrag.log"

REM Formatage de la date et de l'heure
FOR /f "tokens=1-3 delims=/" %%i IN ('date /t') DO SET jour=Le %%i-%%j-%%k
FOR /f "tokens=1-2 delims=:" %%i IN ('time /t') DO SET heure=a %%ih %%j
SET jourheure=%jour%%heure%
ECHO %jourheure%>>"%UserProfile%Mes documentsDblDefrag.log"

ECHO.&&ECHO Lancement de la premiSre d,fragmentation
ECHO Analyse du disque %1
DEFRAG %1 -a -v
ECHO D,fragmentation du disque %1 en cours . . .
DEFRAG %1 -f -v>>"%UserProfile%Mes documentsDblDefrag.log"

REM Formatage de la date et de l'heure
FOR /f "tokens=1-3 delims=/" %%i IN ('date /t') DO SET jour=Le %%i-%%j-%%k
FOR /f "tokens=1-2 delims=:" %%i IN ('time /t') DO SET heure=. %%ih %%j
SET jourheure=%jour%%heure%
ECHO %jourheure%>>"%UserProfile%Mes documentsDblDefrag.log"

ECHO.&&ECHO Lancement de la deuxiSme d,fragmentation
ECHO Analyse du disque %1
DEFRAG %1 -a -v
ECHO D,fragmentation du disque %1 en cours . . .
DEFRAG %1 -f -v>>"%UserProfile%Mes documentsDblDefrag.log"

REM Formatage de la date et de l'heure
FOR /f "tokens=1-3 delims=/" %%i IN ('date /t') DO SET jour=Le %%i-%%j-%%k
FOR /f "tokens=1-2 delims=:" %%i IN ('time /t') DO SET heure=. %%ih %%j
SET jourheure=%jour%%heure%
ECHO %jourheure%>>"%UserProfile%Mes documentsDblDefrag.log"

ECHO Fin de la proc,dure %0 %1>>"%UserProfile%Mes documentsDblDefrag.log"
ECHO *** FIN ***>>"%UserProfile%Mes documentsDblDefrag.log"
REM Effacement des variable d'environnement temporaires
SET jour SET heure SET jourheure GOTO Sortie

:Aide
ECHO.
ECHO Donnez en paramStre le disque dur . d,fragmenter
ECHO Ex : %0 C:&&ECHO.

:Sortie

*-*-* FIN *-*-*
Lord Of The Ping" a écrit dans le message de news:

Bonjour,

j'utilise un script VB qui marche à merveille:
il defrag toutes les partitions sur XP et 2003 avec un rapport txt à
la racine de la partition
il utilise la commande système defrag

'--------------------------------------------------------------
'defrag_all2.vbs
'Defrags all hard disks - Can be run as a Scheduled Task
'Modified to create an error log and display it
'© Doug Knox - 4/13/2002

Option Explicit

Dim WshShell, fso, d, dc, ErrStr(), Return, X, A(), MyFile, I, MyBox,
Drive

Set WshShell = WScript.CreateObject("WScript.Shell")
Set fso = CreateObject("Scripting.FileSystemObject")
X = 0

Set dc = fso.Drives
For Each d in DC
If d.DriveType = 2 Then
X = X + 1

'Determine drive letter of first fixed disk
'This is the drive that the error report will be placed on
If X = 1 Then
Drive = d
End If
End If
Next

ReDim A(X)
ReDim ErrStr(X)

X = 0
For Each d in dc
If d.DriveType = 2 Then
X = X + 1
Return = WshShell.Run("defrag " & d & " -f", 1, TRUE)

'Determine the Error code returned by Defrag for the current drive and
save it
If return = 0 then
ErrStr(x) = ErrStr(x) & "Drive " & d & " Defrag completed
successfully" & vbCRLF
elseif return = 1 then
ErrStr(x) = ErrStr(x) & "Drive " & d & " Defrag aborted with error
level " & return & " (defrag was cancelled manually) " & vbCRLF
elseif return = 2 then
ErrStr(x) = ErrStr(x) & "Drive " & d & " Defrag aborted with error
level " & return & " (there was a command line error. Check your
command line for valid switches and drives)" & vbCRLF
elseif return = 3 then
ErrStr(x) = ErrStr(x) & "Drive " & d & " Defrag aborted with error
level " & return & " (there was an unknown error)" & vbCRLF
elseif return = 4 then
ErrStr(x) = ErrStr(x) & "Drive " & d & " Defrag aborted with error
level " & return & " (defrag could not run due to insufficient memory
resources)" & vbCRLF
'errorlevel 5 is not currently used
elseif return = 5 then
ErrStr(x) = ErrStr(x) & "Drive " & d & " Defrag aborted with error
level " & return & " (general error)" & vbCRLF
elseif return = 6 then
ErrStr(x) = ErrStr(x) & "Drive " & d & " Defrag aborted with error
level " & return & "(System error: either the account used to run
defrag is not an administrator, there is a problem loading the
resource DLL, or a defrag engine could not be accessed. Check for
proper user permissions and run Sfc.exe to validate system files)" &
vbCRLF
elseif return = 7 then
ErrStr(x) = ErrStr(x) & "Drive " & d & " Defrag aborted with error
level " & return & " (There is not enough free space on the drive.
Defrag needs 15% free space to run on a volume)" & vbCRLF
else
ErrStr(x) = ErrStr(x) & "Drive " & d & " Defrag aborted with an
unknown error level: " & return & vbCRLF
end if

End If
Next

'Create the Error Report in the root of the first fixed disk.
Set MyFile = fso.OpenTextFile(Drive & "defragreport.txt", 2, True)
MyFile.WriteLine(Date) & vbCRLF
MyFile.WriteLine(Time) & vbCRLF
For I = 1 to X
MyFile.WriteLine(ErrStr(I))
Next
MyFile.Close

Set WshShell = Nothing
Set fso = Nothing
'--------------------------------------------------------------

Cordialement,
Mathieu CHATEAU
http://lordoftheping.blogspot.com


On Fri, 12 May 2006 09:08:29 +0200, "Jonathan Bismuth"
wrote:

Hello Sofiane,

Pourquoi ne pas déployer sur les postes un petit .exe type AutoIT permettant
d'exécuter le defrag en tant qu'admin? Idéalement basé sur un compte du
domaine pour lequel tu as délégué par GPO le droit d'être admin des postes
de travail?