


foreach($line in Get-Content "D:\TEMP\Centreon\liste-2.txt") {
    if($line -match $regex){

$ParamsCLAPI = @"

cd /

cd /usr/share/centreon/bin

./centreon -u admin -p 17-F1ch/0rga-20 -o SERVICE -a add -v "SRV-CLUSTER;CRPCEN : Fichier Libs Authentic;Tomcat_Authentic_:_Fichiers"
./centreon -u admin -p 17-F1ch/0rga-20 -o SERVICE -a setparam -v "SRV-CLUSTER;CRPCEN : Fichier Libs Authentic;check_command_arguments;!D:/Data/Client/NO05026/AppsRedact/WEB-INF/lib!268!1"


"@

        New-Item "D:\TEMP\Centreon\$line-STATES.sh" -type file -force -value $ParamsCLAPI
        (Get-Content "D:\TEMP\Centreon\$line-STATES.sh") -replace "CRPCEN","$line" | Set-Content "D:\TEMP\Centreon\$line-STATES.sh"
    }
}
