I have recently clone your repository and attempted to run the script for CM-2103.ps1.
18:36:29|03:21:48|00:07:29.376| - .Installing Custom Role 'CM-2103' on machine 'lab1cm01'
18:36:30|03:21:49|00:00:00.000| - Starting miscellaneous items download process
18:36:30|03:21:49|00:00:00.000| - Downloading SQL Native Client
18:36:30|03:21:49|00:00:00.031| - SQL Native Client MSI already exists, delete 'E:\LabSources\SoftwarePackages\sqlncli.msi' if you want to download again 18:36:30|03:21:49|00:00:00.038| - Activity Done 18:36:30|03:21:49|00:00:00.052| - Finished miscellaneous items download process 18:36:30|03:21:49|00:00:00.000| - Starting ADK and WinPE download process 18:36:31|03:21:49|00:00:00.000| - Downloading 'adksetup.exe' to 'E:\LabSources\SoftwarePackages' 18:36:31|03:21:49|00:00:00.005| - File already exists, skipping the download. Delete if you want to download again. 18:36:31|03:21:49|00:00:00.013| - Activity done 18:36:31|03:21:49|00:00:00.000| - Downloading ADK files to 'E:\LabSources\SoftwarePackages\ADK' 18:36:31|03:21:49|00:00:00.007| - Directory already exist, skipping the download. Delete the directory if you want to download again. 18:36:31|03:21:49|00:00:00.011| - Activity done 18:36:31|03:21:49|00:00:00.000| - Downloading 'adkwinpesetup.exe' to 'E:\LabSources\SoftwarePackages' 18:36:31|03:21:49|00:00:00.010| - File already exists, skipping the download. Delete if you want to download again. 18:36:31|03:21:49|00:00:00.019| - Activity done 18:36:31|03:21:49|00:00:00.000| - Downloading WinPE files to 'E:\LabSources\SoftwarePackages\WinPE' 18:36:31|03:21:49|00:00:00.006| - Directory already exists, skipping the download. Delete the directory if you want to download again. 18:36:31|03:21:49|00:00:00.011| - Activity done 18:36:31|03:21:49|00:00:00.025| - Finished ADK / WinPE download process 18:36:31|03:21:49|00:00:00.000| - Starting Configuration Manager and prerequisites download process 18:36:31|03:21:49|00:00:00.000| - Downloading 'MEM_Configmgr_2103.zip' to 'E:\LabSources\SoftwarePackages' 18:36:31|03:21:49|00:00:00.007| - File already exists, skipping the download. Delete if you want to download again. 18:36:31|03:21:49|00:00:00.017| - Activity done 18:36:31|03:21:49|00:00:00.000| - Extracting 'MEM_Configmgr_2103.zip' to 'E:\LabSources\SoftwarePackages\CM2103-CB' 18:36:31|03:21:49|00:00:00.009| - Directory already exists, skipping the extraction. Delete the directory if you want to extract again. 18:36:31|03:21:49|00:00:00.014| - Activity done 18:36:31|03:21:49|00:00:00.000| - Downloading prerequisites to 'E:\LabSources\SoftwarePackages\CM2103-PreReqs-CB' 18:36:31|03:21:49|00:00:00.005| - Directory already exists, skipping the download. Delete the directory if you want to download again. 18:36:31|03:21:49|00:00:00.009| - Activity done 18:36:31|03:21:49|00:00:00.022| - Finished CM binaries and prerequisites download process 18:36:31|03:21:50|00:00:00.000| - Starting site install process 18:36:34|03:21:53|00:00:00.000| - Running pre-req checks 18:36:34|03:21:53|00:00:00.000| - Checking if site is already installed 18:36:48|03:22:06|00:00:13.650| - .. 18:36:50|03:22:08|00:00:15.696| - No site found, continuing 18:36:50|03:22:08|00:00:15.704| - Activity done 18:36:50|03:22:08|00:00:15.716| - Found ADK directory 'E:\LabSources\SoftwarePackages\ADK' 18:36:50|03:22:08|00:00:15.724| - Found WinPE directory 'E:\LabSources\SoftwarePackages\WinPE' 18:36:50|03:22:08|00:00:15.732| - Found CM install directory in 'E:\LabSources\SoftwarePackages\CM2103-CB' 18:36:50|03:22:08|00:00:15.739| - Found CM pre-reqs directory in 'E:\LabSources\SoftwarePackages\CM2103-PreReqs-CB' 18:36:50|03:22:08|00:00:15.753| - Activity done 18:36:50|03:22:09|00:00:00.000| - Adding Windows Defender exclusions 18:36:57|03:22:16|00:00:07.263| - .. 18:37:01|03:22:20|00:00:11.314| - Activity done 18:37:01|03:22:20|00:00:00.000| - Bringing online additional disks 18:37:09|03:22:28|00:00:07.867| - ... 18:37:19|03:22:38|00:00:17.976| - Activity done 18:37:19|03:22:38|00:00:00.000| - Saving NO_SMS_ON_DRIVE.SMS file on C: and F: 18:37:26|03:22:45|00:00:06.908| - .. 18:37:26|03:22:45|00:00:06.934| - Activity done 18:37:26|03:22:45|00:00:00.000| - Creating directory for WSUS 18:37:33|03:22:51|00:00:06.372| - .. 18:37:33|03:22:51|00:00:06.395| - Activity done 18:37:33|03:22:51|00:00:00.000| - Copying files 18:51:32|03:36:51|00:13:59.808| - Activity done 18:51:32|03:36:51|00:00:00.000| - Installing SQL Server Native Client 18:51:41|03:37:00|00:00:08.849| - .... 18:52:06|03:37:25|00:00:34.114| - Activity done 18:52:06|03:37:25|00:00:00.000| - Restarting server 18:52:24|03:37:43|00:00:17.441| - .................... 18:57:09|03:42:27|00:05:02.040| - Activity done 18:57:09|03:42:27|00:00:00.000| - Extending the AD Schema 18:57:31|03:42:50|00:00:22.903| - .......... 18:58:52|03:44:11|00:01:43.517| - Activity done 18:58:52|03:44:11|00:00:00.000| - Configuring CM Systems Management Container 18:58:58|03:44:17|00:00:06.079| - .....
18:59:31|03:44:50|00:00:39.295| - Activity done
18:59:31|03:44:50|00:00:00.000| - Installing ADK
18:59:43|03:45:01|00:00:11.453| - ......................
19:03:06|03:48:25|00:03:34.893| - Activity done
19:03:06|03:48:25|00:00:00.000| - Installing WinPE
19:03:18|03:48:36|00:00:11.309| - .....................................................................
19:14:41|04:00:00|00:11:34.820| - Activity done
19:14:41|04:00:00|00:00:00.000| - Installing WSUS
19:15:34|04:00:53|00:00:53.015| - .................................................................................................................
19:54:35|04:39:53|00:39:53.672| - Activity done
19:54:35|04:39:53|00:00:00.000| - Running WSUS post configuration tasks
19:54:44|04:40:02|00:00:08.932| - ................
19:57:05|04:42:24|00:02:30.682| - Activity done
19:57:05|04:42:24|00:00:00.000| - Installing additional features (1/2)
19:57:40|04:42:59|00:00:34.567| - ..........................................
20:04:23|04:49:42|00:07:17.496| - Activity done
20:04:23|04:49:42|00:00:00.000| - Installing additional features (2/2)
20:04:55|04:50:13|00:00:31.780| - .......................................
20:11:12|04:56:31|00:06:49.040| - Activity done
20:11:12|04:56:31|00:00:00.000| - Restarting server
20:12:13|04:57:32|00:01:01.066| - ................................
20:21:01|05:06:19|00:09:48.811| - Activity done
20:21:01|05:06:19|00:00:00.000| - Installing Configuration Manager
20:21:31|05:06:49|00:00:29.976| - ........................................................................................
20:36:02|05:21:20|00:15:00.796| - Failed to install Configuration Manager (Incorrect function)
Exception: E:\LabSources\CustomRoles\CM-2103\Invoke-InstallCM.ps1:640
Line |
640 | throw $ReceiveJobErr
| ~~~~~~~~~~~~~~~~~~~~
| System.Management.Automation.ActionPreferenceStopException: The running command stopped because the preference variable
| "ErrorActionPreference" or common parameter is set to Stop: Incorrect function at
| System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception) at
| System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame) at
| System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) at
| System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
[20:36:02][05:21:21] C:\Dev\PoSH\AutomatedLab>
I have tried multiple times, with same error.
is there something wrong that I'm doing or a bug in the code?