This file contains hidden or 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
| <# | |
| .SYNOPSIS | |
| Exports application objects from ConfigMgr. | |
| .DESCRIPTION | |
| Exports application objects from ConfigMgr from a local or remote Site Server. | |
| Additionally, a filter can be used to export only a subset of applications. | |
| .EXAMPLE |
This file contains hidden or 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
| <# | |
| .SYNOPSIS | |
| Imports application objects to ConfigMgr. | |
| .DESCRIPTION | |
| Imports application objects from ConfigMgr from a local or remote Site Server. | |
| .EXAMPLE | |
| PS> Import-MyCMApplication -ExportLocation '\\siteserver2\Sources$\Applications\Import' -CMSiteCode SP1: -CMSiteServerFQDN siteserver1.contoso.com -Verbose |
This file contains hidden or 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
| aram ( | |
| [Parameter(Mandatory)] | |
| [ValidateScript({Test-Path $_})] | |
| [String]$Source | |
| ) | |
| # Uninstall old releases | |
| Write-Verbose "Searching old TeamViewer releases installed using MSI Wrapper" | |
| $tvArr = Get-WmiObject -Query 'Select Name,IdentifyingNumber from Win32_Product where Name like "TeamViewer%Wrapper%"' |
This file contains hidden or 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
| <# | |
| ---------------------------------------- | |
| File: get-gplink.ps1 | |
| Version: 1.3 | |
| Author: Thomas Bouchereau | |
| ----------------------------------------- | |
| Disclaimer: | |
| This sample script is not supported under any Microsoft standard support program or service. | |
| The sample script is provided AS IS without warranty of any kind. Microsoft further disclaims |
This file contains hidden or 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
| <# | |
| .Synopsis | |
| Checks a given Profile Path for correct user ACL and ownership. | |
| .DESCRIPTION | |
| Checks a given Profile Path for correct user ACL and ownership and returns a boolean return value. | |
| .EXAMPLE | |
| PS> Check-ProfileACL -ProfilePath E:\Profiles\Alice.V6 -User contoso\alice | |
| Evaluates ownership of "E:\Profiles\Alice.V6" (should be "BUILTIN\Administrators") and full control permissions for contoso\alice. | |
| .EXAMPLE |
This file contains hidden or 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
| $reservationArr = Get-DhcpServerv4Reservation -ScopeId 192.168.0.0 -ComputerName cm-dc1 | |
| foreach ($reservationObj in $reservationArr) { | |
| Set-DhcpServerv4OptionValue -OptionId 66 -Value "bootserver1.decline.lab" -ReservedIP $reservationObj.IPAddress -ComputerName cm-dc1 | |
| Set-DhcpServerv4OptionValue -OptionId 67 -Value "/tftp/bootfile.0" -ReservedIP $reservationObj.IPAddress -ComputerName cm-dc1 | |
| } |
This file contains hidden or 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
| Install-Script -Name Get-WindowsAutoPilotInfo -RequiredVersion 1.3 | |
| Get-InstalledScript | |
| Get-InstalledScript | gm | |
| Get-InstalledScript.installedlocation | |
| (Get-InstalledScript).installedlocation | |
| Mount-VHD -Path D:\vm\CM-Win10-AP.vhdx | |
| Copy-Item -Path (Join-Path (get-installedscript).InstalledLocation -ChildPath Get-WindowsAutoPilotInfo.ps1) -Destination E:\ | |
| gci e:\ |
This file contains hidden or 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 all Farm Session Hosts | |
| $sessionHostArr = Get-RDSessionCollection -ConnectionBroker rds-cb1.rds.lab | Get-RDSessionHost | |
| foreach ($sessionHost in $sessionHostArr) { | |
| $serverName = $sessionHost.SessionHost | |
| Write-Verbose "Current Object is: $($sessionHost.SessionHost)" | |
| # Test on SMB Protocol | |
| if (-not (Test-NetConnection -ComputerName $serverName -Port 445)) { | |
| # Test if target is online | |
| if (-not (Test-WSMan $serverName)) { |
This file contains hidden or 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
| <# | |
| This script allows modification of local MDM policies. | |
| It is based on Microsoft Documentation: https://docs.microsoft.com/en-us/windows/client-management/mdm/using-powershell-scripting-with-the-wmi-bridge-provider | |
| Author: Cornelius Schuchardt, SoftEd Systems GmbH | |
| #> | |
| $namespaceName = "root\cimv2\mdm\dmmap" | |
| $className = "MDM_Policy_Config01_Bluetooth02" | |
| $instance = "Bluetooth" | |
| $property = "AllowDiscoverableMode" |
This file contains hidden or 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
| <# | |
| .Synopsis | |
| Get Group Policy Object Id that have been applied in the past | |
| .DESCRIPTION | |
| Get Group Policy Object Id that have been applied in the past | |
| .EXAMPLE | |
| Get-GpoHistory -Scope Machine | |
| #> | |
| function Get-GpoHistory | |
| { |