Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
| gporeport [2019/12/05 16:18] – nekan | gporeport [2021/03/05 16:13] (Version actuelle) – nekan | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| - | ~~CLOSETOC~~ | ||
| ====== Get-DomainPcGpoReport - Créer un rapport de déploiement de GPO ====== | ====== Get-DomainPcGpoReport - Créer un rapport de déploiement de GPO ====== | ||
| + | <label type=" | ||
| Un jour, mon responsable m'a demandé un rapport sur le déploiement de certaines GPO. Je me suis dit qu'il suffisait d' | Un jour, mon responsable m'a demandé un rapport sur le déploiement de certaines GPO. Je me suis dit qu'il suffisait d' | ||
| Ligne 333: | Ligne 333: | ||
| $PCName = $PC.PC | $PCName = $PC.PC | ||
| $OnlineStatus = $PC.Online | $OnlineStatus = $PC.Online | ||
| - | $PStatus = $PC.'(P: | + | $PStatus = $PC."(P: |
| - | $BackupStatus = $PC.'BackupUsers_Xcopy_Daily_scheduled' | + | $BackupStatus = $PC."BackupUsers_Xcopy_Daily_scheduled" |
| - | $LocalStatus = $PC.'Stratégie de groupe locale' | + | $LocalStatus = $PC."Stratégie de groupe locale" |
| - | $ZStatus = $PC.'(Z: | + | $ZStatus = $PC."(Z: |
| - | $DefaultStatus = $PC.'Default Domain Policy' | + | $DefaultStatus = $PC."Default Domain Policy" |
| # Passage à la boucle suivante pour les PC hors ligne | # Passage à la boucle suivante pour les PC hors ligne | ||
| Ligne 370: | Ligne 370: | ||
| # Renvoie des valeurs dans Nagios | # Renvoie des valeurs dans Nagios | ||
| - | If ($PDriveError -ne "" | + | If ($PDriveError -ne '' |
| { | { | ||
| $PDriveError = "P Drive Error : " + $PDriveError | $PDriveError = "P Drive Error : " + $PDriveError | ||
| Ligne 376: | Ligne 376: | ||
| $ExitCode = 1 | $ExitCode = 1 | ||
| } | } | ||
| - | If ($BackupError -ne "" | + | If ($BackupError -ne '' |
| { | { | ||
| $BackupError = " | $BackupError = " | ||
| Ligne 382: | Ligne 382: | ||
| $ExitCode = 1 | $ExitCode = 1 | ||
| } | } | ||
| - | If ($LocalGpoError -ne "" | + | If ($LocalGpoError -ne '' |
| { | { | ||
| $LocalGpoError = "Local Policy Error : " + $LocalGpoError | $LocalGpoError = "Local Policy Error : " + $LocalGpoError | ||
| Ligne 388: | Ligne 388: | ||
| $ExitCode = 1 | $ExitCode = 1 | ||
| } | } | ||
| - | If ($ZDriveError -ne "" | + | If ($ZDriveError -ne '' |
| { | { | ||
| $ZDriveError = "Z Drive Error : " + $ZDriveError | $ZDriveError = "Z Drive Error : " + $ZDriveError | ||
| Ligne 394: | Ligne 394: | ||
| $ExitCode = 1 | $ExitCode = 1 | ||
| } | } | ||
| - | If ($DefaultGpoError -ne "" | + | If ($DefaultGpoError -ne '' |
| { | { | ||
| $DefaultGpoError = " | $DefaultGpoError = " | ||
| Ligne 400: | Ligne 400: | ||
| $ExitCode = 1 | $ExitCode = 1 | ||
| } | } | ||
| - | If ($NeverSyncError -ne "" | + | If ($NeverSyncError -ne '' |
| { | { | ||
| $NeverSyncError = "Never Synchronised : " + $NeverSyncError | $NeverSyncError = "Never Synchronised : " + $NeverSyncError | ||
| Ligne 406: | Ligne 406: | ||
| $ExitCode = 2 | $ExitCode = 2 | ||
| } | } | ||
| - | If ($NoSyncSinceError -ne "" | + | If ($NoSyncSinceError -ne '' |
| { | { | ||
| $NoSyncSinceError = "No Synchronization since $MaxSyncDelta days : " + $NoSyncSinceError | $NoSyncSinceError = "No Synchronization since $MaxSyncDelta days : " + $NoSyncSinceError | ||
| Ligne 412: | Ligne 412: | ||
| $ExitCode = 2 | $ExitCode = 2 | ||
| } | } | ||
| - | If ($OutputMessageCore -eq "" | + | If ($OutputMessageCore -eq '' |
| { | { | ||
| $ExitCode = 0 | $ExitCode = 0 | ||
| Ligne 440: | Ligne 440: | ||
| </ | </ | ||
| - | |||
| - | --- // | ||
| ~~DISCUSSION~~ | ~~DISCUSSION~~ | ||