Overblog Tous les blogs Top blogs Technologie & Science Tous les blogs Technologie & Science
Suivre ce blog Administration + Créer mon blog
MENU

AddAppBundle.psm1

Publié le par damcuvelier

function FQDN($Domain){ $DomFQDN = (Get-ADDomain -Identity $Domain).DNSRoot If(!$DomFQDN){ $rootDSE = New-Object DirectoryServices.DirectorySearcher([ADSI]"").searchroot $searcher = New-Object DirectoryServices.DirectorySearcher $searcher.SearchRoot =...

Lire la suite

ConnectWiFi.psm1

Publié le par damcuvelier

Function chkconnWiFi($SSID){ $networkName = $SSID $connectedNetwork = (Get-NetConnectionProfile).Name if ($connectedNetwork -eq $networkName) { Return $true } else { Return $false } } Function ConnectWiFi($SSID,$psw){ # Nom du réseau Wi-Fi # $SSID = "NomDuReseau"...

Lire la suite

=:" -Srv "NomDuServeurSQL" -db "NomDeLaBaseDeDonnees" -TN "NomDeLaTable" [option:] -usr "username" -pwd "password" #> param($Srv,$usr,$pwd,$db,$TN,$Modif,[switch]$arr)... "> Modif

Publié le par damcuvelier

<# utilité: modifie une valeur dans une table SQL usage: WriteSQLdb.ps1 -Modif "=:" -Srv "NomDuServeurSQL" -db "NomDeLaBaseDeDonnees" -TN "NomDeLaTable" [option:] -usr "username" -pwd "password" #> param($Srv,$usr,$pwd,$db,$TN,$Modif,[switch]$arr)...

Lire la suite

InstImpMod

Publié le par damcuvelier

# usefull to be sure to use local module source if web source is anavailable: # usage: InstImpMod('') // put Modulelocalsource into subfolder named # return: '' if ok, $false if not function InstImpMod($moduleName){...

Lire la suite

ReadMSIMSTInfos.ps1

Publié le par damcuvelier

<# usage : .\ReadMSIMSTInfos.ps1 -msifldr return: MST or (if not exist MST: MSI) informations #> param($msifldr) $erroractionpreference = 'silentlycontinue' $here = $PSScriptRoot; if(!$here){$here = (Get-Location).path}...

Lire la suite

String+1

Publié le par damcuvelier

$string = "toto01" $prefix = $string -replace '\d+' # Extraction de la partie non numérique $number = [int]($string -replace '\D+') # Extraction de la partie numérique et conversion en entier $string2 = $prefix + ($number + 1).ToString("D2")

Lire la suite

ReadMST

Publié le par damcuvelier

$installer = New-Object -ComObject "WindowsInstaller.Installer" $mstFilePath = "Chemin\vers\votre\fichier.mst" # Ouvrir la base de données MST $database = $installer.OpenDatabase($mstFilePath, 0) # Exemple : récupérer des informations depuis la base de...

Lire la suite

wilstxfm.ps1

Publié le par damcuvelier

wilstxfm.ps1 # Windows Installer transform viewer for use with Windows PowerShell # Demonstrates the use of the database APIs for viewing transform files # source: https://github.com/pauldotknopf/WindowsSDK7-Samples/blob/master/sysmgmt/msi/scripts/WiLstXfm.vbs...

Lire la suite

GetMSIFileInformation

Publié le par damcuvelier

function GetMSIFileInformation { param( [Parameter(Mandatory = $true, ValueFromPipeline = $true)] [ValidateNotNullOrEmpty()] [System.IO.FileInfo[]]$FilePath ) # https://learn.microsoft.com/en-us/windows/win32/msi/installer-opendatabase $msiOpenDatabaseModeReadOnly...

Lire la suite

<< < 1 2 3 4 5 6 7 8 9 10 20 30 40 > >>