question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Getting error Invoke-CimMethod : Value cannot be null. Parameter name: service for SPFarm resource

See original GitHub issue
ISSUE TITLE:

SPFARM - Getting error Invoke-CimMethod : Value cannot be null. Parameter name: service for SPFarm resource

ISSUE DESCRIPTION (this template):

Getting error Invoke-CimMethod : Value cannot be null. Parameter name: service for SPFarm resource

Details of the scenario you tried and the problem that is occurring

Verbose logs showing the problem

VERBOSE: [ComputerName]: [[SPFarm]SharePointFarm] Detected Version: SharePoint 2016 - c onfiguring server as Application VERBOSE: [ComputerName]: [[SPFarm]SharePointFarm] The SharePoint config database ‘Share Point_Config’ already exists, so this server will join the farm. VERBOSE: [ComputerName]: [[SPFarm]SharePointFarm] The database exists, so attempt to jo in the server to the farm VERBOSE: [ComputerName]: [[SPFarm]SharePointFarm] The server will attempt to join the f arm now once every 60 seconds for the next 15 minutes. VERBOSE: [ComputerName]: [[SPFarm]SharePointFarm] Leaving BeginProcessing Method of Con nect-SPConfigurationDatabase. VERBOSE: [ComputerName]: [[SPFarm]SharePointFarm] Entering function SPMountSPConfigurat ionDatabase.InternalProcessRecord VERBOSE: [ComputerName]: [[SPFarm]SharePointFarm] Creating connection string for config db SharePoint_Config server SQLServer VERBOSE: [ComputerName]: [[SPFarm]SharePointFarm] Creating connection string for admin content db admincontentdatabase server SQLServer VERBOSE: [ComputerName]: [[SPFarm]SharePointFarm] Using NTLM for sql connection string VERBOSE: [ComputerName]: [[SPFarm]SharePointFarm] Openning configdb so that I can join it at server SQLServer database SharePoint_Config in farm mode VERBOSE: [ComputerName]: [[SPFarm]SharePointFarm] Now joining to farm at server SQLServer database SharePoint_Config Invoke-CimMethod : Value cannot be null. Parameter name: service At char:9

  •     Invoke-CimMethod @parameters @PSBoundParameters
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidData: (Microsoft.Share…urationDatabase:) [Invoke-CimMethod], CimException
    • FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletConnectSPConfigurationDatabase,Microsoft.Mana gement.Infrastructure.CimCmdlets.InvokeCimMethodCommand

Suggested solution to the issue

The DSC configuration that is used to reproduce the issue (as detailed as possible)

# insert configuration here

The operating system the target node is running

Version of SharePoint that is used (e.g. SharePoint 2016) Sharepoint 2016

Version and build of PowerShell the target node is running

Name Value


PSVersion 5.1.17763.503
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
BuildVersion 10.0.17763.503
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

Version of the DSC module that was used (‘dev’ if using current dev branch) 3.3.0.0

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:31 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
VerdonTrigancecommented, Nov 18, 2020

Do you mean the Central Administration application pool, which is created a timestamp in the name? That is a left over from leaving and rejoining a farm. During the leave process, the CA application pool isn’t deleted. When you then rejoin the farm and SharePoint tries to create the application pool, it detects it already exist and adds the timestamp. To prevent this issue, recreate the farm (including databases) and make sure all websites and application pools are deleted in IIS.

This Install-SPService issue doesn’t ring a bell. Can you please create a new issue and provide any debugging info (ULS or any other log)?

Issue with app pool’s account I resolved with cleaning everything out and deleting pools, dbs and others. restarting everything and beginning from the start. Issue with names of databases I open as another topic.

Now lets return to ‘The type initializer for ‘Microsoft.Office.Access.Services.BrandStrings’ threw an exception.’ error. It was years ago and still here. I faced with it when used AutoSPInstaller too. Case is simple - running Install-SPService from powershell leads to error above (and SPFarm resource call it), but running psconfig.exe looks like workaround for now.

1reaction
VerdonTrigancecommented, Nov 16, 2020

@VerdonTrigance Are you 100% sure all of the used accounts are in the domain\account format? The example you shared above unfortunately doesn’t show this.

Khm, some of them are not. I’ll check it again.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting error Invoke-CimMethod : Value cannot be null. ...
Getting error Invoke-CimMethod : Value cannot be null. Parameter name: service for SPFarm resource. Details of the scenario you tried and ...
Read more >
Value cannot be null. Parameter name
To fix the error, go in Central Administration> Manage Service Applications > Highlight the User Profile Service Application.
Read more >
No one is able to log into SharePoint sites after AD Migration
The plan was to delete and recreate User Profile Service but we are unable to create a service application. An error "value cannot...
Read more >
Value cannot be null. Parameter name: source
This error message often crops up when your connection string is wrong. At a guess, you'll need something like this: <connectionStrings> <add ...
Read more >
Value cannot be null. Parameter name: domainName Error ...
Admins are receiving error messages that state the "value cannot be null." While the fix progresses, affected admins can assign "send on behalf ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found