Added Files

This commit is contained in:
DistractADD
2021-07-06 13:16:46 +10:00
parent f2475a3bdd
commit cfddd4fad2
393 changed files with 65842 additions and 0 deletions

View File

@@ -0,0 +1,83 @@
#requires -Version 2.0
<#
.SYNOPSIS
Triggers the Click 2 Run Update Process
.DESCRIPTION
This Script triggers the Click 2 Run Update Process.
.PARAMETER Silent
Suppress the User Info
.EXAMPLE
# Regular Operation
PS C:\> .\Force_Office_Click2Run-Update.ps1
.EXAMPLE
# Silent Operation
PS C:\> .\Force_Office_Click2Run-Update.ps1 -Silent
.EXAMPLE
# Silent Operation
PS C:\> .\Force_Office_Click2Run-Update.ps1 -s
.NOTES
Author: Joerg Hochwald - http://hochwald.net
License: Freeware, Public Domain
#>
param
(
[Parameter(ValueFromPipeline = $true,
Position = 1)]
[Alias('s')]
[switch]
$Silent
)
begin
{
# Constants
$SC = 'SilentlyContinue'
# The Click 2 Run Executable
$UpdateEXE = "$env:CommonProgramW6432\Microsoft Shared\ClickToRun\OfficeC2RClient.exe"
if ($Silent)
{
# Commandline (Silent)
$UpdateArguements = '/update user displaylevel=false'
}
else
{
# Commandline (Inform the User in this case)
$UpdateArguements = '/update user displaylevel=true'
}
}
process
{
$paramTestPath = @{
Path = $UpdateEXE
ErrorAction = $SC
}
if (Test-Path @paramTestPath)
{
try
{
$paramStartProcess = @{
FilePath = $UpdateEXE
ArgumentList = $UpdateArguements
ErrorAction = $SC
}
$null = (Start-Process @paramStartProcess)
}
catch
{
Write-Warning -Message 'Unable to start the Update Process...'
}
}
else
{
Write-Error -Message 'The Office Click 2 Run Update executable was not found!' -ErrorAction Stop
}
}

View File

