Closed ecanales88 closed 3 years ago
This happens because SharePoint Server 2019 does not need and therefore does not install the "IIS6 WMI Compatibility" feature in Windows Server 2019. Install that feature and it should work:
@spjeff You might want to look at retrieving this information in another way... :-)
I met the issue too. The script allows me to enter my admin password whatever and the task seems to be installed. Am I wrong to think the warm up is functional despite of the [ Get-WMIObject : Invalid namespace "root/MicrosoftIISv2" ] error ?
It is my understanding that these two features are used in the deployment of the script. Thus, you can enable them in windows 2019 server in order to install it farm wide and then remove them.
i put try catch around the WMIcall and now the code just falls back to prompting for username and password. I submitted a pull request
Thank you Sergei.
I'm not sure if this logic is still working for you all. But it is not working for me. The problem is that the solution implemented by @SergeiAtML relies on an exception being thrown and the catch
block handling the password prompt, but no exception is ever thrown. So it falls out of the try/catch
block and continues along with no password. Eventually when it gets to the schtasks
command, it just hangs forever.
In my environment, I'm now checking for a null password after the logic that attempts to loop through app pools (which quietly "fails" without an exception). If the password is null at that point, I'm manually throwing an exception to kick it to the catch block so that the user can be prompted for a password. I also added an additional check after the password prompt to ensure that one was entered. If a password wasn't entered, a final exception is thrown, preventing the function from continuing without a password.
Hi, in SharePoint 2019 appears this error: "Get-WMIObject : Invalid namespace "root/MicrosoftIISv2"
Please, I use your warmup script since SharEPoint 2013 :)