update
This commit is contained in:
93
Exemples/Affichage-Calendrier.ps1
Normal file
93
Exemples/Affichage-Calendrier.ps1
Normal file
@ -0,0 +1,93 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
<Overview of script>
|
||||
|
||||
.NOTES
|
||||
Version: 1.0
|
||||
Author: Hubert CORNET
|
||||
Creation Date: <Date>
|
||||
Purpose/Change: Initial script development
|
||||
|
||||
.LINK
|
||||
https://www.tips-of-mine.fr
|
||||
|
||||
.EXEMPLE
|
||||
<Example goes here. Repeat this attribute for more than one example>
|
||||
|
||||
.DESCRIPTION
|
||||
<Brief description of script>
|
||||
|
||||
.PARAMETER <Parameter_Name>
|
||||
<Brief description of parameter input required. Repeat this attribute if required>
|
||||
|
||||
.INPUTS
|
||||
<Inputs if any, otherwise state None>
|
||||
|
||||
.OUTPUTS
|
||||
<Outputs if any, otherwise state None - example: Log file stored in C:\Windows\Temp\<name>.log>
|
||||
#>
|
||||
|
||||
cls
|
||||
|
||||
#---------------------------------------------------------[Initialisations]--------------------------------------------------------
|
||||
# Définir l'action d'erreur pour continuer silencieusement
|
||||
$ErrorActionPreference = "SilentlyContinue"
|
||||
|
||||
# Bibliothèques de fonctions requises
|
||||
|
||||
#----------------------------------------------------------[Declarations]----------------------------------------------------------
|
||||
# Version Script
|
||||
$sScriptVersion = "1.0"
|
||||
|
||||
#Log File Info
|
||||
$sLogPath = "C:\Tmp"
|
||||
$sLogName = "<script_name>.log"
|
||||
$sLogFile = Join-Path -Path $sLogPath -ChildPath $sLogName
|
||||
|
||||
#-----------------------------------------------------------[Functions]------------------------------------------------------------
|
||||
|
||||
#-----------------------------------------------------------[]------------------------------------------------------------
|
||||
Add-Type -AssemblyName System.Windows.Forms
|
||||
Add-Type -AssemblyName System.Drawing
|
||||
|
||||
$form = New-Object Windows.Forms.Form -Property @{
|
||||
StartPosition = [Windows.Forms.FormStartPosition]::CenterScreen
|
||||
Size = New-Object Drawing.Size 280, 285
|
||||
Text = 'Selection Date'
|
||||
Topmost = $true
|
||||
MaximizeBox = $false
|
||||
MinimumSize = New-Object System.Drawing.Size(280,285)
|
||||
MaximumSize = New-Object System.Drawing.Size(280,285)
|
||||
ControlBox = $false
|
||||
}
|
||||
|
||||
$calendar = New-Object Windows.Forms.MonthCalendar -Property @{
|
||||
ShowTodayCircle = $True
|
||||
MaxSelectionCount = 1
|
||||
}
|
||||
$form.Controls.Add($calendar)
|
||||
|
||||
$okButton = New-Object Windows.Forms.Button -Property @{
|
||||
Location = New-Object Drawing.Point 10, 210
|
||||
Size = New-Object Drawing.Size 75, 23
|
||||
Text = 'OK'
|
||||
DialogResult = [Windows.Forms.DialogResult]::OK
|
||||
}
|
||||
$form.AcceptButton = $okButton
|
||||
$form.Controls.Add($okButton)
|
||||
|
||||
$cancelButton = New-Object Windows.Forms.Button -Property @{
|
||||
Location = New-Object Drawing.Point 180, 210
|
||||
Size = New-Object Drawing.Size 75, 23
|
||||
Text = 'Cancel'
|
||||
DialogResult = [Windows.Forms.DialogResult]::Cancel
|
||||
}
|
||||
$form.CancelButton = $cancelButton
|
||||
$form.Controls.Add($cancelButton)
|
||||
|
||||
$result = $form.ShowDialog()
|
||||
|
||||
If ($result -eq [Windows.Forms.DialogResult]::OK) {
|
||||
$date = $calendar.SelectionStart
|
||||
Write-Host "Date selected: $($date.ToShortDateString())"
|
||||
}
|
55
Exemples/Creation-Multi-Fichier.ps1
Normal file
55
Exemples/Creation-Multi-Fichier.ps1
Normal file
@ -0,0 +1,55 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
<Overview of script>
|
||||
|
||||
.NOTES
|
||||
Version : 1.0
|
||||
Author : Hubert CORNET
|
||||
Creation Date : 22/11/2022
|
||||
Purpose/Change : <Initial script development>
|
||||
|
||||
.LINK
|
||||
https://www.tips-of-mine.fr
|
||||
|
||||
.EXEMPLE
|
||||
<Example goes here. Repeat this attribute for more than one example>
|
||||
|
||||
.DESCRIPTION
|
||||
<Brief description of script>
|
||||
|
||||
.PARAMETER <Parameter_Name>
|
||||
<Brief description of parameter input required. Repeat this attribute if required>
|
||||
|
||||
.INPUTS
|
||||
<Inputs if any, otherwise state None>
|
||||
|
||||
.OUTPUTS
|
||||
<Outputs if any, otherwise state None - example: Log file stored in C:\Windows\Temp\<name>.log>
|
||||
#>
|
||||
|
||||
#---------------------------------------------------------[Initialisations]--------------------------------------------------------
|
||||
|
||||
# Définir l'action d'erreur pour continuer silencieusement
|
||||
$ErrorActionPreference = "SilentlyContinue"
|
||||
|
||||
# Bibliothèques de fonctions requises
|
||||
|
||||
#----------------------------------------------------------[Declarations]----------------------------------------------------------
|
||||
# Version Script
|
||||
$sScriptVersion = "1.0"
|
||||
|
||||
#Log File Info
|
||||
$sLogPath = "C:\Tmp"
|
||||
$sLogName = "Creation-Multi-Fichier.log"
|
||||
$sLogFile = Join-Path -Path $sLogPath -ChildPath $sLogName
|
||||
|
||||
Start-Transcript -Path $sLogFile -NoClobber
|
||||
#-----------------------------------------------------------[Functions]------------------------------------------------------------
|
||||
|
||||
#--------------------------------------------------------[Debut Du Script]---------------------------------------------------------
|
||||
|
||||
1..100 | %{ ($_ * (Get-Random -Max ([int]::maxvalue))) > "D:\script\file$_.txt"}
|
||||
|
||||
#---------------------------------------------------------[Fin Du Script]----------------------------------------------------------
|
||||
|
||||
Stop-Transcript
|
195
Exemples/Dichotomie.ps1
Normal file
195
Exemples/Dichotomie.ps1
Normal file
@ -0,0 +1,195 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
<Overview of script>
|
||||
|
||||
.NOTES
|
||||
Version : 1.0
|
||||
Author : Hubert CORNET
|
||||
Creation Date : <Date>
|
||||
Purpose/Change : <Initial script development>
|
||||
|
||||
.LINK
|
||||
https://www.tips-of-mine.fr
|
||||
|
||||
.EXEMPLE
|
||||
<Example goes here. Repeat this attribute for more than one example>
|
||||
|
||||
.DESCRIPTION
|
||||
<Brief description of script>
|
||||
|
||||
.PARAMETER <Parameter_Name>
|
||||
<Brief description of parameter input required. Repeat this attribute if required>
|
||||
|
||||
.INPUTS
|
||||
<Inputs if any, otherwise state None>
|
||||
|
||||
.OUTPUTS
|
||||
<Outputs if any, otherwise state None - example: Log file stored in C:\Windows\Temp\<name>.log>
|
||||
#>
|
||||
|
||||
#---------------------------------------------------------[Initialisations]--------------------------------------------------------
|
||||
|
||||
[CmdletBinding()]
|
||||
Param(
|
||||
[Parameter(Position=0,Mandatory=$True)]
|
||||
[string]$CheminSource,
|
||||
[Parameter(Position=1,Mandatory=$True)]
|
||||
[string]$Pattern,
|
||||
[Parameter(Position=2,Mandatory=$True)]
|
||||
[int]$Pourcentage
|
||||
)
|
||||
|
||||
|
||||
# Définir l'action d'erreur pour continuer silencieusement
|
||||
$ErrorActionPreference = "SilentlyContinue"
|
||||
|
||||
#----------------------------------------------------------[Declarations]----------------------------------------------------------
|
||||
# Version Script
|
||||
$sScriptVersion = "1.0"
|
||||
|
||||
#Log File Info
|
||||
$sLogPath = "C:\Tmp"
|
||||
$sLogName = "Dichotomie.log"
|
||||
$sLogFile = Join-Path -Path $sLogPath -ChildPath $sLogName
|
||||
|
||||
Start-Transcript -Path $sLogFile -NoClobber
|
||||
|
||||
$Date = Get-Date -Format "yyyyMMdd HHmm"
|
||||
$FolderBackup = $CheminSource+"\Backup - "+$Date
|
||||
$FolderLotA = $CheminSource+"\Lot-A"
|
||||
$FolderLotB = $CheminSource+"\Lot-B"
|
||||
$FolderLock = $CheminSource+"\Fichier Bloquant - "+$Date
|
||||
$Compteur = 0
|
||||
|
||||
#-----------------------------------------------------------[Functions]------------------------------------------------------------
|
||||
|
||||
Function Login-RestApi {
|
||||
[cmdletbinding()]
|
||||
param(
|
||||
[string] $ApiUrl,
|
||||
[string] $OpConUser,
|
||||
[string] $OpConPassword
|
||||
)
|
||||
|
||||
Write-Verbose ("Parameters =")
|
||||
Write-Verbose ("ApiUrl: " + $ApiUrl)
|
||||
Write-Verbose ("OpConUser: " + $OpConUser)
|
||||
Write-Verbose ("OpConPassword: (hidden)")
|
||||
|
||||
$ApiUrl = $ApiUrl.ToLower().TrimEnd("/").TrimEnd("/api")
|
||||
|
||||
Write-Host ("Logging in to OpCon REST API: " + $ApiUrl)
|
||||
|
||||
$Global:OpconRESTApiUrl = $ApiUrl
|
||||
$Global:OpconRESTApiUser = $OpConUser
|
||||
$Global:OpConRESTApiPassword = $OpConPassword
|
||||
$token = Get-OpConApiToken -Url $ApiUrl -User $OpConUser -Password $OpConPassword
|
||||
$Global:OpconRESTApiToken = $token.id
|
||||
|
||||
$Global:OpconRESTApiAuthHeader = Get-OpConApiAuthHeader -Token $token.id
|
||||
Write-Host ('Token successfully stored for future calls in session.')
|
||||
}
|
||||
|
||||
Function Ignore-SelfSignedCerts {
|
||||
add-type -TypeDefinition @"
|
||||
using System.Net;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
public class TrustAllCertsPolicy : ICertificatePolicy {
|
||||
public bool CheckValidationResult(
|
||||
ServicePoint srvPoint, X509Certificate certificate,
|
||||
WebRequest request, int certificateProblem) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
"@
|
||||
[System.Net.ServicePointManager]::CertificatePolicy = New-Object TrustAllCertsPolicy
|
||||
}
|
||||
|
||||
Function Get-OpConApiToken {
|
||||
[cmdletbinding()]
|
||||
param(
|
||||
[string] $Url,
|
||||
[string] $User,
|
||||
[string] $Password
|
||||
)
|
||||
$tokensUri = -join($Url, "/api/tokens")
|
||||
Write-Host ("Retrieving authorization token...")
|
||||
Write-Host ("Uri: " + $tokensUri)
|
||||
Write-Host ("User: " + $User)
|
||||
$tokenObject = @{
|
||||
user = @{
|
||||
loginName = $User
|
||||
password = $Password
|
||||
}
|
||||
tokenType = @{
|
||||
type = "User"
|
||||
}
|
||||
}
|
||||
try
|
||||
{
|
||||
Ignore-SelfSignedCerts
|
||||
#$token = Invoke-RestMethod -Method Post -Uri $tokensUri -Body (ConvertTo-Json $tokenObject) -ContentType 'application/json; charset=utf-8' -ErrorVariable $RestException -SkipCertificateCheck
|
||||
$token = Invoke-RestMethod -Method Post -Uri $tokensUri -Body (ConvertTo-Json $tokenObject) -ContentType 'application/json; charset=utf-8' -ErrorVariable $RestException
|
||||
}
|
||||
catch
|
||||
{
|
||||
## $error = ConvertFrom-Json $RestException.ErrorDetails.Message
|
||||
##Write-Host ("Unable to fetch token for user '" + $user + "'")
|
||||
##Write-Host ("Error Code: " + $error.code)
|
||||
##Write-Host ("Message: " + $error.message)
|
||||
Write-Host ("StatusCode: " + $_.Exception.Response.StatusCode.value__)
|
||||
Write-Host ("StatusDescription: " + $_.Exception.Response.StatusDescription)
|
||||
Write-Host ("Message: " + $_[0].message)
|
||||
##$Global:OpConRESTAPIException = $_
|
||||
throw
|
||||
##exit $_.Exception.Response.StatusCode.value__
|
||||
}
|
||||
Write-Host ("Token retrieved successfully, Id: " + $token.id + ", Valid Until: " + $token.validUntil)
|
||||
return $token
|
||||
}
|
||||
|
||||
Function Get-OpConApiAuthHeader {
|
||||
Param(
|
||||
[string] $Token
|
||||
)
|
||||
|
||||
$authHeader = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
|
||||
$authHeader.Add("Authorization", ("Token " + $Token))
|
||||
|
||||
return $authHeader
|
||||
}
|
||||
|
||||
#--------------------------------------------------------[Debut Du Script]---------------------------------------------------------
|
||||
|
||||
Login-RestApi -ApiUrl $ServerUrl -OpConUser $OpConUser -OpConPassword $clearPassword
|
||||
|
||||
#Nombre de fichier présent dans le répertoire
|
||||
$ListFile = Get-ChildItem -Path $CheminSource"\*" -Include "*.$Pattern" | Select Name,FullName
|
||||
$FileCount = $ListFile.count
|
||||
|
||||
$PourcentageFichier = (($Pourcentage/100)*$FileCount)
|
||||
$PourcentageFichier = [math]::floor($PourcentageFichier)
|
||||
|
||||
If (!(Test-Path $FolderBackup)) {
|
||||
New-Item -Path $FolderBackup -ItemType Directory
|
||||
New-Item -Path $FolderLotA -ItemType Directory
|
||||
New-Item -Path $FolderLotB -ItemType Directory
|
||||
New-Item -Path $FolderLock -ItemType Directory
|
||||
}
|
||||
|
||||
Foreach ($File in $ListFile) {
|
||||
Copy-Item $File.FullName -Destination $FolderBackup
|
||||
|
||||
If ($Compteur -le $PourcentageFichier) {
|
||||
Move-Item $File.FullName -Destination $FolderLotA
|
||||
}
|
||||
Else {
|
||||
Move-Item $File.FullName -Destination $FolderLotB
|
||||
}
|
||||
|
||||
$Compteur = $Compteur + 1
|
||||
}
|
||||
|
||||
#---------------------------------------------------------[Fin Du Script]----------------------------------------------------------
|
||||
|
||||
Stop-Transcript
|
14
Exemples/Envoie-Mail.ps1
Normal file
14
Exemples/Envoie-Mail.ps1
Normal file
@ -0,0 +1,14 @@
|
||||
$Destinataires = "hubert.cornet-ext@saint-maclou.com","thedjinhn@gmail.com"
|
||||
[string[]]$To = $Destinataires.Split(',')
|
||||
$From = "POWERSHELL@saint-maclou.com"
|
||||
$Subject = "Exemple 3"
|
||||
$BODY = "Some important plain text!"
|
||||
$SmtpServer = "RELAISSMTP.FR.DGS.GROUP"
|
||||
$Port = "25"
|
||||
$Attachments = ""
|
||||
$Bcc = ""
|
||||
$Cc = ""
|
||||
$Encoding = ""
|
||||
$Priority = "Normal"
|
||||
|
||||
Send-MailMessage -To $To -From $From -Subject $Subject -Body $BODY -SmtpServer $SmtpServer -Port $Port -BodyAsHtml -Priority $Priority #-Bcc $Bcc -Cc $Cc -Encoding $Encoding -Attachments $Attachments
|
431
Exemples/Fichier multiple/Liste-import.csv
Normal file
431
Exemples/Fichier multiple/Liste-import.csv
Normal file
@ -0,0 +1,431 @@
|
||||
objet;marque;modele;serial;autre
|
||||
IMPRIMANTE;RICOH;1515F;K2268700985;P.1/2
|
||||
IMPRIMANTE;RICOH;1515F;K2268500899;P.1/2
|
||||
IMPRIMANTE;RICOH;1515F;K2258801771;P.1/2
|
||||
IMPRIMANTE;RICOH;1515F;K2258600994;P.1/2
|
||||
IMPRIMANTE;RICOH;1515F;K2259401255;P.1/2
|
||||
IMPRIMANTE;RICOH;1515F;K2259600645;P.1/2
|
||||
IMPRIMANTE;RICOH;1515F;K2268600239;P.1/2
|
||||
IMPRIMANTE;RICOH;1515F;K2259101182;P.1/2
|
||||
IMPRIMANTE;RICOH;1515MF;K2169008365;P.1/2
|
||||
IMPRIMANTE;RICOH;1515MF;K2168907266;P.1/2
|
||||
IMPRIMANTE;RICOH;MP201SPF;W3029500722;P.3
|
||||
IMPRIMANTE;RICOH;MP201SPF;W3038800967;P.3
|
||||
IMPRIMANTE;RICOH;MP201SPF;W3029502690;P.3
|
||||
IMPRIMANTE;RICOH;MP201SPF;W3029502959;P.3
|
||||
IMPRIMANTE;RICOH;MP201SPF;W3029303536;P.3
|
||||
IMPRIMANTE;RICOH;MP171SPF;V4489601154;P.3
|
||||
IMPRIMANTE;RICOH;MP171SPF;V4498501045;P.3
|
||||
IMPRIMANTE;RICOH;MP171SPF;V4498500895;P.3
|
||||
IMPRIMANTE;RICOH;MPC407SPF;C499P700786;P.5
|
||||
IMPRIMANTE;RICOH;MPC407SPF;C499P700804;P.5
|
||||
IMPRIMANTE;KONICA MINOLTA;BIZHUB36;A0ED94360;P.6
|
||||
IMPRIMANTE;KONICA MINOLTA;BIZHUB36;A0ED94360;P.6
|
||||
IMPRIMANTE;KONICA MINOLTA;;A32R022015985;P.3
|
||||
UC;DELL;DCNE;9L4JJ3J;P.16
|
||||
UC;DELL;DCNE;FL4JJ3J;P.16
|
||||
UC;DELL;DCNE;20WJ94J;P.16
|
||||
UC;DELL;DCNE;57WJ94J;P.16
|
||||
UC;DELL;DCNE;BST434J;P.16
|
||||
UC;DELL;DCNE;G25VL4J;P.16
|
||||
UC;DELL;DCNE;D4WJ94J;P.16
|
||||
UC;DELL;DCNE;DZVJ94J;P.16
|
||||
UC;DELL;DCNE;C5WJ94J;P.16
|
||||
UC;DELL;DCNE;GYVJ94J;P.16
|
||||
UC;DELL;DCNE;25WJ94J;P.16
|
||||
UC;DELL;DCNE;CZVJ94J;P.16
|
||||
UC;DELL;DCNE;50WJ94J;P.16
|
||||
UC;DELL;DCNE;5YVJ94J;P.16
|
||||
UC;DELL;DCNE;G3WJ94J;P.16
|
||||
UC;DELL;DCNE;J0WJ94J;P.16
|
||||
UC;DELL;DCNE;67WJ94J;P.16
|
||||
UC;DELL;DCNE;24WJ94J;P.16
|
||||
UC;DELL;DCNE;DL4JJ3J;P.16
|
||||
UC;DELL;DCNE;72WJ94J;P.16
|
||||
UC;DELL;DCNE;G2WJ94J;P.16
|
||||
UC;DELL;DCNE;82WJ94J;P.16
|
||||
UC;DELL;DCNE;7ZVJ94J;P.16
|
||||
UC;DELL;DCNE;94WJ94J;P.16
|
||||
UC;DELL;DCNE;31WJ94J;P.16
|
||||
UC;DELL;DCNE;70WJ94J;P.16
|
||||
UC;DELL;DCNE;41WJ94J;P.16
|
||||
UC;DELL;DCNE;G1WJ94J;P.16
|
||||
UC;DELL;DCNE;60WJ94J;P.16
|
||||
UC;DELL;DCNE;HZVJ94J;P.16
|
||||
UC;DELL;DCNE;G0WJ94J;P.16
|
||||
UC;DELL;DCNE;84WJ94J;P.16
|
||||
UC;DELL;DCNE;J4WJ94J;P.16
|
||||
UC;DELL;DCNE;F6WJ94J;P.16
|
||||
UC;DELL;DCNE;92WJ94J;P.16
|
||||
UC;DELL;DCNE;FYVJ94J;P.16
|
||||
UC;DELL;DCNE;37WJ94J;P.16
|
||||
UC;DELL;DCNE;60DGX3J;P.16
|
||||
UC;DELL;DHS;H32GV1J;P.16
|
||||
UC;DELL;DHS;3WNWR0J;P.16
|
||||
UC;DELL;DHS;7GBBG1J;P.16
|
||||
UC;DELL;DHS;7LXMS1J;P.16
|
||||
UC;DELL;DHS;8LM5S0J;P.16
|
||||
UC;DELL;DHS;?;P.16
|
||||
UC;DELL;DHP;4HCSQ1J;P.16
|
||||
UC;DELL;DHP;JPYKF1J;P.16
|
||||
UC;DELL;DHP;J569K1J;P.16
|
||||
UC;DELL;DCSM;GXVXG4J;P.16
|
||||
UC;DELL;DCSM;JXVXG4J;P.16
|
||||
UC;DELL;DCSM;3YVXG4J;P.16
|
||||
UC;DELL;DCCY;6YKF32J;P.16
|
||||
IMPRIMANTE;KONICA MINOLTA;BIZHUB 3300P;A63P021013846;P.7/8
|
||||
IMPRIMANTE;KONICA MINOLTA;BIZHUB 3300P;A63P021013808;P.7/8
|
||||
IMPRIMANTE;KONICA MINOLTA;BIZHUB 3300P;A63P021019527;P.7/8
|
||||
IMPRIMANTE;KONICA MINOLTA;BIZHUB 3300P;A63P021019525;P.7/8
|
||||
IMPRIMANTE;KONICA MINOLTA;BIZHUB 3300P;A63P021013799;P.7/8
|
||||
IMPRIMANTE;KONICA MINOLTA;BIZHUB 3300P;A63P021013837;P.7/8
|
||||
IMPRIMANTE;KONICA MINOLTA;BIZHUB 3300P;A63P021013794;P.7/8
|
||||
IMPRIMANTE;KONICA MINOLTA;BIZHUB 3300P;A63P021013821;P.7/8
|
||||
IMPRIMANTE;KONICA MINOLTA;BIZHUB 3300P;A63P021019536;P.7/8
|
||||
IMPRIMANTE;KONICA MINOLTA;BIZHUB 3300P;A63P021013743;P.7/8
|
||||
IMPRIMANTE;KONICA MINOLTA;BIZHUB 3300P;A63P021019473;P.7/8
|
||||
IMPRIMANTE;KONICA MINOLTA;BIZHUB 3300P;A63P021019535;P.7/8
|
||||
IMPRIMANTE;KONICA MINOLTA;BIZHUB 3300P;A63P021013839;P.7/8
|
||||
IMPRIMANTE;KONICA MINOLTA;BIZHUB 3300P;A63P021019538;P.7/8
|
||||
IMPRIMANTE;KONICA MINOLTA;BIZHUB 3300P;A63P021013830;P.7/8
|
||||
IMPRIMANTE;KONICA MINOLTA;BIZHUB 3300P;451433LM12LD3;P.7/8
|
||||
IMPRIMANTE;KONICA MINOLTA;BIZHUB 3300P;451433LM12LC2;P.7/8
|
||||
IMPRIMANTE;KONICA MINOLTA;BIZHUB 3300P;451433LM11C1;P.7/8
|
||||
IMPRIMANTE;KONICA MINOLTA;BIZHUB 3300P;A63P021022185;P.7/8
|
||||
IMPRIMANTE;KONICA MINOLTA;BIZHUB 20P;A32P021024680;P.7/8
|
||||
IMPRIMANTE;KONICA MINOLTA;BIZHUB 20P;A32P021024664;P.7/8
|
||||
IMPRIMANTE;KONICA MINOLTA;BIZHUB 20P;A32P021024678;P.7/8
|
||||
IMPRIMANTE;KONICA MINOLTA;BIZHUB 20P;A32P021024682;P.7/8
|
||||
IMPRIMANTE;KONICA MINOLTA;BIZHUB 20P;A32P021024676;P.7/8
|
||||
IMPRIMANTE;EPSON;AL-M200DN;RVCZ104482;P.7/8
|
||||
IMPRIMANTE;EPSON;AL-M200DN;RVCZ104679;P.7/8
|
||||
IMPRIMANTE;EPSON;AL-M200DN;RVCZ102517;P.7/8
|
||||
IMPRIMANTE;EPSON;AL-M200DN;RVCZ104680;P.7/8
|
||||
IMPRIMANTE;DELL;LASER PRINTER 1720DN;0UJ532;P.9
|
||||
IMPRIMANTE;DELL;LASER PRINTER 1720DN;0UJ532;P.9
|
||||
IMPRIMANTE;DELL;LASER PRINTER 1720DN;0UJ532;P.9
|
||||
IMPRIMANTE;DELL;LASER PRINTER 1720DN;0UJ532;P.9
|
||||
IMPRIMANTE;DELL;LASER PRINTER 1720DN;0UJ532;P.9
|
||||
IMPRIMANTE;DELL;LASER PRINTER 1720DN;0UJ532;P.9
|
||||
IMPRIMANTE;DELL;LASER PRINTER 1720DN;0UJ532;P.9
|
||||
IMPRIMANTE;DELL;LASER PRINTER 1720DN;0UJ532;P.9
|
||||
IMPRIMANTE;DELL;LASER PRINTER 1720DN;0MX028;P.9
|
||||
IMPRIMANTE;DELL;LASER PRINTER 1720DN;0MX028;P.9
|
||||
IMPRIMANTE;DELL;LASER PRINTER 1720DN;0MX028;P.9
|
||||
IMPRIMANTE;DELL;LASER PRINTER 1720DN;0MX028;P.9
|
||||
IMPRIMANTE;DELL;LASER PRINTER 1720DN;0MX028;P.9
|
||||
IMPRIMANTE;DELL;LASER PRINTER 1720DN;0MX028;P.9
|
||||
IMPRIMANTE;DELL;LASER PRINTER 1720DN;0M6CFG;P.9
|
||||
IMPRIMANTE;DELL;LASER PRINTER 1720DN;0M6CFG;P.9
|
||||
IMPRIMANTE;DELL;LASER PRINTER 1720DN;0M6CFG;P.9
|
||||
IMPRIMANTE;DELL;LASER PRINTER 1720DN;0M6CFG;P.9
|
||||
IMPRIMANTE;DELL;LASER PRINTER 1720DN;0M6CFG;P.9
|
||||
IMPRIMANTE;DELL;LASER PRINTER 1720DN;0M6CFG;P.9
|
||||
IMPRIMANTE;DELL;LASER PRINTER 1720DN;0R511D;P.9
|
||||
IMPRIMANTE;DELL;LASER PRINTER 1720DN;0R511D;P.9
|
||||
IMPRIMANTE;DELL;LASER PRINTER 1720DN;0R511D;P.9
|
||||
IMPRIMANTE;DELL;LASER PRINTER 1720DN;DP4733;P.9
|
||||
IMPRIMANTE;DELL;LASER PRINTER 1720DN;DP4733;P.9
|
||||
IMPRIMANTE;DELL;LASER PRINTER 1720DN;0M9834;P.9
|
||||
IMPRIMANTE;C352A;;LEVY159613;P.9
|
||||
IMPRIMANTE;PRINTRONIX;P7210;6R07120114;FOND ENTREP<45>T
|
||||
IMPRIMANTE;PRINTRONIX;P7210;6RV608150016;FOND ENTREP<45>T
|
||||
IMPRIMANTE;KONICA MINOLTA;BIZHUB36;A45X02100P006;FOND ENTREP<45>T
|
||||
IMPRIMANTE;KONICA MINOLTA;BIZHUB36;A45X021008070;FOND ENTREP<45>T
|
||||
IMPRIMANTE;RICOH;MPC2050;V2294502701;FOND ENTREP<45>T
|
||||
IMPRIMANTE;RICOH;1027;K2259600645;FOND ENTREP<45>T
|
||||
IMPRIMANTE;RICOH;MP2550;M6584000997;FOND ENTREP<45>T
|
||||
IMPRIMANTE;RICOH;MPC3500;L8974200939;FOND ENTREP<45>T
|
||||
IMPRIMANTE;RICOH;3025;K8563804891;FOND ENTREP<45>T
|
||||
IMPRIMANTE;RICOH;MPC5000;V1303000756;FOND ENTREP<45>T
|
||||
SERVEUR;EMS01;;2PK2T3J;P.10/11
|
||||
SERVEUR;EMS01;;1NG73TJ;P.10/11
|
||||
SERVEUR;EMS01;;3PK2T3J;P.10/11
|
||||
SERVEUR;3573;;xSB2008SD;P.10/11
|
||||
SERVEUR;JPE-i;;CF2NV075200123;P.10/11
|
||||
SERVEUR;B2G;;KD7N908;P.10/11
|
||||
SERVEUR;EMC;;AC979094950279;P.10/11
|
||||
SERVEUR;7945L4G;;K45GTT;P.10/11
|
||||
SERVEUR;TL2000;;H79851F;P.10/11
|
||||
SERVEUR;7945L4G;;KD45FYH;P.10/11
|
||||
UC;SCL;;5LPDM0J;P.10/11
|
||||
UC;SCL;;6LPDM0J;P.10/11
|
||||
UC;SCL;;1Y6W21J;P.10/11
|
||||
UC;ECM;;FFWJF2J;P.10/11
|
||||
UC;ECM;;1222904;P.10/11
|
||||
UC;ECM;;CZT5F1J;P.10/11
|
||||
UC;ECM;;GYG9B1J;P.10/11
|
||||
IMPRIM. ENTREPOT;B-472-QP;;1N310342;P.10/11
|
||||
IMPRIM. ENTREPOT;B-672-QP;;28015220298;P.10/11
|
||||
IMPRIM. ENTREPOT;B-672-QP;;2801522285;P.10/11
|
||||
IMPRIMANTE;LEXMARK;MS421DN;S460083510CV0M;P.4
|
||||
IMPRIMANTE;LEXMARK;MS421DN;S460083510CT73;P.4
|
||||
IMPRIMANTE;LEXMARK;MS421DN;S460083510CV11;P.4
|
||||
UC;DELL;OPTIPLEX 7010;7QDKJ32;P.17
|
||||
UC;DELL;OPTIPLEX 360;1,44561E+11;?
|
||||
IMPRIMANTE;LEXMARK;7017-476;S701793530FNMX;P.4
|
||||
IMPRIMANTE;LEXMARK;MS421DN;S701793530FNBW;P.4
|
||||
UC;DELL;OPTIPLEX 3020;JBH4952;P.18
|
||||
UC;DELL;OPTIPLEX 3020;D9H4952;P.18
|
||||
UC;DELL;OPTIPLEX 3020;CTWFZ72;P.18
|
||||
UC;DELL;D11S;H1YCGM2;P.17
|
||||
UC;DELL;D11S;7JGSV22;P.17
|
||||
IMPRIMANTE;DELL;;G7QJR0J;
|
||||
UC;DELL;OPTIPLEX 3060;TPV1824Z;
|
||||
UC;DELL;OPTIPLEX 3060;TPV1824X;
|
||||
UC;HP;;CZC310320M;
|
||||
UC;HP;;CZC4124DPG;
|
||||
UC;HP;;CZC4162WNV;
|
||||
UC;HP;;CZC4124DPR;
|
||||
ECRAN;FUJITSU - W2112;W2112;YV8T028676;P.18
|
||||
ECRAN;FUJITSU - L22T-2;L22T-2;YV7Q006974;P.18
|
||||
ECRAN;FUJITSU - W2112;W2112;YV8T028265;P.18
|
||||
ECRAN;FUJITSU;;YV5F216107;P.18
|
||||
ECRAN;FUJITSU;;YV5F216068;P.18
|
||||
ECRAN;AOC - 215LM00063;215LM00063;B63G2QA002736;P.17
|
||||
ECRAN;AOC - 215LM00063;215LM00063;B63GAQA010890;P.17
|
||||
ECRAN;AOC - 215LM00063;215LM00063;B63G2QA002667;P.17
|
||||
ECRAN;AOC - 215LM00063;215LM00063;B63GBQA014401;P.17
|
||||
ECRAN;AOC - 215LM00063;215LM00063;B63G8QA001019;P.17
|
||||
ECRAN;AOC - 215LM0041;215LM0041;GFRGBHA005133;P.17
|
||||
ECRAN;AOC - 215LM0041;215LM0041;GFRGBHA005159;P.17
|
||||
ECRAN;AOC - 215LM0041;215LM0041;GFRGBHA005137;P.17
|
||||
ECRAN;AOC - 215LM0041;215LM0041;GFRGBHA005179;P.17
|
||||
ECRAN;AOC - 215LM0041;215LM0041;GFRGBHA005147;P.17
|
||||
ECRAN;AOC - 215LM0041;215LM0041;GFRGBHA005132;P.17
|
||||
ECRAN;AOC - 215LM0041;215LM0041;GFRGBHA005146;P.17
|
||||
ECRAN;AOC - 215LM00019;215LM00019;GAXF1HA002177;P.17
|
||||
ECRAN;DELL;;CN-044FGY-72872-44J-C8YM;P.18
|
||||
ECRAN;DELL;;CN-0PD06D-72872-4AH-C3CM;P.18
|
||||
ECRAN;DELL;;CN-0PD06D-72872-4AH-C0WM;P.18
|
||||
ECRAN;DELL;;CN-0C2XM8-74445-22L-526L;P.18
|
||||
ECRAN;DELL;;CN-029C29-74261-58D-1NDS;P.18
|
||||
ECRAN;LG - 22M37A;22M37A;S04NTQD10436;P.18
|
||||
ECRAN;LG - 22M37A;22M37A;S04NTYT10458;P.18
|
||||
ECRAN;LG - 22M37A;22M37A;S04NTLE10464;P.18
|
||||
ECRAN;LG - 22M37A;22M37A;S04NTEP10420;P.18
|
||||
ECRAN;HANNS.G - HC174D;HC174D;646DK3NA01059;P.18
|
||||
ECRAN;ACER - V193W;V193W;ETLJE0W1810490320C4306;P.19
|
||||
ECRAN;ACER - V193W;V193W;ETLJE0W181049032264306;P.19
|
||||
ECRAN;ACER - V193W;V193W;ETLJE0W1810490329D4306;P.19
|
||||
ECRAN;ACER - V193W;V193W;ETLJE0W181049032864306;P.19
|
||||
ECRAN;ACER - V193W;V193W;ETLJE0W181049032184306;P.19
|
||||
ECRAN;ACER - V193W;V193W;ETLJE0W181049032A84306;P.19
|
||||
ECRAN;ACER - V193W;V193W;ETLJE0W181049032174306;P.19
|
||||
ECRAN;ACER - V193W;V193W;ETLJE0W1810490321B4306;P.19
|
||||
ECRAN;ACER - V193W;V193W;ETLJE0W181107082704309;P.19
|
||||
ECRAN;ACER - V193W;V193W;ETLJE0W181107082714309;P.19
|
||||
ECRAN;ACER - V193W;V193W;ETLJE0W1811070827F4309;P.19
|
||||
ECRAN;ACER - V193W;V193W;ETLJE0W1811070827D4309;P.19
|
||||
ECRAN;ACER - V193W;V193W;ETLJE0W1811070826A4309;P.19
|
||||
ECRAN;ACER - V193W;V193W;ETLJE0W181107081C34309;P.19
|
||||
ECRAN;ACER - V193W;V193W;ETLBP0C186051266ED40G0;P.19
|
||||
ECRAN;ACER - V193W;V193W;ETLBP0C186051269BD40G0;P.19
|
||||
ECRAN;ACER - V193WD;V193WD;ETLHV0D0929420AB888500;P.19
|
||||
ECRAN;ACER - V193WD;V193WD;ETLHV0D0929420A3D18500;P.19
|
||||
ECRAN;ACER - V193WD;V193WD;ETLHV0D0929420AB758500;P.19
|
||||
ECRAN;ACER - V193WD;V193WD;ETLHV0D0929420A8098500;P.19
|
||||
ECRAN;ACER - V193WD;V193WD;ETLHV0D0929420A8188500;P.19
|
||||
ECRAN;ACER - V193WD;V193WD;ETLHV0D0929420AB8A8500;P.19
|
||||
ECRAN;ACER - V193WD;V193WD;ETLHV0D0929420AB168500;P.19
|
||||
ECRAN;ACER - V193WD;V193WD;ETLHV0D0929420AB768500;P.19
|
||||
ECRAN;ACER - V193WD;V193WD;ETLHV0D0929420AB7C8500;P.19
|
||||
ECRAN;ACER - V193WD;V193WD;ETLHV0D0929420AB798500;P.19
|
||||
ECRAN;ACER - V226HQL;V226HQL;MMLY7EE0164480746D8513;
|
||||
ECRAN;ACER - V226HQL;V226HQL;MMLY7EE016448074DB8513;
|
||||
ECRAN;ACER - V193HQV;V193HQV;ETLKX0W020224028F84300;P.19
|
||||
ECRAN;ACER - V193HQV;V193HQV;ETLKX0W020224028DC4300;P.19
|
||||
ECRAN;ACER - V193HQV;V193HQV;ETLKX0W020224029024300;P.19
|
||||
ECRAN;ACER - V173;V173;ETLCA02018823045894111;P.19
|
||||
ECRAN;ACER - V196WL;V196WL;MMLXWEE005311068338530;P.19
|
||||
ECRAN;ACER - V196WL;V196WL;MMLXWEE005311069888530;P.19
|
||||
ECRAN;ACER - V196WL;V196WL;MMLXWEE0053110694E8530;P.19
|
||||
IMPRIMANTE;KYOCERA - FS-2100DN;FS-2100DN;V1N5789691;P.4
|
||||
UC;DELL - D07D001;D07D001;;P.18
|
||||
UC;DELL - D07D001;D07D001;;P.18
|
||||
UC;DELL - D07D001;D07D001;;P.18
|
||||
UC;DELL - D07D001;D07D001;;P.18
|
||||
UC;DELL - D07D001;D07D001;;P.18
|
||||
UC;DELL - D07D001;D07D001;;P.18
|
||||
UC;HP;;CZC4124DPR;P.17
|
||||
UC;HP;;CZC4124DV5;P.17
|
||||
UC;HP;;CZC4124DQW;P.17
|
||||
UC;HP;;CZC4124DQC;P.17
|
||||
UC;HP;;CZC4162WP7;P.17
|
||||
UC;HP;;CZC4162WP0;P.17
|
||||
UC;HP;;CZC4162WMT;P.17
|
||||
UC;HP;;CZC4140VRT;P.17
|
||||
IMPRIMANTE;MS410DN;MS410DN;S451445LM1YDNK;P.4
|
||||
IMPRIMANTE;MS410DN;MS410DN;S451445LM206BF;P.4
|
||||
IMPRIMANTE;MS410DN;MS410DN;S451445LM20696;P.4
|
||||
IMPRIMANTE;;;S451445L1YDVL;P.4
|
||||
IMPRIMANTE;;;S451445L1YDMW;P.4
|
||||
IMPRIMANTE;;;S451445LM1F094;P.4
|
||||
IMPRIMANTE;;;S451445LM1YDGB;P.4
|
||||
IMPRIMANTE;;;S451445LM1Z5HP;P.4
|
||||
IMPRIMANTE;- MS415DN;MS415DN;S451445LM1YDZ;P.4
|
||||
IMPRIMANTE;DELL - 0MX028;0MX028;;P.4
|
||||
UC;DELL;;1,86177E+11;P.15
|
||||
UC;DELL;;1,86177E+11;P.15
|
||||
UC;DELL;;1,86177E+11;P.15
|
||||
UC;DELL;;1,86177E+11;P.15
|
||||
UC;DELL;;1,86177E+11;P.15
|
||||
UC;DELL;;1,86177E+11;P.15
|
||||
UC;DELL;;1,86217E+11;P.15
|
||||
UC;DELL;;1,86177E+11;P.15
|
||||
UC;DELL;;1,86177E+11;P.15
|
||||
UC;DELL;;1,86275E+11;P.15
|
||||
UC;DELL;;1KGSV22;P.15
|
||||
UC;DELL;;4KGSV22;P.15
|
||||
UC;DELL;;1,86177E+11;P.15
|
||||
UC;DELL;;1,86177E+11;P.15
|
||||
UC;DELL;;1,86177E+11;P.15
|
||||
UC;DELL;;1,86177E+11;P.15
|
||||
UC;DELL;;1,86177E+11;P.15
|
||||
UC;DELL;;1,86177E+11;P.15
|
||||
UC;DELL;;1,86177E+11;P.15
|
||||
UC;DELL;;1,86177E+11;P.15
|
||||
UC;DELL;;1,86275E+11;P.15
|
||||
UC;DELL;;1,86177E+11;P.15
|
||||
UC;DELL;;1,86177E+11;P.15
|
||||
UC;DELL;;1,86177E+11;P.15
|
||||
UC;HP;;CZC310320Q;P.15
|
||||
UC;HP;;CZC3360BQD;P.15
|
||||
UC;HP;;CZC242CW3Z;P.15
|
||||
UC;HP;;CZC310320W;P.15
|
||||
UC;HP;;CZC3360BQH;P.15
|
||||
UC;HP;;CZC3360BQM;P.15
|
||||
UC;HP;;CZC310320T;P.15
|
||||
UC;HP;;CZC3360BQJ;P.15
|
||||
UC;HP;;CZC310320P;P.15
|
||||
UC;HP;;CZC4162WMW;P.15
|
||||
UC;HP;;CZC4162WPB;P.15
|
||||
UC;HP;;CZC4162WNL;P.15
|
||||
UC;HP;;CZC3360BQB;P.15
|
||||
UC;HP;;CZC310320N;P.15
|
||||
UC;HP;;CZC3360BQK;P.15
|
||||
UC;HP;;CZC310320V;P.15
|
||||
IMPRIMANTE;LEXMARK MS410DN;MS410DN;S451445LM1Z5VY;P.4
|
||||
IMPRIMANTE;LEXMARK MS410DN;MS410DN;S451445LM1YDV8;P.4
|
||||
IMPRIMANTE;LEXMARK MS410DN;MS410DN;S451444LM1F0CB;P.4
|
||||
IMPRIMANTE;LEXMARK MS410DN;MS410DN;S451444LM1F095;P.4
|
||||
IMPRIMANTE;KONICA MINOLTA;BIZHUB 3300P;S451443LM185KL;P.4
|
||||
IMPRIMANTE;KONICA MINOLTA;BIZHUB 3300P;S451445LM1Z638;P.4
|
||||
IMPRIMANTE;KONICA MINOLTA;BIZHUB 3300P;S451445LM206CC;P.4
|
||||
IMPRIMANTE;KONICA MINOLTA - BIZHUB 3300P;BIZHUB 3300P;S451444LM1F06F;P.4
|
||||
IMPRIMANTE;MS421DW;MS421DW;S46009323104XX;P.4
|
||||
IMPRIMANTE;MS421DW;MS421DW;S46009323105LV;P.4
|
||||
SWITCH;TP LINK;TL-SF1008P;10B64901046;CAGE
|
||||
SWITCH;TP LINK;TL-SF1008P;13175202775;CAGE
|
||||
SWITCH;TP LINK;TL-SF1008P;13175202783;CAGE
|
||||
SWITCH;TP LINK - TL-SF1008P;TL-SF1008P;11B95800510;CAGE
|
||||
SWITCH;TP LINK - TL-SF1008P;TL-SF1008P;9983300925;CAGE
|
||||
SWITCH;TP LINK - TL-SF1008P;TL-SF1008P;11B95800501;CAGE
|
||||
SWITCH;TP LINK;TL-SF1008P;11370200527;CAGE
|
||||
SWITCH;TP LINK - TL-SF1008P;TL-SF1008P;13168801655;CAGE
|
||||
SWITCH;TP LINK - TL-SF1008P;TL-SF1008P;13175202855;CAGE
|
||||
SWITCH;TP LINK - TL-SF1008P;TL-SF1008P;9975800770;CAGE
|
||||
SWITCH;TP LINK - TL-SF1008P;TL-SF1008P;13175202784;CAGE
|
||||
SWITCH;TP LINK - TL-SF1008P;TL-SF1008P;11B95800295;CAGE
|
||||
SWITCH;TP LINK - TL-SF1008P;TL-SF1008P;9983300890;CAGE
|
||||
SWITCH;TP LINK - TL-SF1008P;TL-SF1008P;9975800767;CAGE
|
||||
SWITCH;TP LINK - TL-SF1008P;TL-SF1008P;10B64901052;CAGE
|
||||
SWITCH;TP LINK - TL-SF1008P;TL-SF1008P;9983300941;CAGE
|
||||
SWITCH;TP LINK - TL-SF1008P;TL-SF1008P;13175202777;CAGE
|
||||
SWITCH;TP LINK - TL-SF1008P;TL-SF1008P;9975800719;CAGE
|
||||
SWITCH;TP LINK - TL-SF1008P;TL-SF1008P;11264301877;CAGE
|
||||
SWITCH;TP LINK - TL-SF1008P;TL-SF1008P;11264301274;CAGE
|
||||
SWITCH;SMC - EZ108DT;EZ108DT;T184601903;CAGE
|
||||
SWITCH;SMC - EZ108DT;EZ108DT;T162516018;CAGE
|
||||
SWITCH;SMC - EZ108DT;EZ108DT;T185002057;CAGE
|
||||
SWITCH;SMC - EZ108DT;EZ108DT;T185002013;CAGE
|
||||
SWITCH;SMC - EZ108DT;EZ108DT;T142201396;CAGE
|
||||
SWITCH;SMC - EZ108DT;EZ108DT;T134706296;CAGE
|
||||
SWITCH;ATI - FS708;FS708;L1E44153B;CAGE
|
||||
SWITCH;ATI - FS708;FS708;L0EZ4018B;CAGE
|
||||
SWITCH;ATI - FS708;FS708;L0KV4018B;CAGE
|
||||
SWITCH;ATI - FS708;FS708;L0FD4018B;CAGE
|
||||
SWITCH;MOTOROLA - PD3001/AC;PD3001/AC;SR10136050012326701;CAGE
|
||||
SWITCH;MOTOROLA - PD3001/AC;PD3001/AC;SR08526050058512401;CAGE
|
||||
SWITCH;MOTOROLA - PD3001/AC;PD3001/AC;SR11016050001140001;CAGE
|
||||
SWITCH;DACOMEX;;?;CAGE
|
||||
SWITCH;SMC - SMCGS8;SMCGS8;N11027006616;CAGE
|
||||
SWITCH;DEXLAN - EW-408R;EW-408R;53124800628;CAGE
|
||||
SWITCH;TP-LINK - TL-SF1016D;TL-SF1016D;2,14705E+12;CAGE
|
||||
SWITCH;TP-LINK - TL-SF1016D;TL-SF1016D;2,14752E+12;CAGE
|
||||
SWITCH;TP-LINK - TL-SF1016D;TL-SF1016D;2,14752E+12;CAGE
|
||||
SWITCH;TP-LINK - TL-SF1016D;TL-SF1016D;2,14752E+12;CAGE
|
||||
SWITCH;TP-LINK - TL-SF1016D;TL-SF1016D;2,14668E+12;CAGE
|
||||
SWITCH;TP-LINK - TL-POE150S;TL-SF1016D;2,14455E+12;CAGE
|
||||
UC;HP;;CZC6348XMS;P.20
|
||||
UC;HP;;CZC5112XXQ;P.20
|
||||
UC;HP;;CZC5112XY6;P.20
|
||||
UC;HP;;CZC5112XY1;P.20
|
||||
UC;HP;;CZC651782N;P.20
|
||||
UC;HP;;CZC4293K1Z;P.20
|
||||
UC;DELL - D08U;D08U;6FZ5C72;P.18
|
||||
UC;DELL - D08U;D08U;CTV9Z72;P.18
|
||||
WIFI;DELL - ANTENNE SF (WLAN);ANTENNE SF (WLAN);CN0WX4920084235O3249;CAGE
|
||||
WIFI;DELL - ANTENNE SF (WLAN);ANTENNE SF (WLAN);CN0WX4920084235O3253;CAGE
|
||||
WIFI;DELL - ANTENNE SF (WLAN);ANTENNE SF (WLAN);CN0WX4920084235O3223;CAGE
|
||||
WIFI;DELL - ANTENNE SF (WLAN);ANTENNE SF (WLAN);CN0WX4920084235O3252;CAGE
|
||||
WIFI;DELL - ANTENNE SF (WLAN);ANTENNE SF (WLAN);CN0RU2970084235O3264;CAGE
|
||||
WIFI;MOTOROLA - NCAP-500;NCAP-500;1,30305E+13;CAGE
|
||||
WIFI;MOTOROLA - NCAP-500;NCAP-500;1,41155E+13;CAGE
|
||||
WIFI;MOTOROLA - NCAP-500;NCAP-500;S14115523075061;CAGE
|
||||
WIFI;MOTOROLA - NCAP-500;NCAP-500;S14115523075467;CAGE
|
||||
WIFI;MOTOROLA - NCAP-500;NCAP-500;S14115523075264;CAGE
|
||||
WIFI;MOTOROLA - NCAP-500;NCAP-500;S14115523075250;HS/CAGE
|
||||
WIFI;MOTOROLA - NCAP-500;NCAP-500;S14115523075501;HS/CAGE
|
||||
SWITCH;MOTOROLA - PD3001/AC;PD3001/AC;SR10136050012326801;CAGE
|
||||
WIFI;MOTOROLA - AP-5131;AP-5131;1,03445E+13;CAGE
|
||||
WIFI;HOMERIDER / CR100_ANIG;CR100_ANIG;5,32202E+15;CAGE
|
||||
ECRAN;LG - 22M37A-B;22M37A-B;504NTHM10433;CAGE
|
||||
ECRAN;LG - 22M37A-B;22M37A-B;504NTFA10427;CAGE
|
||||
UC;HP - TPC-I011-DM;TPC-I011-DM;4CH602164M;
|
||||
ECRAN;AOC - 215LM00041;215LM00041;GFRGBHA005140;CAGE
|
||||
ECRAN;AOC - 215LM00041;215LM00041;GFRGBHA005188;CAGE
|
||||
ECRAN;AOC - 215LM00063;215LM00063;B63GAQA011751;CAGE
|
||||
ECRAN;AOC - 215LM00019;215LM00019;GAXF1HA002122;CAGE
|
||||
ECRAN;FUJITSU - W2112;W2112;YV8T028276;CAGE
|
||||
ECRAN;FUJITSU - L22T-2;L22T-2;YV7Q006922;CAGE
|
||||
ECRAN;AOC - 215LM00041;215LM00041;GFRGBHA004388;CAGE
|
||||
ECRAN;ACER - V193W;V193W;ETLJE0W1811070827A4309;CAGE
|
||||
ECRAN;ACER - V193W;V193W;ETLJE0W18104900320F4306;CAGE
|
||||
ECRAN;ACER - V193W D;V193W D;ETLHV0D0929420AB808500;CAGE
|
||||
ECRAN;ACER - V193W D;V193W D;ETLHV0D0929420AB948500;CAGE
|
||||
ECRAN;ACER - V193W D;V193W D;ETLHV0D0929420A8118500;CAGE
|
||||
ECRAN;ACER - V193W;V193W;ETLPB0C186051266E940G0;CAGE
|
||||
ECRAN;ACER - V193W;V193W;ETLJE0W181049032104306;CAGE
|
||||
ECRAN;ACER - V193W D;V193W D;ETLHV0D0929420A3D68500;CAGE
|
||||
ECRAN;AOC - 215LM00063;215LM00063;B63GAQA010841;HS / P.20
|
||||
ECRAN;DELL - E2216Hf;E2216Hf;CN-0XV9JN-72872-631-DKJL-A01;HS / P.20
|
||||
ECRAN;AOC - 215LM00019;215LM00019;GAXF1HA002080;HS / P.20
|
||||
ECRAN;AOC - 215LM00063;215LM00063;B63G2QA002742;HS / P.20
|
||||
ECRAN;FUJITSU - L22T-2;L22T-2;YV5F216051;HS / P.20
|
||||
UC;DELL - OPTIPLEX 390;OPTIPLEX 390;1,86177E+11;CAGE
|
||||
UC;DELL - OPTIPLEX 3010;OPTIPLEX 3010;1,86217E+11;CAGE
|
||||
ECRAN;AOC - 215LM00063;215LM00063;B63G6QA013855;HS / P.20
|
||||
ECRAN;AOC - 215LM00019;215LM00019;FZUECHA043503;HS / P.20
|
||||
ECRAN;AOC - 215LM00063;215LM00063;B63G6QA014012;HS / P.20
|
||||
ECRAN;AOC - 215LM00063;215LM00063;B63G6QA014098;CAGE
|
||||
ECRAN;AOC - 215LM00063;215LM00063;B63G6QA001233;HS / P.20
|
||||
ECRAN;AOC - 215LM00063;215LM00063;B63GAQA011924;HS / P.20
|
||||
ECRAN;AOC - 215LM00063;215LM00063;B63G6QA001232;HS / P.20
|
||||
ECRAN;AOC - 215LM00019;215LM00019;GAXF1HA002112;HS / P.20
|
||||
ECRAN;AOC - 215LM00019;215LM00019;GAXF1HA002079;HS / P.20
|
||||
UC;DELL - OPTIPLEX 390;OPTIPLEX 390;1,86177E+11;CAGE
|
||||
ECRAN;AOC - 215LM00063;215LM00063;B63GAQA010860;HS / P.20
|
||||
ECRAN;AOC - 215LM00019;215LM00019;GAXF1HA002060;HS / P.20
|
||||
ECRAN;AOC - 215LM00032;215LM00032;KARFC1A002746;HS / P.20
|
||||
ECRAN;AOC - 215LM00063;215LM00063;B63G6QA014075;HS / P.20
|
||||
ECRAN;AOC - 215LM00019;215LM00019;GAXF1HA013119;HS / P.20
|
||||
WIFI;TP-LINK - TL-POE150S;TL-POE150S;2,16948E+12;CAGE
|
||||
SWITCH;AVOCENT - SWITCH VIEW;SWITCH VIEW;FK0241919;CAGE
|
||||
WIFI;D-LINK - DWL-G520;DWL-G520;BN2G33B004856;CAGE
|
||||
SWITCH;3COM;3300XM;7MAV1D761C078;CAGE
|
||||
SWITCH;3COM;3300XM;7MAV1D761D278;HS / CAGE
|
||||
SWITCH;TRENDNET;TE100-S80g;CA1048S849840;CAGE
|
||||
UC;WYSE;SX0;61T8DC03152;CAGE
|
||||
SWITCH;TP-LINK;TL-POE150S;127A2804999;CAGE
|
||||
SWITCH;TP-LINK;TL-POE150S;127A2804982;CAGE
|
|
59
Exemples/Fichier multiple/script-multi-fichier.ps1
Normal file
59
Exemples/Fichier multiple/script-multi-fichier.ps1
Normal file
@ -0,0 +1,59 @@
|
||||
$Folder = "C:\Users\hubert.cornet\Downloads\Rules\"
|
||||
|
||||
clear
|
||||
|
||||
$Mag = $Null
|
||||
$FinalData = $Null
|
||||
$RANK = 100
|
||||
|
||||
For ($Num = 1 ;$Num -le 243 ; $Num++) {
|
||||
$RANK = 10
|
||||
$RANK = $RANK + $Num
|
||||
|
||||
$measureNum = $Num | Measure-Object -Character
|
||||
|
||||
If ($measureNum.Characters -eq 1 ) {
|
||||
$Mag = "00"+$Num
|
||||
}
|
||||
ElseIf ($measureNum.Characters -eq 2 ) {
|
||||
$Mag = "0"+$Num
|
||||
}
|
||||
ElseIf ($measureNum.Characters -eq 3 ) {
|
||||
$Mag = $Num
|
||||
}
|
||||
Else {
|
||||
|
||||
}
|
||||
|
||||
$DataTexte = "<?xml version='1.0'?>
|
||||
<rules>
|
||||
<rule>
|
||||
<entities_id>Saint-Maclou</entities_id>
|
||||
<sub_type>RuleTicket</sub_type>
|
||||
<ranking>$RANK</ranking>
|
||||
<name>MAG$Mag</name>
|
||||
<description></description>
|
||||
<match>AND</match>
|
||||
<is_active>1</is_active>
|
||||
<comment></comment>
|
||||
<is_recursive>0</is_recursive>
|
||||
<uuid>500717c8-2bd6e957-53a12b5fd37f94.10365$Mag</uuid>
|
||||
<condition>3</condition>
|
||||
<date_creation></date_creation>
|
||||
<rulecriteria>
|
||||
<criteria>_locations_id_of_requester</criteria>
|
||||
<condition>0</condition>
|
||||
<pattern>Magasins &#62; MAG$Mag</pattern>
|
||||
</rulecriteria>
|
||||
<ruleaction>
|
||||
<action_type>assign</action_type>
|
||||
<field>locations_id</field>
|
||||
<value>Magasins &#62; MAG$Mag</value>
|
||||
</ruleaction>
|
||||
</rule>
|
||||
</rules>"
|
||||
|
||||
$File = $Folder+"\rules-$Mag.xml"
|
||||
Add-Content $File $DataTexte
|
||||
}
|
||||
|
57
Exemples/Fichier multiple/script-un-fichier.ps1
Normal file
57
Exemples/Fichier multiple/script-un-fichier.ps1
Normal file
@ -0,0 +1,57 @@
|
||||
$File = "C:\Users\hubert.cornet\Downloads\rules-010.xml"
|
||||
|
||||
clear
|
||||
|
||||
$Mag = $Null
|
||||
$FinalData = $Null
|
||||
$RANK = 30
|
||||
|
||||
For ($Num = 1 ;$Num -le 243 ; $Num++) {
|
||||
$RANK = 10
|
||||
$RANK = $RANK + $Num
|
||||
|
||||
$measureNum = $Num | Measure-Object -Character
|
||||
|
||||
If ($measureNum.Characters -eq 1 ) {
|
||||
$Mag = "00"+$Num
|
||||
}
|
||||
ElseIf ($measureNum.Characters -eq 2 ) {
|
||||
$Mag = "0"+$Num
|
||||
}
|
||||
ElseIf ($measureNum.Characters -eq 3 ) {
|
||||
$Mag = $Num
|
||||
}
|
||||
Else {
|
||||
|
||||
}
|
||||
|
||||
$DataTexte = "
|
||||
<rule>
|
||||
<entities_id>Saint-Maclou</entities_id>
|
||||
<sub_type>RuleLocation</sub_type>
|
||||
<ranking>$RANK</ranking>
|
||||
<name>MAG$Mag</name>
|
||||
<description></description>
|
||||
<match>AND</match>
|
||||
<is_active>1</is_active>
|
||||
<comment></comment>
|
||||
<is_recursive>0</is_recursive>
|
||||
<uuid>500717c8-2bd6e957-53a12b5fd45f84.20365$Mag</uuid>
|
||||
<condition>0</condition>
|
||||
<date_creation></date_creation>
|
||||
<rulecriteria>
|
||||
<criteria>tag</criteria>
|
||||
<condition>0</condition>
|
||||
<pattern>MAG$Mag</pattern>
|
||||
</rulecriteria>
|
||||
<ruleaction>
|
||||
<action_type>assign</action_type>
|
||||
<field>locations_id</field>
|
||||
<value>Magasins &#62; MAG$Mag</value>
|
||||
</ruleaction>
|
||||
</rule>"
|
||||
|
||||
$FinalData += $DataTexte
|
||||
}
|
||||
|
||||
Add-Content $File $FinalData
|
96
Exemples/Finalisation.ps1
Normal file
96
Exemples/Finalisation.ps1
Normal file
@ -0,0 +1,96 @@
|
||||
[void][reflection.assembly]::loadwithpartialname("system.windows.forms")
|
||||
|
||||
Set-ExecutionPolicy Unrestricted
|
||||
Clear-Host
|
||||
|
||||
write-host "Lancement du script"
|
||||
write-host " "
|
||||
|
||||
# Fonction pour l'interface de saisie
|
||||
Function ModeInstall() {
|
||||
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
|
||||
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")
|
||||
|
||||
$objForm = New-Object System.Windows.Forms.Form
|
||||
$objForm.Text = "Finalisation serveur"
|
||||
$objForm.Size = New-Object System.Drawing.Size(500,300)
|
||||
$objForm.StartPosition = "CenterScreen"
|
||||
|
||||
$objForm.KeyPreview = $True
|
||||
$objForm.Add_KeyDown({if ($_.KeyCode -eq "Enter")
|
||||
{$ClusterInstall=$objListBoxCluster.SelectedItem;$objForm.hide()}})
|
||||
$objForm.Add_KeyDown({if ($_.KeyCode -eq "Escape")
|
||||
{$objForm.hide()}})
|
||||
$objForm.AcceptButton = $OKButton
|
||||
$objForm.CancelButton = $CancelButton
|
||||
|
||||
$OKButton = New-Object System.Windows.Forms.Button
|
||||
$OKButton.Location = New-Object System.Drawing.Size(10,230)
|
||||
$OKButton.Size = New-Object System.Drawing.Size(75,23)
|
||||
$OKButton.Text = "OK"
|
||||
$OKButton.DialogResult = [System.Windows.Forms.DialogResult]::OK
|
||||
|
||||
$CancelButton = New-Object System.Windows.Forms.Button
|
||||
$CancelButton.Location = New-Object System.Drawing.Size(200,230)
|
||||
$CancelButton.Size = New-Object System.Drawing.Size(75,23)
|
||||
$CancelButton.Text = "Cancel"
|
||||
$CancelButton.DialogResult = [System.Windows.Forms.DialogResult]::Cancel
|
||||
|
||||
$objLabel1 = New-Object System.Windows.Forms.Label
|
||||
$objLabel1.Location = New-Object System.Drawing.Size(10,20)
|
||||
$objLabel1.Size = New-Object System.Drawing.Size(280,20)
|
||||
$objLabel1.Text = "Merci de la clé Windows 2016 pour finaliser le serveur"
|
||||
|
||||
$objLabel3 = New-Object System.Windows.Forms.Label
|
||||
$objLabel3.Location = New-Object System.Drawing.Size(10,80)
|
||||
$objLabel3.Size = New-Object System.Drawing.Size(280,20)
|
||||
$objLabel3.Text = "clé : "
|
||||
|
||||
$objTextBoxKey = New-Object System.Windows.Forms.TextBox
|
||||
$objTextBoxKey.Location = New-Object System.Drawing.Size(10,100)
|
||||
$objTextBoxKey.Size = New-Object System.Drawing.Size(250,20)
|
||||
$objTextBoxKey.text = "AAAAA-BBBBB-CCCCC-DDDDD-EEEEE"
|
||||
$objForm.Controls.Add($objTextBoxKey)
|
||||
|
||||
|
||||
$objForm.Controls.AddRange(@($OKButton,$CancelButton,$objLabel1,$objLabel2,$objLabel3,$objLabel4,$objListBoxServeur))
|
||||
$objForm.Topmost = $True
|
||||
|
||||
$dialogResult = $objForm.ShowDialog()
|
||||
|
||||
if ($dialogResult -eq [System.Windows.Forms.DialogResult]::OK)
|
||||
{
|
||||
|
||||
$Key = $objTextBoxKey.Text
|
||||
#$InstallCRPCEN
|
||||
|
||||
$return = "$Key"
|
||||
$return
|
||||
}
|
||||
|
||||
$objForm.dispose()
|
||||
|
||||
} # End Function DriveList
|
||||
|
||||
write-host " *****************************************"
|
||||
Write-host " "
|
||||
|
||||
write-host " *****************************************"
|
||||
write-host " * Génération de l'interface"
|
||||
write-host " *****************************************"
|
||||
|
||||
$ModeInstall = ModeInstall
|
||||
write-host "- Données saisie ............................................... "
|
||||
$Blocage = $False
|
||||
|
||||
write-host "- Validation des informations saisie ............................. "
|
||||
if ($ModeInstall -ne $null) {
|
||||
$ModeInstall | foreach { $ModeInstall = $_ -split ';'
|
||||
$key = $ModeInstall[0]
|
||||
} }
|
||||
|
||||
write-host $key
|
||||
|
||||
Dism /online /Set-Edition:ServerStandard /AcceptEula /ProductKey:$key
|
||||
|
||||
Restart-Computer
|
125
Exemples/Get-FolderSize.ps1
Normal file
125
Exemples/Get-FolderSize.ps1
Normal file
@ -0,0 +1,125 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
|
||||
Cette fonction renvoi le nombre de fichier et la taille contenu dans le dossier ainsi que le détail pour les sous-dossiers sur N niveaux.
|
||||
Le résultat est un tableau indiquant le nombre et la taille des fichiers directement dans le dossier ainsi que le cumul des sous dossiers.
|
||||
Il est possible de définir l'unité pour les tailles (B,Kb,Mb,Gb), le nombre de niveau et de filtrer sur certains types de fichier (*.txt)
|
||||
La fonction utilise Get-childitem et Measure-Object.
|
||||
Attention à la version de PowerShell.
|
||||
|
||||
This function returns the number of files and the size contained in the folder as well as the detail for the subfolders on N levels.
|
||||
The result is a table showing the number and size of files directly in the folder as well as the total of subfolders.
|
||||
It is possible to set the unit for sizes (B, Kb, Mb, Gb), the number of level and filter on certain file types (* .txt)
|
||||
The function uses Get-childitem and Measure-Object.
|
||||
Watch out for the PowerShell version.
|
||||
|
||||
|
||||
.DESCRIPTION
|
||||
Cette fonction renvoie un tableau avec :
|
||||
- chemin du dossier (Path)
|
||||
- nombre de fichiers dans le dossier (InFolderFiles)
|
||||
- tailles des fichiers dans le dossier (InFolderSize)
|
||||
- nombre de fichier dans le dossier et les sous dossiers (AllFiles)
|
||||
- tailles des fichiers du dossier et des sous dossiers (AllSize)
|
||||
|
||||
This function returns an array with:
|
||||
- Path of the folder (Path)
|
||||
- number of files in the folder (InFolderFiles)
|
||||
- file sizes in the folder (InFolderSize)
|
||||
- number of files in the folder and subfolders (AllFiles)
|
||||
- file sizes of the folder and subfolders (AllSize)
|
||||
|
||||
|
||||
.PARAMETER FolderPath
|
||||
|
||||
Chemin du dossier à analyser
|
||||
Folder path to analyze
|
||||
|
||||
.PARAMETER Level
|
||||
|
||||
Nombre de niveau de sous dossier.
|
||||
Number of subfolder level.
|
||||
|
||||
.PARAMETER unit
|
||||
|
||||
Unité pour les tailles de fichiers (B,Kb,Mb,Gb).Par défaut :Gb.
|
||||
Unit for file sizes
|
||||
|
||||
.PARAMETER Filter (B,Kb,Mb,Gb), default Gb.
|
||||
|
||||
Filtre les fichiers par type. Par exemple *.txt ne compte que les fichiers txt.
|
||||
Filters files by type. For example * .txt only counts txt files.
|
||||
|
||||
|
||||
.EXAMPLE
|
||||
|
||||
.\Get-FolderSize.ps1 -FolderPath d:\tools -level 2
|
||||
.EXAMPLE
|
||||
|
||||
.\Get-FolderSize.ps1 -FolderPath \\Server\Documents -level 2 -filter "*.doc*" -unit "kb"
|
||||
|
||||
.NOTES
|
||||
Author: Philippe BARTH
|
||||
Version: 1.0
|
||||
#>
|
||||
|
||||
# Déclaration des paramètres
|
||||
param([string]$FolderPath,[int]$level,[string]$unit="Mb",[string]$Filter="*.*")
|
||||
|
||||
if ($level -lt 1) { $level = 1 }
|
||||
|
||||
# Determine unit for folder size, default Gb
|
||||
Switch ($unit)
|
||||
{
|
||||
"Gb"
|
||||
{
|
||||
$div="1GB"
|
||||
}
|
||||
|
||||
"Mb"
|
||||
{
|
||||
$div="1MB"
|
||||
}
|
||||
|
||||
"Kb"
|
||||
{
|
||||
$div="1KB"
|
||||
}
|
||||
"b"
|
||||
{
|
||||
$div="1"
|
||||
}
|
||||
Default
|
||||
{
|
||||
$div="1GB"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
#init result
|
||||
$result=@()
|
||||
# search subfolder
|
||||
$SubFolders = (Get-ChildItem -path $FolderPath -recurse -Directory -Depth $($level-1)).FullName
|
||||
#add parent folder in list
|
||||
$SubFolders+=$FolderPath
|
||||
# scan all folder
|
||||
foreach ($subfolder in $SubFolders)
|
||||
{
|
||||
#Search file in folder and subfolder
|
||||
$FolderSize = Get-ChildItem -path $SubFolder -filter $filter -File -recurse | Measure-Object -Sum Length
|
||||
#Search file only in folder
|
||||
$fileInFolder = Get-ChildItem -path $SubFolder -filter $filter -File | Measure-Object -Sum Length
|
||||
|
||||
#result
|
||||
$result+= New-Object -TypeName PSObject -Property @{
|
||||
Path = $subfolder
|
||||
AllFiles = $foldersize.count
|
||||
AllSize = $foldersize.sum/$div
|
||||
InFolderFiles = $fileInFolder.count
|
||||
InFolderSize = $fileInFolder.sum/$div
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return $result | Sort-Object -Property path
|
45
Exemples/Nagvis - generateur de carte/script.ps1
Normal file
45
Exemples/Nagvis - generateur de carte/script.ps1
Normal file
@ -0,0 +1,45 @@
|
||||
cls
|
||||
|
||||
$Folder = "C:\Users\hubert.cornet\Downloads\Centreon\maps"
|
||||
$FichierTemplate = "Mag000.cfg"
|
||||
$FichierListMag = "_liste.csv"
|
||||
|
||||
$ListeMag = Import-CSV -Path $Folder"\"$FichierListMag -Delimiter ";"
|
||||
|
||||
Foreach ($Mag in $ListeMag) {
|
||||
$Number = $Mag.Magasins.SubString(3,3)
|
||||
$TPV = $Mag.tpv.SubString(3,5)
|
||||
|
||||
$FichierMap = $Folder+"\Mag"+$Number+".cfg"
|
||||
|
||||
If (!(Test-Path -Path $FichierMap+".new") -And !(Test-Path -Path $FichierMap)) {
|
||||
Write-host "False"
|
||||
|
||||
Copy-Item $Folder"\Mag000.cfg" -Destination $FichierMap+".old"
|
||||
(Get-Content $FichierMap+".old") -Replace "Mag000", "Mag$Number" | Set-Content $FichierMap+".tmp1"
|
||||
(Get-Content $FichierMap+".tmp1") -Replace "swa-000", "swa-$Number" | Set-Content $FichierMap+".tmp2"
|
||||
|
||||
If (Test-Path -Path $FichierMap+".old") {
|
||||
Remove-Item -Path $FichierMap+".old" -Force
|
||||
}
|
||||
|
||||
(Get-Content $FichierMap+".tmp2") -Replace "AAAAA", "$TPV" | Set-Content $FichierMap+".new"
|
||||
|
||||
If (Test-Path -Path $FichierMap+".tmp1") {
|
||||
Remove-Item -Path $FichierMap+".tmp1" -Force
|
||||
}
|
||||
|
||||
If (Test-Path -Path $FichierMap+".tmp2") {
|
||||
Remove-Item -Path $FichierMap+".tmp2" -Force
|
||||
}
|
||||
}
|
||||
Else {
|
||||
Write-host "True"
|
||||
|
||||
(Get-Content $FichierMap+".new") -Replace "BBBBB", "$TPV" | Set-Content $FichierMap
|
||||
|
||||
If (Test-Path -Path $FichierMap+".new") {
|
||||
Remove-Item -Path $FichierMap+".new" -Force
|
||||
}
|
||||
}
|
||||
}
|
0
Exemples/README.md
Normal file
0
Exemples/README.md
Normal file
54
Exemples/couleur.ps1
Normal file
54
Exemples/couleur.ps1
Normal file
@ -0,0 +1,54 @@
|
||||
function Write-Color([String[]]$Text, [ConsoleColor[]]$Color = "White", [int]$StartTab = 0, [int] $LinesBefore = 0,[int] $LinesAfter = 0, [string] $LogFile = "", $TimeFormat = "yyyy-MM-dd HH:mm:ss") {
|
||||
# version 0.2
|
||||
# - added logging to file
|
||||
# version 0.1
|
||||
# - first draft
|
||||
#
|
||||
# Notes:
|
||||
# - TimeFormat https://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx
|
||||
|
||||
$DefaultColor = $Color[0]
|
||||
if ($LinesBefore -ne 0) { for ($i = 0; $i -lt $LinesBefore; $i++) { Write-Host "`n" -NoNewline } } # Add empty line before
|
||||
if ($StartTab -ne 0) { for ($i = 0; $i -lt $StartTab; $i++) { Write-Host "`t" -NoNewLine } } # Add TABS before text
|
||||
if ($Color.Count -ge $Text.Count) {
|
||||
for ($i = 0; $i -lt $Text.Length; $i++) { Write-Host $Text[$i] -ForegroundColor $Color[$i] -NoNewLine }
|
||||
} else {
|
||||
for ($i = 0; $i -lt $Color.Length ; $i++) { Write-Host $Text[$i] -ForegroundColor $Color[$i] -NoNewLine }
|
||||
for ($i = $Color.Length; $i -lt $Text.Length; $i++) { Write-Host $Text[$i] -ForegroundColor $DefaultColor -NoNewLine }
|
||||
}
|
||||
Write-Host
|
||||
if ($LinesAfter -ne 0) { for ($i = 0; $i -lt $LinesAfter; $i++) { Write-Host "`n" } } # Add empty line after
|
||||
if ($LogFile -ne "") {
|
||||
$TextToFile = ""
|
||||
for ($i = 0; $i -lt $Text.Length; $i++) {
|
||||
$TextToFile += $Text[$i]
|
||||
}
|
||||
Write-Output "[$([datetime]::Now.ToString($TimeFormat))]$TextToFile" | Out-File $LogFile -Encoding unicode -Append
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Write-Color -Text "Red ", "Green ", "Yellow " -Color Red,Green,Yellow
|
||||
|
||||
Write-Color -Text "This is text in Green ",
|
||||
"followed by red ",
|
||||
"and then we have Magenta... ",
|
||||
"isn't it fun? ",
|
||||
"Here goes DarkCyan" -Color Green,Red,Magenta,White,DarkCyan
|
||||
|
||||
Write-Color -Text "This is text in Green ",
|
||||
"followed by red ",
|
||||
"and then we have Magenta... ",
|
||||
"isn't it fun? ",
|
||||
"Here goes DarkCyan" -Color Green,Red,Magenta,White,DarkCyan -StartTab 3 -LinesBefore 1 -LinesAfter 1
|
||||
|
||||
Write-Color "1. ", "Option 1" -Color Yellow, Green
|
||||
Write-Color "2. ", "Option 2" -Color Yellow, Green
|
||||
Write-Color "3. ", "Option 3" -Color Yellow, Green
|
||||
Write-Color "4. ", "Option 4" -Color Yellow, Green
|
||||
Write-Color "9. ", "Press 9 to exit" -Color Yellow, Gray -LinesBefore 1
|
||||
|
||||
|
||||
|
||||
Write-Color -LinesBefore 2 -Text "This little ","message is ", "written to log ", "file as well." -Color Yellow, White, Green, Red, Red -LogFile "C:\testing.txt" -TimeFormat "yyyy-MM-dd HH:mm:ss"
|
||||
Write-Color -Text "This can get ","handy if ", "want to display things, and log actions to file ", "at the same time." -Color Yellow, White, Green, Red, Red -LogFile "C:\testing.txt"
|
0
Exemples/creation graphique - ligne/README.md
Normal file
0
Exemples/creation graphique - ligne/README.md
Normal file
55
Exemples/creation graphique - ligne/script-002.ps1
Normal file
55
Exemples/creation graphique - ligne/script-002.ps1
Normal file
@ -0,0 +1,55 @@
|
||||
[void][Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms.DataVisualization")
|
||||
$scriptpath = Split-Path -parent $MyInvocation.MyCommand.Definition
|
||||
|
||||
# chart object
|
||||
$chart1 = New-object System.Windows.Forms.DataVisualization.Charting.Chart
|
||||
$chart1.Width = 1000
|
||||
$chart1.Height = 700
|
||||
$chart1.BackColor = [System.Drawing.Color]::White
|
||||
|
||||
# title
|
||||
[void]$chart1.Titles.Add("Titre")
|
||||
$chart1.Titles[0].Font = "Arial,13pt"
|
||||
$chart1.Titles[0].Alignment = "topLeft"
|
||||
|
||||
# chart area
|
||||
$chartarea = New-Object System.Windows.Forms.DataVisualization.Charting.ChartArea
|
||||
$chartarea.Name = "ChartArea1"
|
||||
$chartarea.AxisY.Title = "Durée (en minutes)"
|
||||
$chartarea.AxisX.Title = "Temps (en jours)"
|
||||
$chartarea.AxisY.Interval = 100
|
||||
$chartarea.AxisX.Interval = 1
|
||||
$chart1.ChartAreas.Add($chartarea)
|
||||
|
||||
# legend
|
||||
$legend = New-Object system.Windows.Forms.DataVisualization.Charting.Legend
|
||||
$legend.name = "Legend1"
|
||||
$chart1.Legends.Add($legend)
|
||||
|
||||
# data source
|
||||
$datasource = Get-Process | sort PrivateMemorySize -Descending | Select-Object -First 15
|
||||
|
||||
# data series
|
||||
[void]$chart1.Series.Add("VirtualMem")
|
||||
$chart1.Series["VirtualMem"].ChartType = "StackedBar"
|
||||
$chart1.Series["VirtualMem"].BorderWidth = 3
|
||||
$chart1.Series["VirtualMem"].IsVisibleInLegend = $true
|
||||
$chart1.Series["VirtualMem"].chartarea = "ChartArea1"
|
||||
$chart1.Series["VirtualMem"].Legend = "Legend1"
|
||||
$chart1.Series["VirtualMem"].color = "#62B5CC"
|
||||
$datasource | ForEach-Object {$chart1.Series["VirtualMem"].Points.addxy( $_.Name , ($_.VirtualMemorySize / 1000000)) }
|
||||
|
||||
# data series
|
||||
[void]$chart1.Series.Add("PrivateMem")
|
||||
$chart1.Series["PrivateMem"].ChartType = "StackedBar"
|
||||
$chart1.Series["PrivateMem"].IsVisibleInLegend = $true
|
||||
$chart1.Series["PrivateMem"].BorderWidth = 3
|
||||
$chart1.Series["PrivateMem"].chartarea = "ChartArea1"
|
||||
$chart1.Series["PrivateMem"].Legend = "Legend1"
|
||||
$chart1.Series["PrivateMem"].color = "#FF0000"
|
||||
$datasource | ForEach-Object {$chart1.Series["PrivateMem"].Points.addxy( $_.Name , ($_.PrivateMemorySize / 1000000)) }
|
||||
|
||||
# save chart
|
||||
$chart1.SaveImage("$env:TEMP\SplineArea.png","png")
|
||||
|
||||
."$env:TEMP\SplineArea.png"
|
197
Exemples/creation graphique - ligne/script.ps1
Normal file
197
Exemples/creation graphique - ligne/script.ps1
Normal file
@ -0,0 +1,197 @@
|
||||
#Build graph
|
||||
[Array]$Line1 = 1..12 | ForEach-Object{Get-Random (10..20)}
|
||||
$p=Get-Random (14..25)
|
||||
$p%5
|
||||
[Array]$Line2 = 1..12 | ForEach-Object{
|
||||
If($p%5 -eq 0){
|
||||
$p-=(get-random (1..3))
|
||||
}
|
||||
Else{
|
||||
$p+=(get-random (1..5))
|
||||
}
|
||||
$p
|
||||
}
|
||||
[Array]$Lines = $Line1,$Line2
|
||||
$Legend = "Heure cible","Heure de fin"
|
||||
$Colors = "Blue","Green"
|
||||
|
||||
$file = ([guid]::NewGuid()).Guid
|
||||
$file = "$env:TEMP\$file.png"
|
||||
Draw-Graph -Lines $Lines -Legend $Legend -Colors $Colors -Header "Ponctualité flux AX vers DataHUB" -SaveDestination $file
|
||||
.$file
|
||||
|
||||
Add-Type -AssemblyName System.Windows.Forms,System.Drawing
|
||||
|
||||
Function Get-Color{
|
||||
$rbg = @()
|
||||
|
||||
For($i = 0;$i -le 3;$i++){
|
||||
Switch($i){
|
||||
#Black
|
||||
0{ $rbg += 255}#Get-Random -Minimum 128 -Maximum 255 }
|
||||
#RGB
|
||||
Default{$rbg += Get-Random -Minimum 0 -Maximum 255}
|
||||
}
|
||||
}
|
||||
Return $rbg
|
||||
}
|
||||
|
||||
Function Draw-Graph{
|
||||
Param(
|
||||
$Width = 1024,
|
||||
$Height = 512,
|
||||
[Array]$Lines,
|
||||
[Array]$Legend,
|
||||
[Array]$Colors,
|
||||
$Header = "Graph",
|
||||
$SaveDestination,
|
||||
[Switch]$Preview
|
||||
)
|
||||
Begin{}
|
||||
Process{
|
||||
If($Preview){
|
||||
[Windows.Forms.Form]$Window = New-Object System.Windows.Forms.Form
|
||||
|
||||
$Window.Width = $Width
|
||||
$Window.Height = $Height
|
||||
|
||||
$Window.Show()
|
||||
$Window.Refresh()
|
||||
|
||||
[Drawing.Graphics]$Graph = $Window.CreateGraphics()
|
||||
}
|
||||
Else{
|
||||
$bmp = New-Object Drawing.Bitmap $Width,$Height
|
||||
$Graph = [Drawing.Graphics]::FromImage($bmp)
|
||||
|
||||
}
|
||||
$Graph.InterpolationMode = [Drawing.Drawing2D.InterpolationMode]::HighQualityBicubic
|
||||
$Graph.SmoothingMode = [Drawing.Drawing2D.SmoothingMode]::AntiAlias
|
||||
$Graph.TextRenderingHint = [Drawing.Text.TextRenderingHint]::AntiAlias
|
||||
$Graph.CompositingQuality = [Drawing.Drawing2D.CompositingQuality]::HighQuality
|
||||
|
||||
$Background = [System.Drawing.Color]::Snow
|
||||
$Graph.Clear($Background)
|
||||
|
||||
$TextBrush = New-Object Drawing.SolidBrush([System.Drawing.Color]::FromArgb(255, 0, 212,252))
|
||||
$Font = New-object System.Drawing.Font("arial",12)
|
||||
$gridPen = [Drawing.Pens]::LightGray
|
||||
|
||||
#Draw Graph area
|
||||
$DrawArea = New-Object 'object[,]' 2,2
|
||||
|
||||
# X (Width)
|
||||
[int]$DrawArea[0,0] = $Width/10
|
||||
[int]$DrawArea[0,1] = ($Width-$Width/6)
|
||||
# Y (Height)
|
||||
[int]$DrawArea[1,0] = $Height/10
|
||||
[int]$DrawArea[1,1] = ($Height-$Height/3)
|
||||
|
||||
# Get X bounds
|
||||
$xFac = ($Lines | ForEach-Object{$_.Length} | Sort -Descending)[0]-1
|
||||
$xInc = ($DrawArea[0,1]-$DrawArea[0,0]+$DrawArea[0,0])/$xFac
|
||||
|
||||
#Get Y bounds
|
||||
$yMax = ($lines | ForEach-Object{$_} | sort -Descending)[0]
|
||||
$yFac = ($DrawArea[1,1]-$DrawArea[1,0])/$yMax
|
||||
|
||||
#Draw box
|
||||
$Graph.DrawRectangle($gridPen, ($DrawArea[0,0]),($DrawArea[1,0]),($DrawArea[0,1]),($DrawArea[1,1]))
|
||||
|
||||
#Draw Header
|
||||
$Textpoint = New-Object System.Drawing.PointF ((($DrawArea[0,1]-$DrawArea[0,0])/2+$DrawArea[0,0]),($DrawArea[1,0]/2))
|
||||
$Graph.DrawString($Header,$Font,$TextBrush,$TextPoint)
|
||||
|
||||
#Draw horizontal lines
|
||||
$scaleFac = 0.1
|
||||
$i = 1
|
||||
#Get scale
|
||||
While($i -ge 1){
|
||||
$scaleFac = $scaleFac*10
|
||||
$i = $yMax/$scaleFac
|
||||
}
|
||||
$scaleFac = $scaleFac/10
|
||||
|
||||
0..($yMax/$scaleFac) | ForEach-Object{
|
||||
$y = $DrawArea[1,1]-(($_*$scaleFac)*$yFac)+$DrawArea[1,0]
|
||||
$x1 = $DrawArea[0,0]
|
||||
$x2 = $DrawArea[0,1]+$DrawArea[0,0]
|
||||
|
||||
$Graph.DrawLine($gridPen,$x1,$y,$x2,$y)
|
||||
$thisPoint = New-Object System.Drawing.PointF (($x1-10),($y-15))
|
||||
$thisSF = New-object System.Drawing.StringFormat
|
||||
$thisSF.Alignment = "Far"
|
||||
$Graph.DrawString("$($_*$scaleFac)",$Font,$TextBrush,$thisPoint,$thisSF)
|
||||
}
|
||||
|
||||
If($lines[0].Count -le 1){
|
||||
$tmp = $Lines
|
||||
Remove-Variable Lines
|
||||
$Lines = @(0)
|
||||
$Lines[0] = $tmp
|
||||
Remove-Variable tmp
|
||||
$Lines
|
||||
}
|
||||
|
||||
#DRAW LINE
|
||||
$l = 0
|
||||
Foreach($Line in $Lines){
|
||||
If($Colors.Count -gt $l){
|
||||
$Pen = New-Object Drawing.Pen($Colors[$l])
|
||||
}
|
||||
Else{
|
||||
$rgb = Get-Color
|
||||
$Pen = New-object Drawing.Pen([System.Drawing.Color]::FromArgb($rgb[0],$rgb[1],$rgb[2],$rgb[3]))
|
||||
}
|
||||
$Pen.Width = 2
|
||||
|
||||
#Initiate/Reset Points
|
||||
$Points = @()
|
||||
$Step = 0
|
||||
|
||||
Foreach($point in $line){
|
||||
|
||||
$x = ($xInc*$step)+$DrawArea[0,0]
|
||||
$y = $DrawArea[1,1]-($point*$yFac)+$DrawArea[1,0]
|
||||
|
||||
$Points += New-Object System.Drawing.PointF($x,$y)
|
||||
$Step++
|
||||
}
|
||||
$Graph.DrawLines($pen,$Points)
|
||||
|
||||
If($Legend.Count -gt $l){
|
||||
$thisLegend = $Legend[$l]
|
||||
If($Colors.Count -gt $l){
|
||||
$thisBrush = New-Object Drawing.SolidBrush($Colors[$l])
|
||||
}
|
||||
Else{
|
||||
$rgb = Get-Color
|
||||
$thisBrush = New-Object Drawing.SolidBrush([System.Drawing.Color]::FromArgb($rgb[0],$rgb[1],$rgb[2],$rgb[3]))
|
||||
}
|
||||
|
||||
$y = $DrawArea[1,1]+$DrawArea[1,0]+20
|
||||
$x = $DrawArea[0,0]+100*$l
|
||||
|
||||
$thisPoint = New-Object System.Drawing.PointF ($x,$y)
|
||||
$thisFont = New-Object System.Drawing.Font("arial",12,[System.Drawing.FontStyle]::Bold)
|
||||
$Graph.DrawString($thisLegend,$thisFont,$thisBrush,$thisPoint)
|
||||
}
|
||||
$l++
|
||||
}
|
||||
|
||||
}
|
||||
End{
|
||||
|
||||
If($Preview){
|
||||
Start-Sleep 10
|
||||
}
|
||||
Else{
|
||||
$bmp.save($SaveDestination)
|
||||
}
|
||||
|
||||
Try{$Graph.Dispose()}Catch{}
|
||||
Try{$bmp.Dispose()}Catch{}
|
||||
Try{$Window.Close()}Catch{}
|
||||
Try{$Window.Dispose()}Catch{}
|
||||
}
|
||||
}
|
192
Exemples/création-procédure.ps1
Normal file
192
Exemples/création-procédure.ps1
Normal file
@ -0,0 +1,192 @@
|
||||
|
||||
# Fonction pour créer une carte pôur NAGVIS
|
||||
#
|
||||
# Recoit en parametre :
|
||||
# - l'emplacement du fichier source
|
||||
# - l'emplacement du fichier de destination
|
||||
# - le texte à rajouter
|
||||
# - la position du texte dans l'image
|
||||
Function AjoutTextePourImageMap {
|
||||
|
||||
[CmdletBinding()]
|
||||
PARAM (
|
||||
[Parameter(Mandatory=$true)][String] $CheminSource,
|
||||
[Parameter(Mandatory=$true)][String] $CheminDestination,
|
||||
[Parameter(Mandatory=$true)][String] $Texte,
|
||||
[Parameter(Mandatory=$true)][String] $Position,
|
||||
[Parameter()][String] $Description = $null
|
||||
)
|
||||
|
||||
Write-Verbose "Load System.Drawing"
|
||||
[Reflection.Assembly]::LoadWithPartialName("System.Drawing") | Out-Null
|
||||
|
||||
Write-Verbose "Get the image from $CheminSource"
|
||||
$srcImg = [System.Drawing.Image]::FromFile($CheminSource)
|
||||
|
||||
Write-Verbose "Create a bitmap as $destPath"
|
||||
$outputIImg = new-object System.Drawing.Bitmap([int]($srcImg.width)),([int]($srcImg.height))
|
||||
|
||||
Write-Verbose "Intialize Graphics"
|
||||
$Image = [System.Drawing.Graphics]::FromImage($outputIImg)
|
||||
$Image.SmoothingMode = "AntiAlias"
|
||||
|
||||
$Rectangle = New-Object Drawing.Rectangle 0, 0, $srcImg.Width, $srcImg.Height
|
||||
$Image.DrawImage($srcImg, $Rectangle, 0, 0, $srcImg.Width, $srcImg.Height, ([Drawing.GraphicsUnit]::Pixel))
|
||||
|
||||
Write-Verbose "Draw title: $Title"
|
||||
$Font = new-object System.Drawing.Font("Arial", 14, "Bold","Pixel")
|
||||
|
||||
#get font size
|
||||
$font_size = [System.Windows.Forms.TextRenderer]::MeasureText($Texte, $Font)
|
||||
$font_size_width = $font_size.Width
|
||||
$font_size_height = $font_size.Height
|
||||
|
||||
$rect = [System.Drawing.RectangleF]::FromLTRB(0, 0, $srcImg.Width, $srcImg.Height)
|
||||
|
||||
If ($Position -eq "nom") {
|
||||
#$text_in_middle_top_offset = $srcImg.Height / 2
|
||||
$text_in_middle_top_offset = 180
|
||||
$text_in_middle_left_offset = 155
|
||||
|
||||
#styling font
|
||||
$Brush = New-Object Drawing.SolidBrush([System.Drawing.Color]::FromArgb(255, 0, 0, 0))
|
||||
|
||||
#lets draw font
|
||||
$Image.DrawString($Texte, $Font, $Brush, $text_in_middle_top_offset, $text_in_middle_left_offset)
|
||||
|
||||
}
|
||||
ElseIf ($Position -eq "adresse") {
|
||||
$text_in_middle_top_offset = 180
|
||||
$text_in_middle_left_offset = 205
|
||||
|
||||
#styling font
|
||||
$Brush = New-Object Drawing.SolidBrush([System.Drawing.Color]::FromArgb(255, 0, 0, 0))
|
||||
|
||||
#lets draw font
|
||||
$Image.DrawString($Texte, $Font, $Brush, $text_in_middle_top_offset, $text_in_middle_left_offset)
|
||||
}
|
||||
ElseIf ($Position -eq "password") {
|
||||
$text_in_middle_top_offset = 180
|
||||
$text_in_middle_left_offset1 = 257
|
||||
$text_in_middle_left_offset2 = 280
|
||||
|
||||
#styling font
|
||||
$Brush = New-Object Drawing.SolidBrush([System.Drawing.Color]::FromArgb(255, 0, 0, 0))
|
||||
|
||||
#lets draw font
|
||||
$Image.DrawString($Texte, $Font, $Brush, $text_in_middle_top_offset, $text_in_middle_left_offset1)
|
||||
$Image.DrawString($Texte, $Font, $Brush, $text_in_middle_top_offset, $text_in_middle_left_offset2)
|
||||
}
|
||||
Else {
|
||||
$format = [System.Drawing.StringFormat]::GenericDefault
|
||||
$format.Alignment = [System.Drawing.StringAlignment]::Center
|
||||
$format.LineAlignment = [System.Drawing.StringAlignment]::Center
|
||||
}
|
||||
|
||||
Write-Verbose "Save and close the files"
|
||||
$outputIImg.save($CheminDestination, [System.Drawing.Imaging.ImageFormat]::jpeg)
|
||||
$outputIImg.Dispose()
|
||||
$srcImg.Dispose()
|
||||
}
|
||||
|
||||
|
||||
$Nom = "DUPONT"
|
||||
$Prenom = "Flavien"
|
||||
$CRPCEN = "59159"
|
||||
$SamAccountName = "$Prenom.$Nom@no$CRPCEN.mailnot.fr"
|
||||
|
||||
Add-Type -Path “$PSScriptRoot\itextsharp.dll”
|
||||
Import-Module "$PSScriptRoot\PDF.psm1"
|
||||
|
||||
AjoutTextePourImageMap -CheminSource "C:\Users\hcornet\Downloads\PowerShell-PDF-master\PowerShell-PDF-master\Outlook-0001.jpg" -CheminDestination "C:\Users\hcornet\Downloads\PowerShell-PDF-master\PowerShell-PDF-master\Outlook-0001-temp.jpg" -Texte "$Prenom.$Nom" -Position "nom"
|
||||
AjoutTextePourImageMap -CheminSource "C:\Users\hcornet\Downloads\PowerShell-PDF-master\PowerShell-PDF-master\Outlook-0001-temp.jpg" -CheminDestination "C:\Users\hcornet\Downloads\PowerShell-PDF-master\PowerShell-PDF-master\Outlook-0001-temp-002.jpg" -Texte "$SamAccountName" -Position "adresse"
|
||||
AjoutTextePourImageMap -CheminSource "C:\Users\hcornet\Downloads\PowerShell-PDF-master\PowerShell-PDF-master\Outlook-0001-temp-002.jpg" -CheminDestination "C:\Users\hcornet\Downloads\PowerShell-PDF-master\PowerShell-PDF-master\Outlook-0001-temp-003.jpg" -Texte "*******************" -Position "password"
|
||||
|
||||
$pdf = New-Object iTextSharp.text.Document
|
||||
Create-PDF -Document $pdf -File "C:\Users\hcornet\Downloads\PowerShell-PDF-master\PowerShell-PDF-master\exemple-0001.pdf" -TopMargin 20 -BottomMargin 20 -LeftMargin 20 -RightMargin 20 -Author "Patrick"
|
||||
|
||||
$pdf.Open()
|
||||
|
||||
Add-Text -Document $pdf -Text "1"
|
||||
Add-Text -Document $pdf -Text "2"
|
||||
Add-Text -Document $pdf -Text "3"
|
||||
Add-Text -Document $pdf -Text "4"
|
||||
Add-Text -Document $pdf -Text "5"
|
||||
Add-Text -Document $pdf -Text "6"
|
||||
Add-Text -Document $pdf -Text "7"
|
||||
Add-Text -Document $pdf -Text "8"
|
||||
Add-Text -Document $pdf -Text "9"
|
||||
Add-Text -Document $pdf -Text "10"
|
||||
Add-Text -Document $pdf -Text "11"
|
||||
Add-Text -Document $pdf -Text "12"
|
||||
Add-Text -Document $pdf -Text "13"
|
||||
Add-Text -Document $pdf -Text "14"
|
||||
Add-Text -Document $pdf -Text "15"
|
||||
Add-Text -Document $pdf -Text "16"
|
||||
Add-Text -Document $pdf -Text "17"
|
||||
Add-Text -Document $pdf -Text "18"
|
||||
Add-Text -Document $pdf -Text "19"
|
||||
Add-Text -Document $pdf -Text "20"
|
||||
Add-Text -Document $pdf -Text "21"
|
||||
Add-Text -Document $pdf -Text "22"
|
||||
Add-Text -Document $pdf -Text "23"
|
||||
Add-Text -Document $pdf -Text "24"
|
||||
Add-Text -Document $pdf -Text "25"
|
||||
Add-Text -Document $pdf -Text "26"
|
||||
Add-Text -Document $pdf -Text "27"
|
||||
Add-Text -Document $pdf -Text "28"
|
||||
Add-Text -Document $pdf -Text "29"
|
||||
Add-Text -Document $pdf -Text "30"
|
||||
Add-Text -Document $pdf -Text "31"
|
||||
Add-Text -Document $pdf -Text "32"
|
||||
Add-Text -Document $pdf -Text "33"
|
||||
Add-Text -Document $pdf -Text "34"
|
||||
Add-Text -Document $pdf -Text "35"
|
||||
Add-Text -Document $pdf -Text "36"
|
||||
Add-Text -Document $pdf -Text "37"
|
||||
Add-Text -Document $pdf -Text "38"
|
||||
Add-Text -Document $pdf -Text "39"
|
||||
Add-Text -Document $pdf -Text "40"
|
||||
|
||||
|
||||
Add-Title -Document $pdf -Text "Configuration de la messagerie sur Outlook" -Color "magenta" -Centered
|
||||
|
||||
Add-Text -Document $pdf -Text ""
|
||||
Add-Text -Document $pdf -Text "Nous utilisons Outlook 2010"
|
||||
Add-Text -Document $pdf -Text ""
|
||||
Add-Text -Document $pdf -Text "Commencer par lancer l'application Outlook avec l'aide d'un des icones ci-dessous"
|
||||
|
||||
Add-Image -Document $pdf -File "C:\Users\hcornet\Downloads\PowerShell-PDF-master\PowerShell-PDF-master\Outlook-0003.jpg"
|
||||
|
||||
Add-Image -Document $pdf -File "C:\Users\hcornet\Downloads\PowerShell-PDF-master\PowerShell-PDF-master\Outlook-0004.jpg"
|
||||
|
||||
|
||||
|
||||
Add-Image -Document $pdf -File "C:\Users\hcornet\Downloads\PowerShell-PDF-master\PowerShell-PDF-master\Outlook-0002.jpg"
|
||||
|
||||
Add-Text -Document $pdf -Text ""
|
||||
Add-Text -Document $pdf -Text "Dans l'application"
|
||||
|
||||
Add-Text -Document $pdf -Text ""
|
||||
Add-Text -Document $pdf -Text "Nous arrivons dans la fenêtre ci-dessous"
|
||||
|
||||
Add-Image -Document $pdf -File "C:\Users\hcornet\Downloads\PowerShell-PDF-master\PowerShell-PDF-master\Outlook-0001.jpg"
|
||||
|
||||
Add-Text -Document $pdf -Text "Nous devons remplir les champs vide avec les informaions contenu dans le tableau"
|
||||
Add-Table -Document $pdf -Dataset @("Nom", "$Prenom.$Nom", "Adresse", "$SamAccountName", "Mot de passe", "String", "Confirmer le mot de passe", "String") -Cols 2 -Centered
|
||||
|
||||
Add-Text -Document $pdf -Text "Nous obtenons ceci"
|
||||
Add-Image -Document $pdf -File "C:\Users\hcornet\Downloads\PowerShell-PDF-master\PowerShell-PDF-master\Outlook-0001-temp-003.jpg"
|
||||
|
||||
Add-Text -Document $pdf -Text "Nous pouvons cliquer sur le bouton"
|
||||
Add-Image -Document $pdf -File "C:\Users\hcornet\Downloads\PowerShell-PDF-master\PowerShell-PDF-master\Outlook-0005.jpg"
|
||||
|
||||
Add-Title -Document $pdf -Text "Configuration de la messagerie sur Iphone" -Color "magenta" -Centered
|
||||
|
||||
Add-Title -Document $pdf -Text "Configuration de la messagerie sur Androïd" -Color "magenta" -Centered
|
||||
|
||||
$pdf.Close()
|
||||
|
||||
Remove-Item -Path "C:\Users\hcornet\Downloads\PowerShell-PDF-master\PowerShell-PDF-master\Outlook-0001-temp.jpg" -Force
|
||||
Remove-Item -Path "C:\Users\hcornet\Downloads\PowerShell-PDF-master\PowerShell-PDF-master\Outlook-0001-temp-002.jpg" -Force
|
||||
Remove-Item -Path "C:\Users\hcornet\Downloads\PowerShell-PDF-master\PowerShell-PDF-master\Outlook-0001-temp-003.jpg" -Force
|
178
Exemples/etape1.ps1
Normal file
178
Exemples/etape1.ps1
Normal file
@ -0,0 +1,178 @@
|
||||
|
||||
|
||||
#Creation de la page HTML
|
||||
|
||||
$hostname = "Serveur 1";
|
||||
$date = Date;
|
||||
|
||||
[System.Collections.ArrayList] $lignes = @()
|
||||
|
||||
|
||||
$lignes += 'Installation ServerView RAID;OK/KO'
|
||||
$lignes += 'Installation MegaRAID;OK/KO'
|
||||
$lignes += 'Installation AD-Domain-Services;OK/KO'
|
||||
$lignes += 'Installation DHCP;OK/KO'
|
||||
$lignes += 'Installation Hyper-V;OK/KO'
|
||||
$lignes += 'Installation SNMP;OK/KO'
|
||||
|
||||
$VersionWindows = "Windows Server 2016"
|
||||
$NumeroDeSerie = "QSXRTFYJ5YIFL48"
|
||||
$CPU = "Celeron 2 Duo"
|
||||
$RAM = "256MB"
|
||||
$NombreDeDisque = "1"
|
||||
$EtatDisque = "OK"
|
||||
$EtatRaid = "OK"
|
||||
|
||||
|
||||
|
||||
|
||||
$HTML = @"
|
||||
<HTML>
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
|
||||
body{
|
||||
font-family: Arial;
|
||||
background-color: #FFFFFF;
|
||||
text-align: center;
|
||||
margin: 2% 2% 2% 2%;
|
||||
}
|
||||
|
||||
h1{
|
||||
background-color: #3074d3;
|
||||
color: white;
|
||||
}
|
||||
|
||||
tr{
|
||||
background-color: #EFEFEF;
|
||||
}
|
||||
|
||||
#hostname{
|
||||
width: 100%;
|
||||
font-size: 350%;
|
||||
text-align: center;
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<body>
|
||||
|
||||
|
||||
<div id='hostname'>$hostname</div>
|
||||
<h3>$date</h3>
|
||||
|
||||
|
||||
<table width='49%' style='display: inline-block; float: left;'>
|
||||
|
||||
<tr>
|
||||
<td height="42px" width='100%'>Version de Windows</td>
|
||||
<td height="42px" width='100%'>$VersionWindows</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td height="42px" width='100%'>Date</td>
|
||||
<td height="42px" width='100%'>$date</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td height="42px" width='100%'>Numéro de série</td>
|
||||
<td height="42px" width='100%'>$NumeroDeSerie</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td height="42px" width='100%'>Processeur</td>
|
||||
<td height="42px" width='100%'>$CPU</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td height="42px" width='100%'>RAM</td>
|
||||
<td height="42px" width='100%'>$RAM</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td height="42px" width='100%'>Nombre de disque</td>
|
||||
<td height="42px" width='100%'>$NombreDeDisque</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td height="42px" width='100%'>Etat disque</td>
|
||||
<td height="42px" width='100%'>$EtatDisque</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td height="42px" width='100%'>Etat Raid</td>
|
||||
<td height="42px" width='100%'>$EtatRaid</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
<table width='49%' style='display: inline-block; margin-left: 1%; '>
|
||||
<tr height='86px'>
|
||||
<td width='100%'>Disque C</td>
|
||||
<td width='100%'></td>
|
||||
</tr>
|
||||
|
||||
<tr height='86px'>
|
||||
<td width='100%'>Disque D</td>
|
||||
<td width='100%'></td>
|
||||
</tr>
|
||||
|
||||
<tr height='86px'>
|
||||
<td width='100%'>Disque E</td>
|
||||
<td width='100%'></td>
|
||||
</tr>
|
||||
|
||||
<tr height='86px'>
|
||||
<td width='100%'>Disque F</td>
|
||||
<td width='100%'></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<br><br><br><br>
|
||||
"@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$table = @"
|
||||
<h1 width='100%'> ETAPE 1 </h1>
|
||||
|
||||
<table id='etape1' width='100%' >
|
||||
<th></th>
|
||||
<th>Status </th>
|
||||
|
||||
"@
|
||||
|
||||
|
||||
|
||||
|
||||
ForEach($elem in $lignes){
|
||||
|
||||
$ligne = $elem.Split(';')
|
||||
|
||||
$ligne0=$ligne[0]
|
||||
$ligne1=$ligne[1]
|
||||
|
||||
$table += @"
|
||||
<tr>
|
||||
<td width='85%'>$ligne0</td>
|
||||
<td width='15%'>$ligne1</td>
|
||||
</tr>
|
||||
"@
|
||||
|
||||
}
|
||||
|
||||
$table += '</table>'
|
||||
|
||||
$HTML += $table
|
||||
|
||||
|
||||
|
||||
$HTML | Out-file "C:\Users\arobert\Desktop\Powershell etapes en HTML\index1.html"
|
78
Exemples/get_remoteapps_from_appserver.ps1
Normal file
78
Exemples/get_remoteapps_from_appserver.ps1
Normal file
@ -0,0 +1,78 @@
|
||||
#Detect os version script is executed on
|
||||
$osversionString = (Get-WmiObject -class Win32_OperatingSystem).Caption
|
||||
If ($osversionString.Contains('2008')){ $osVersion = '2008'}
|
||||
Elseif ($osversionString.Contains('2012')){ $osversion = '2012'}
|
||||
Elseif ($osversionString.Contains('2016')){ $osversion = '2016'}
|
||||
else { $Host.SetShouldExit(1) }
|
||||
|
||||
#function to safely define directory of the script
|
||||
function Get-ScriptDirectory
|
||||
{
|
||||
$Invocation = (Get-Variable MyInvocation -Scope 1).Value;
|
||||
if($Invocation.PSScriptRoot)
|
||||
{
|
||||
$Invocation.PSScriptRoot;
|
||||
}
|
||||
Elseif($Invocation.MyCommand.Path)
|
||||
{
|
||||
Split-Path $Invocation.MyCommand.Path
|
||||
}
|
||||
else
|
||||
{
|
||||
$Invocation.InvocationName.Substring(0,$Invocation.InvocationName.LastIndexOf("\"));
|
||||
}
|
||||
}
|
||||
|
||||
# Create Folder to store the csv
|
||||
$scriptDir = Get-ScriptDirectory
|
||||
$path = "$($scriptdir)\Awingu_Apps"
|
||||
if (Test-Path $path){
|
||||
Remove-item $path -recurse
|
||||
}
|
||||
New-Item $path -type directory
|
||||
#Fetch all info to populate the csv
|
||||
$tabName = "remoteApps"
|
||||
|
||||
#Create Table object
|
||||
$table = New-Object system.Data.DataTable "$tabName"
|
||||
|
||||
#Define Columns
|
||||
$col1 = New-Object system.Data.DataColumn command,([string])
|
||||
$col2 = New-Object system.Data.DataColumn name,([string])
|
||||
$col3 = New-Object system.Data.DataColumn icon,([string])
|
||||
|
||||
#Add the Columns
|
||||
$table.columns.add($col1)
|
||||
$table.columns.add($col2)
|
||||
$table.columns.add($col3)
|
||||
|
||||
if ($osversion -eq '2008')
|
||||
{
|
||||
Import-Module RemoteDesktopServices -verbose
|
||||
cd RDS:
|
||||
$remoteapps = Get-ChildItem RemoteApp\RemoteAppPrograms
|
||||
ForEach ($remoteapp in $remoteapps) {
|
||||
#Create a row
|
||||
$row = $table.NewRow()
|
||||
$row.command = $remoteapp.Name
|
||||
$row.name = (Get-Item RemoteApp\RemoteAppPrograms\$remoteapp\DisplayName).CurrentValue
|
||||
$row.icon = (Get-Item RemoteApp\RemoteAppPrograms\$remoteapp\Iconcontents).CurrentValue
|
||||
$table.Rows.Add($row)
|
||||
}
|
||||
}
|
||||
Elseif ($osversion -eq '2012' -OR $osversion -eq '2016')
|
||||
{
|
||||
$remoteapps = get-rdsessioncollection | get-rdremoteapp
|
||||
ForEach ($remoteapp in $remoteapps) {
|
||||
#Create a row
|
||||
$row = $table.NewRow()
|
||||
$row.command = $remoteapp.ALIAS
|
||||
$row.name = $remoteapp.DisplayName
|
||||
$row.icon = $remoteapp.IconContents -join ','
|
||||
$table.Rows.Add($row)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#Dump the table into the csv
|
||||
$tabCsv = $table | export-csv "$path\remoteapps.csv" -noType
|
1
Exemples/test.ps1
Normal file
1
Exemples/test.ps1
Normal file
@ -0,0 +1 @@
|
||||
Get-ADReplAccount -All -Server $env:ComputerName -NamingContext $(Get-ADDomain | select -ExpandProperty DistinguishedName) | Test-PasswordQuality -IncludeDisabledAccounts
|
22
Exemples/tirage euromillion/script-001.ps1
Normal file
22
Exemples/tirage euromillion/script-001.ps1
Normal file
@ -0,0 +1,22 @@
|
||||
cls
|
||||
|
||||
$Array = @(("01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50"),("00","00","00","00","00","00","00","00","00","00","00","00","00","00","00","00","00","00","00","00","00","00","00","00","00","00","00","00","00","00","00","00","00","00","00","00","00","00","00","00","00","00","00","00","00","00","00","00","00","00"))
|
||||
|
||||
For ($j=0;$j -lt 2500;$j++) {
|
||||
$Number = Get-Random @('1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49','50') -Count 1
|
||||
$Star = Get-Random @('1','2','3','4','5','6','7','8','9','10','11','12') -Count 1
|
||||
|
||||
For ($i=1;$i -lt 50;$i++) {
|
||||
If ($i -eq $Number) {
|
||||
$Array[1][$i] = [int]$Array[1][$i] + 1
|
||||
|
||||
If ($Array[1][$i] -lt 10) {
|
||||
$Array[1][$i] = "0" + $Array[1][$i]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Write-Host $Array[0]
|
||||
Write-Host
|
||||
Write-Host $Array[1]
|
||||
Write-Host
|
Reference in New Issue
Block a user