This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$backup_path="C:\SccmBackUp" | |
$sccm_Installation_Path="C:\Program Files\Microsoft Configuration Manager" | |
$date=get-date -Format dd.MM.yy | |
## Backup Files And Folders | |
mkdir "$backup_path\BackUp_$($date)" | |
$back_path="$backup_path\BackUp_$($date)" | |
write-host("`n`n`n`n`n`n`n`n***********************************") | |
write-host("Copying the SCCM files and folders:`n") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-GPO -All | ? { | |
$report = Get-GPOReport -Guid $_.id -ReportType XML | |
$report.Contains("<q1:Name>**first Policie Name**</q1:Name> | |
<q1:Units /> | |
<q1:displayboolean>**false/true**</q1:displayboolean>")` #false for disable ... true for enable | |
-or | |
$report.Contains("<q1:Name>**second Policie Name**</q1:Name> | |
<q1:Units /> | |
<q1:displayboolean>**false/true**</q1:displayboolean>") #false for disable ... true for enable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$certLoc=Get-ChildItem -Path C:\Path\To\Cert\Cert.cer | |
$cert=[System.Security.Cryptography.X509Certificates.X509Certificate2]::new($certLoc) | |
Test-Certificate $cert |