Overblog
Suivre ce blog Administration + Créer mon blog

FullRemovecmapp

Publié le par damcuvelier

# Paramètres $NomApplication = "Nom de l'application" # Récupérer l'ID de l'application $Application = Get-CMApplication -Name $NomApplication -fast $ApplicationID = $Application.PackageID # Supprimer les déploiements de l'application Get-CMDeployment...

Lire la suite

Get-CMAppsSrcPath

Publié le par damcuvelier

$SCCMServer = "Nom_du_serveur_SCCM" $X = '5' $Global:here = 'C:\' $Global:CMDrive = (get-location).path # if running in SCCM Console set-location $here $SITECODE = $CMDrive.split(':')[0] $Namespace = "root\sms\site_$SITECODE" set-location $CMDrive # Localization...

Lire la suite

QueryNotApp

Publié le par damcuvelier

SELECT * FROM SMS_R_System WHERE SMS_R_System.ResourceId NOT IN (SELECT ResourceID FROM SMS_CM_RES_COLL_)

Lire la suite

" $totoCollectionName = "toto" $titiCollectionName = "titi" # Récupérer les informations de la collection "toto" $totoCollection = Get-CMCollection... "> Nncmcoltemplate

Publié le par damcuvelier

# 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...

Lire la suite

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

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