Last active
April 3, 2024 13:31
-
-
Save Ioan-Popovici/eb44d90377f8e4370ef65d1af65ce7bc to your computer and use it in GitHub Desktop.
Installs the configuration manager client using the script location as source.
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 | |
Installs the configuration manager client. | |
.DESCRIPTION | |
Installs the configuration manager client using the script location as source. | |
.EXAMPLE | |
Powershell.exe -File Install-CMClient.ps1 -ExecutionPolicy 'Bypass' -WindowStyle 'Hidden' | |
.INPUTS | |
None. | |
.OUTPUTS | |
None. | |
.NOTES | |
Created by Ioan Popovici | |
Does not work if site details are not published in AD. | |
Does not work for workgroup computers. | |
Should work with PowerShell 2.0. | |
.LINK | |
https://SCCM.Zone/Test-CMClientVersion | |
.LINK | |
https://SCCM.Zone/Test-CMClientVersion-GIT | |
.LINK | |
https://SCCM.Zone/Issues | |
.COMPONENT | |
Configuration Manager | |
.FUNCTIONALITY | |
Configuration Manager Client Installation | |
#> | |
##*============================================= | |
##* VARIABLE DECLARATION | |
##*============================================= | |
#region VariableDeclaration | |
## Get script path | |
[string]$ScriptPath = [System.IO.Path]::GetDirectoryName($MyInvocation.MyCommand.Definition) | |
#endregion | |
##*============================================= | |
##* END VARIABLE DECLARATION | |
##*============================================= | |
##*============================================= | |
##* SCRIPT BODY | |
##*============================================= | |
#region ScriptBody | |
## Install sccm Client | |
Start-Process -FilePath 'CCMSETUP.EXE' -ArgumentList "/Source:$ScriptPath /NoService SMSSITECODE=AUTO" -NoNewWindow -Wait | |
#endregion | |
##*============================================= | |
##* END SCRIPT BODY | |
##*============================================= |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment