Je suis en train de convertir un fichier journal multiligne uniforme en un fichier CSV, et rien ne fonctionne. S'il vous plaît aider! Je suis sur un serveur Windows, il doit donc s'agir d'une ligne de commande ou d'un Powershell.convertir le journal de texte multiligne en CSV avec Windows cmd ou Powershell
échantillon d'entrée:
SERVICE_NAME: BDESVC
DISPLAY_NAME: BitLocker Drive Encryption Service
BDESVC hosts the BitLocker Drive Encryption service. BitLocker Drive Encryption provides secure startup for the operating system, as well as full volume encryption for OS, fixed or removable volumes. This service allows BitLocker to prompt users for various actions related to their volumes when mounted, and unlocks volumes automatically without user interaction. Additionally, it stores recovery information to Active Directory, if available, and, if necessary, ensures the most recent recovery certificates are used. Stopping or disabling the service would prevent users from leveraging this functionality.
TYPE : 20 WIN32_SHARE_PROCESS
START_TYPE : 3 DEMAND_START
ERROR_CONTROL : 1 NORMAL
BINARY_PATH_NAME : C:\WINDOWS\System32\svchost.exe -k netsvcs
LOAD_ORDER_GROUP :
TAG : 0
DEPENDENCIES :
SERVICE_START_NAME: localSystem
FAIL_RESET_PERIOD : 900 seconds
FAILURE_ACTIONS : Restart DELAY: 60000 seconds
: Restart DELAY: 60000 seconds
: None DELAY: 0 seconds
SERVICE_NAME: BFE
DISPLAY_NAME: Base Filtering Engine
The Base Filtering Engine (BFE) is a service that manages firewall and Internet Protocol security (IPsec) policies and implements user mode filtering. Stopping or disabling the BFE service will significantly reduce the security of the system. It will also result in unpredictable behavior in IPsec management and firewall applications.
TYPE : 20 WIN32_SHARE_PROCESS
START_TYPE : 2 AUTO_START
ERROR_CONTROL : 1 NORMAL
BINARY_PATH_NAME : C:\WINDOWS\system32\svchost.exe -k LocalServiceNoNetwork
LOAD_ORDER_GROUP : NetworkProvider
TAG : 0
DEPENDENCIES : RpcSs
SERVICE_START_NAME: NT AUTHORITY\LocalService
FAIL_RESET_PERIOD : 86400 seconds
FAILURE_ACTIONS : Restart DELAY: 120000 seconds
: Restart DELAY: 300000 seconds
: None DELAY: 0 seconds
sortie CSV nécessaire (affiché uniquement le premier événement):
SERVICE_NAME,DISPLAY_NAME,DESCRIPTION,TYPE,START_TYPE,ERROR_CONTROL,BINARY_PATH_NAME,LOAD_ORDER_GROUP,TAG,DEPENDENCIES,SERVICE_START_NAME,FAIL_RESET_PERIOD,FAILURE_ACTIONS_1,FAILURE_ACTIONS_2,FAILURE_ACTIONS_3,
BDESVC,BitLocker Drive Encryption Service,"BDESVC hosts the BitLocker Drive Encryption service. BitLocker Drive Encryption provides secure startup for the operating system, as well as full volume encryption for OS, fixed or removable volumes. This service allows BitLocker to prompt users for various actions related to their volumes when mounted, and unlocks volumes automatically without user interaction. Additionally, it stores recovery information to Active Directory, if available, and, if necessary, ensures the most recent recovery certificates are used. Stopping or disabling the service would prevent users from leveraging this functionality.",20 WIN32_SHARE_PROCESS,3 DEMAND_START,1 NORMAL,C:\WINDOWS\System32\svchost.exe -k netsvcs,,0,,localSystem,900 seconds,Restart DELAY: 60000 seconds,Restart DELAY: 60000 seconds,None DELAY: 0 seconds,
Bienvenue sur SO! Bien qu'il existe de nombreux utilisateurs SO qui pourraient écrire un script pour vous, SO n'est pas un service d'écriture de code, mais un forum de questions/réponses. Vous devriez faire une tentative, poster votre code et poser des questions spécifiques sur ce qui ne fonctionne pas. – DSway
^^ Ceci est très vrai et mérite d'être pris en compte à l'avenir. J'ai répondu mais surtout parce que ce genre de défis pique toujours ma curiosité. J'espère que cela aide. –