@@ -0,0 +1,29 @@
BSD 3-Clause License
Copyright (c) 2021, enabling Technology <http://enatec.io>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@@ -0,0 +1,8 @@
# Legacy Notice
I no longer run Exchange, Skype for Business, or any other Office Server on Premises.
This is my personal [reaction](https://hochwald.net/microsoft-rolls-back-decision-to-take-away-internal-usage-rights-from-partners/) to the changes that Microsoft [announced](https://hochwald.net/microsoft-is-going-to-kill-internal-use-rights-benefit-for-partners/) for the Internal Use Rights (IUR) program. I know that they decided to reverse that changes and in theory, I could still legally use the software. However, I decided to decommission everything licensed under the terms of the Internal Use Rights (IUR) program.
In my opinion, the community always should have some benefits from the Internal Use Rights (IUR) program and/or Action Pack. Now that I decided to drop out, there will be no more such benefits.
I will _no longer maintain_ the scripts related to the Microsoft Office (on Premises) servers. They will remain here, but unmaintained. Fork the repository and maintain or extend them if you like to. The [License](https://github.com/jhochwald/PowerShell-collection/blob/master/LICENSE) allows that easily.

View File

@@ -0,0 +1,109 @@
#requires -Version 1.0
<#
.SYNOPSIS
This script will set the Office Channel info in the Registry
.DESCRIPTION
This script will add the Office Insider Channel Information in the Registry.
It is a Quick and Dirty Solution.
.PARAMETER Channel
The Office Release Channel
Possible Values for the Channel Variable are:
Insiderfast - With weekly builds, not generally supported
FirstReleaseCurrent - Office Insider Slow aka First Release Channel
Current - Current Channel (Default)
Validation - First Release for Deferred Channel
Business - Also known as Current Branch for Business
.EXAMPLE
# Set the Distribution Channel to Insiderfast - Weekly builds
PS> .\Set-OfficeInsider.ps1 -Channel 'Insiderfast'
.EXAMPLE
# Set the Distribution Channel to Business - Slow updates
PS> .\Set-OfficeInsider.ps1 -Channel 'Business'
.NOTES
This will work with Windows based Office 365 (Click to Run) installations only!
Change the Release Channel might cause issues! Do this at your own risk.
Not all Channels are supported by Microsoft.
Author: Joerg Hochwald - http://hochwald.net
#>
param
(
[Parameter(ValueFromPipeline = $true,
Position = 1)]
[ValidateSet('Insiderfast', 'FirstReleaseCurrent', 'Current', 'Validation', 'Business', IgnoreCase = $true)]
[ValidateNotNullOrEmpty()]
[string]
$Channel = 'Current'
)
begin
{
# Constants
$SC = 'SilentlyContinue'
try
{
$paramNewItem = @{
Path = 'HKLM:\SOFTWARE\Policies\Microsoft\office\16.0\common\'
Name = 'officeupdate'
Force = $true
ErrorAction = $SC
WarningAction = $SC
Confirm = $false
}
$null = (New-Item @paramNewItem)
Write-Verbose -Message 'The Registry Structure was created.'
}
catch
{
Write-Verbose -Message 'The Registry Structure exists...'
}
}
process
{
try
{
$paramNewItemProperty = @{
Path = 'HKLM:\SOFTWARE\Policies\Microsoft\office\16.0\common\officeupdate'
Name = 'updatebranch'
PropertyType = 'String'
Value = $Channel
Force = $true
ErrorAction = $SC
WarningAction = $SC
Confirm = $false
}
$null = (New-ItemProperty @paramNewItemProperty)
Write-Verbose -Message 'Registry Entry was created.'
}
catch
{
$paramSetItem = @{
Path = 'HKLM:\SOFTWARE\Policies\Microsoft\office\16.0\common\officeupdate\updatebranch'
Value = $Channel
Force = $true
ErrorAction = $SC
WarningAction = $SC
Confirm = $false
}
$null = (Set-Item @paramSetItem)
Write-Verbose -Message 'Registry Entry was changed.'
}
}
end
{
Write-Output -InputObject "Office Release Channel Set to $Channel"
}

View File

@@ -0,0 +1,96 @@
<#
.SYNOPSIS
Prevent the installation of Bing Search extension in Chrome by tweak the registry
.DESCRIPTION
Microsoft will install a Bing Search extension in Chrome with Office 365 ProPlus, this script prevents this.
.EXAMPLE
PS C:\> .\Set-PreventBingInstallRegistryKey.ps1
Prevent the installation of Bing Search extension in Chrome by tweak the registry
.NOTES
If you have a fully Domain managed Client, of the client is managed by Azure AD/Intune, you can handle this there.
If not (remote users?), you might want to tweak your Registry to prevent the installation of the Bing Search extension in Chrome
This script will create the matching registry value, if the registry entry exists it also ensures that it is set to prevent the installation.
.LINK
https://docs.microsoft.com/en-us/deployoffice/microsoft-search-bing#how-to-exclude-the-extension-for-microsoft-search-in-bing-from-being-installed
.LINK
https://github.com/MicrosoftDocs/OfficeDocs-DeployOffice/issues/659
.LINK
https://o365reports.com/2020/01/22/using-office-365-proplus-chrome-youll-soon-be-binged/
#>
[CmdletBinding(ConfirmImpact = 'None',
SupportsShouldProcess = $true)]
param ()
begin
{
#region Defaults
$RegistryPath = 'HKLM:\SOFTWARE\Policies\Microsoft\Office\16.0\Common\Officeupdate'
$RegistryName = 'preventbinginstall'
$RegistryValue = '00000001'
#endregion Defaults
}
process
{
if (-not (Test-Path -Path $RegistryPath -ErrorAction SilentlyContinue))
{
#region CompareValue
<#
Compare to ensure that we have the correct settings
We compressed this a bit to make this one (long) line!
#>
if (((Get-Item -LiteralPath $RegistryPath -ErrorAction SilentlyContinue).GetValue($RegistryName, $null)) -ne ($RegistryValue.Replace('0', '')))
{
# Enforce the value to be what we want
$null = (Set-ItemProperty -Path $RegistryPath -Name $RegistryName -Value $RegistryValue -Force -ErrorAction SilentlyContinue -Confirm:$false)
}
#endregion CompareValue
}
else
{
#region CreateValue
# Ensure the structure exists
$null = (New-Item -Path $RegistryPath -Force -ErrorAction SilentlyContinue -Confirm:$false -ItemType 'directory')
# Set the registry key to the correct value
$null = (New-ItemProperty -Path $RegistryPath -Name $RegistryName -Value $RegistryValue -PropertyType DWORD -Force -ErrorAction SilentlyContinue -Confirm:$false)
#endregion CreateValue
}
}
#region LICENSE
<#
BSD 3-Clause License
Copyright (c) 2021, enabling Technology
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#>
#endregion LICENSE
#region DISCLAIMER
<#
DISCLAIMER:
- Use at your own risk, etc.
- This is open-source software, if you find an issue try to fix it yourself. There is no support and/or warranty in any kind
- This is a third-party Software
- The developer of this Software is NOT sponsored by or affiliated with Microsoft Corp (MSFT) or any of its subsidiaries in any way
- The Software is not supported by Microsoft Corp (MSFT)
- By using the Software, you agree to the License, Terms, and any Conditions declared and described above
- If you disagree with any of the terms, and any conditions declared: Just delete it and build your own solution
#>
#endregion DISCLAIMER

View File

@@ -0,0 +1,130 @@
<#
.SYNOPSIS
Prevent the installation of Bing Search extension in Chrome by tweak the registry
.DESCRIPTION
Microsoft will install a Bing Search extension in Chrome with Office 365 ProPlus, this script prevents this.
.EXAMPLE
PS C:\> .\Set-PreventBingInstallRegistryKey_splat.ps1
Prevent the installation of Bing Search extension in Chrome by tweak the registry
.NOTES
In this version all commands are splatted to make it better readable (e.g. no long lines)
If you have a fully Domain managed Client, of the client is managed by Azure AD/Intune, you can handle this there.
If not (remote users?), you might want to tweak your Registry to prevent the installation of the Bing Search extension in Chrome
This script will create the matching registry value, if the registry entry exists it also ensures that it is set to prevent the installation.
.LINK
https://docs.microsoft.com/en-us/deployoffice/microsoft-search-bing#how-to-exclude-the-extension-for-microsoft-search-in-bing-from-being-installed
.LINK
https://github.com/MicrosoftDocs/OfficeDocs-DeployOffice/issues/659
.LINK
https://o365reports.com/2020/01/22/using-office-365-proplus-chrome-youll-soon-be-binged/
#>
[CmdletBinding(ConfirmImpact = 'None',
SupportsShouldProcess = $true)]
param ()
begin
{
#region Defaults
$RegistryPath = 'HKLM:\SOFTWARE\Policies\Microsoft\Office\16.0\Common\Officeupdate'
$RegistryName = 'preventbinginstall'
$RegistryValue = '00000001'
#endregion Defaults
}
process
{
$paramTestPath = @{
Path = $RegistryPath
ErrorAction = 'SilentlyContinue'
}
if (-not (Test-Path @paramTestPath))
{
#region CompareValue
<#
Compare to ensure that we have the correct settings
We compressed this a bit to make this one (long) line!
#>
$paramGetItem = @{
LiteralPath = $RegistryPath
ErrorAction = 'SilentlyContinue'
}
if (((Get-Item @paramGetItem ).GetValue($RegistryName, $null)) -ne ($RegistryValue.Replace('0', '')))
{
# Enforce the value to be what we want
$paramSetItemProperty = @{
Path = $RegistryPath
Name = $RegistryName
Value = $RegistryValue
Force = $true
ErrorAction = 'SilentlyContinue'
Confirm = $false
}
$null = (Set-ItemProperty @paramSetItemProperty)
}
#endregion CompareValue
}
else
{
#region CreateValue
# Ensure the structure exists
$paramNewItem = @{
Path = $RegistryPath
Force = $true
ErrorAction = 'SilentlyContinue'
Confirm = $false
ItemType = 'directory'
}
$null = (New-Item @paramNewItem)
# Set the registry key to the correct value
$paramNewItemProperty = @{
Path = $RegistryPath
Name = $RegistryName
Value = $RegistryValue
PropertyType = 'DWORD'
Force = $true
ErrorAction = 'SilentlyContinue'
Confirm = $false
}
$null = (New-ItemProperty @paramNewItemProperty)
#endregion CreateValue
}
}
#region LICENSE
<#
BSD 3-Clause License
Copyright (c) 2021, enabling Technology
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#>
#endregion LICENSE
#region DISCLAIMER
<#
DISCLAIMER:
- Use at your own risk, etc.
- This is open-source software, if you find an issue try to fix it yourself. There is no support and/or warranty in any kind
- This is a third-party Software
- The developer of this Software is NOT sponsored by or affiliated with Microsoft Corp (MSFT) or any of its subsidiaries in any way
- The Software is not supported by Microsoft Corp (MSFT)
- By using the Software, you agree to the License, Terms, and any Conditions declared and described above
- If you disagree with any of the terms, and any conditions declared: Just delete it and build your own solution
#>
#endregion DISCLAIMER