commit 3d28c398c147f0f6e046fd762dabf8635713e82c Author: Ichbinus <151060943+Ichbinus@users.noreply.github.com> Date: Wed Nov 22 14:48:52 2023 +0100 Add files via upload diff --git a/Liste_VM.xml b/Liste_VM.xml new file mode 100644 index 0000000..b172b18 --- /dev/null +++ b/Liste_VM.xml @@ -0,0 +1,103 @@ + + + +
SRV-VRM-DDC-001
+ 192.168.44.30 + Debian 12 + N.A + oui + non + non + non +
+ +
SRV-VRM-DDC-002
+ 192.168.44.31 + Debian 12 + Postgres 13 + oui + non + oui + non +
+ +
SRV-VRM-OXA-001
+ 192.168.44.32 + Debian 12 + Postgres 13 + non + oui + non + oui +
+ +
SRV-VRM-OXA-002
+ 192.168.44.33 + Debian 12 + Postgres 13 + non + non + oui + non +
+ +
SRV-VRM-ORA-001
+ 192.168.44.34 + Oracle-linux 8.8 + Oracle 21 xe + non + non + non + non +
+ +
SRV-VRM-OXA-003
+ 192.168.44.35 + Windows Server 2022 + Oracle 21 xe + non + oui + non + oui +
+ +
SRV-VRM-VPN-001
+ 192.168.44.36 + Windows Server 2022 + N.A + non + non + non + non +
+ +
SRV-VRM-SUP-002
+ 192.168.44.37 + Windows Server 2022 + N.A + non + non + non + non +
+ +
SRV-VRM-GNA-001
+ 192.168.44.38 + Debian 12 + Postgres 13 + non + non + oui + non +
+ +
SRV-VRM-GNA-002
+ 192.168.44.39 + Debian 12 + Postgres 13 + non + non + oui + non +
+
\ No newline at end of file diff --git a/test-2-module_hyper-V-boucles_runspaces.ps1 b/test-2-module_hyper-V-boucles_runspaces.ps1 new file mode 100644 index 0000000..5521b92 --- /dev/null +++ b/test-2-module_hyper-V-boucles_runspaces.ps1 @@ -0,0 +1,1045 @@ +################################################################################################################################################ +################################################################################################################################################ +################################################# Assembly nécessaire pour la fenêtre graphique ################################################ +################################################################################################################################################ +################################################################################################################################################ +Add-Type -AssemblyName PresentationFramework +Add-Type -AssemblyName System.Windows.Forms +Add-Type -AssemblyName PresentationCore +Add-Type -AssemblyName WindowsBase +# .Net methods for hiding/showing the console in the background +Add-Type -Name Window -Namespace Console -MemberDefinition ' +[DllImport("Kernel32.dll")] +public static extern IntPtr GetConsoleWindow(); + +[DllImport("user32.dll")] +public static extern bool ShowWindow(IntPtr hWnd, Int32 nCmdShow); +' + +################################################################################################################################################ +################################################################################################################################################ +############################################################### prérequis ###################################################################### +################################################################################################################################################ +################################################################################################################################################ + +## rendre disponible l'optional feature de windows Hyper-V: +# => dans la recherche windows : fonctionnalitées facultatives +# => se loguer en admin local +# => chercher dans le pop-up le module hyper-v pour powershell +# => Hyper-V +# =>Outils d'administration Hyper-V +# => Module Hyper-V pour Windows Powershell +# => cocher la case correspondante et valider sur ok, un redémarrage est peut-être nécessaire + + +################################################################################################################################################ +################################################################################################################################################ +############################## Déclaration de la Hash table qui sera synchronisée entre les différents runspaces ############################### +################################################################################################################################################ +################################################################################################################################################ +$syncHash = [hashtable]::Synchronized(@{}) + + +################################################################################################################################################ +################################################################################################################################################ +############################################ Déclaration du premier runspace pour l'interface graphique ######################################## +################################################################################################################################################ +################################################################################################################################################ +$newRunspace =[runspacefactory]::CreateRunspace() +$newRunspace.ApartmentState = "STA" ## Le STA est là pour l'interface en WP +$newRunspace.ThreadOptions = "ReuseThread" +$newRunspace.Open() +$newRunspace.SessionStateProxy.SetVariable("syncHash",$syncHash) +$psCmd = [PowerShell]::Create().AddScript({ + ################################################################################################################################################ + ################################################################################################################################################ + ############################################ Déclaration du code XAML de l'interface graphique WPF ############################################# + ################################################################################################################################################ + ################################################################################################################################################ + [xml]$Fenetre_principale = @" + + + + + + +