Top articles
-
Nncmcoltemplate
# Remplacez ces valeurs par celles correspondant à votre environnement SCCM $siteCode = "
" $totoCollectionName = "toto" $titiCollectionName = "titi" # Récupérer les informations de la collection "toto" $totoCollection = Get-CMCollection... -
AddAppBundle.psm1
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 =...
-
GetMSIFileInformation
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...
-
Recherche Webservice 2
# Définir l'URL du service web $url = "URL_DU_WEBSERVICE" # Créer l'objet pour la requête $request = [System.Net.WebRequest]::Create($url) # Définir la méthode de requête (GET, POST, etc.) $request.Method = "GET" # Envoyer la requête et obtenir la réponse...
-
Recherche Webservice 1
# URL du service web $url = "https://example.com/webservice" # Envoi de la requête HTTP GET pour récupérer les données $response = Invoke-RestMethod -Uri $url -Method Get # Convertir la réponse en format JSON $jsonData = ConvertTo-Json -InputObject $response...
-
Invoke-USMT function code
function Invoke-USMT { [CmdletBinding()] param( [Parameter(Mandatory=$true)] [string]$SourceComputer, [Parameter(Mandatory=$true)] [string]$DestinationComputer, [Parameter(Mandatory=$true)] [string]$UserName, [Parameter(Mandatory=$true)] [string]$SharePath,...
-
USMT Script
Add-PSSnapin Microsoft.SharePoint.PowerShell function MigrateUserOrGroups($migrationType, $csvFile) { #Getting the SPFarm object $farm = Get-SPFarm Write-Host $migrationType #Checking whether the user input the type of Migration as Group if($migrationType...
-
USMT: script for both scanstate and loadstate in VBScript
(A little thanks for you is a big gift for me) this script in compatible with both cscript and deployment TaskSequence : On Error Resume NextstrComputer = "."const HKEY_LOCAL_MACHINE = &H80000002Const TIMEOUT = 3 ' Detect and configure execution environment...
-
ConnectWiFi.psm1
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"...
-
ScriptRepFile
fichier exemple csv: ID;UserName;Prenom;Nom 1;User1;Prenom1;Nom1 2;User2;Prenom2;Nom2 3;User3;Prenom3;Nom3 4;User4;Prenom4;Nom4 5;User5;Prenom5;Nom5 6;User6;Prenom6;Nom6 7;User7;Prenom7;Nom7 8;User8;Prenom8;Nom8 9;User9;Prenom9;Nom9 fichier exemple xml:...
-
RepFiles
# Retrouve les fichiers json,xml,csv,xls dans $FldrPath qui contiennent en Headers les paramètres $scriptParameters autres que $FldrPath # Dès qu'un fichier correspondant est trouvé il s'arrête # usage: RepFiles -FldrPath
... -
ReadMST
$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...
-
Msiprop
# Chemin vers le fichier MSI $cheminFichierMSI = "C:\Chemin\vers\votre\fichier.msi" # Obtenir les propriétés du fichier MSI $proprietesMSI = Get-ItemProperty -LiteralPath $cheminFichierMSI # Afficher les propriétés $proprietesMSI.PSObject.Properties |...
-
[VBA] Extraire les liens hyperlink d'un docx
Sub ExtractUrlsFormatAndRemoveHyperlinks() Dim doc As Document Set doc = ActiveDocument Dim hyperlink As Hyperlink Dim rng As Range Dim fullAddress As String ' Parcourir chaque hyperlien dans le document pour insérer l'URL complète au début du paragraphe...
-
PowerShellISE+
Imaginez que vous utilisiez PowerShell ISE. Imaginez que vous ayez besoin de savoir quelle valeur renseigner dans quelle case. Imaginez que vous vouliez accéder directement aux détails — comme l'URL officielle d'un cmdlet. Ne perdez plus de temps avec...
-
[PS1] exemple install/config app avec infos webservice
# usage: .\Deploy-PosteWindows_SN-Zscaler.ps1 -ZscalerUri "
" # exl: .\Deploy-PosteWindows_SN-Zscaler.ps1 -ZscalerUri "http:// : /Api/TokenZscaler" param($ZscalerUri) $ErrorActionpreference... -
[ps1] exemple deploy zscaler avec servicenow via powershell
# usage: .\Deploy-Zscaler_srvNow.ps1 -ZscalerClientPath "\\srv\zscaler.exe" -ZscalerUri "ServiceNow" -SN_Instance "prod00123" -SN_User "zsc_api" -SN_Password "********" param( [string]$ZscalerUri, [string]$SN_Instance = "dev12345", # Nom de l'instance...
-
SkipOOBE-Windows
Script Powershell à lancer après avoir refusé l'OOBE à l'ouverture de session windows pour être sûr qu'il ne reviendra jamais: #Requires -RunAsAdministrator <# Applique SkipMachineOOBE/SkipUserOOBE = 1 - Pour chaque ruche utilisateur chargée (HKU\
)... -
Améliorer une connexion ADSL instable sur PC Windows
Guide pratique pour gagner en stabilité et mieux utiliser la bande passante disponible Quand une connexion ADSL se déconnecte souvent, ralentit ou devient instable, il faut distinguer deux choses : la bande passante théorique de la ligne (ce que permet...
-
Bloquer définitivement onedrive
Il me saoule, il n'arrête pas de revenir... 1. Mettre en place une règle firewall Commande Powershell: taskkill /IM OneDrive.exe /F 2>$null; Get-NetFirewallRule -DisplayName "Bloquer OneDrive*" -ErrorAction SilentlyContinue | Remove-NetFirewallRule; $paths=@("$env:LOCALAPPDATA\Microsoft\OneDrive\OneDrive.exe","C:\Program...
-
Charlie
Nous sommes tous Charlie!
-
[MDT] [W8] Personnaliser Metro UI via MDT
L'écran d'accueil de windows 8 ne fait pas très pro. Voici une méthode pour le personnaliser via MDT: 1) Utilisez l'option Copy Profile 2) Utilisez le script CFG-Win8-CopyAppFolderLayout.wsf Tout les détails sur le Technet
-
SCCM 2007 : Error: You create a run command line with a vbs and you obtain error: cannot find script file x:\sms\bin\i386\
Sometimes i lose my brain and: I create a run command line with a vbs "toto.vbs" and i obtain error: cannot find script file "x:\sms\bin\i386\toto.vbs" Do not forget to create a package with your script in this package and in TS give the name of the OSD...
-
Comment deployer windows 8 en VM
Guide: en français avec virtual box: http://korben.info/installer-windows-8-sur-virtualbox-meme-quand-ca-ne-fonctionne-pas.html in english; http://lifehacker.com/5841065/how-do-i-install-windows-8-in-a-virtual-machine it’s ok:
-
Animation 29072012
/image%2F0881799%2F20140610%2Fob_a8c7fe_logo2.jpg)