MS AD V2 Spoke error Error: import-module : The specified module was not loaded because no valid module file was found in\nany module directory.\nAt C:\\ServiceNow\\ServiceNow MID ServerIssue <!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: #000000; } span { font-size: 12pt; font-family: Lato; color: #000000; } h2 { font-size: 24pt; font-family: Lato; color: black; } h3 { font-size: 18pt; font-family: Lato; color: black; } h4 { font-size: 14pt; font-family: Lato; color: black; } a { font-size: 12pt; font-family: Lato; color: #00718F; } a:hover { font-size: 12pt; color: #024F69; } a:target { font-size: 12pt; color: #032D42; } a:visited { font-size: 12pt; color: #7057C7; } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: block; max-width: ; width: auto; height: auto; } } When setting up our MS AD V2 spoke and testing the actions like look up user or any other action you will get the error below: { "Action Status": { "code": 1, "message": "Error: import-module : The specified module 'C:\\ServiceNow\\ServiceNow MID Server\mid server name\\agent\\scripts\\PowerShell\\IH\\Logging' was not loaded because no valid module file was found in\nany module directory.\nAt C:\\ServiceNow\\ServiceNow MID Server mid.name\\agent\\scripts\\PowerShell\\PSScript.ps1:18 char:1\n+ import-module \"$executingScriptDirectory\\IH\\Logging\" -DisableNameChec ...\n+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n+ CategoryInfo : ResourceUnavailable: (C:\\ServiceNow\\S...hell\\IH\\Logging:String) [Import-Module], FileNot\nFoundException\n+ FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand\n\nWrite-SNCGeneralLogs : The term 'Write-SNCGeneralLogs' is not recognized as the name of a cmdlet, function, script\nfile, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct\nand try again.\nAt C:\\ServiceNow\\ServiceNow MID Server mid.name\\agent\\scripts\\PowerShell\\PSScript.ps1:79 char:1\n+ Write-SNCGeneralLogs\n+ ~~~~~~~~~~~~~~~~~~~~\n+ CategoryInfo : ObjectNotFound: (Write-SNCGeneralLogs:String) [], CommandNotFoundException\n+ FullyQualifiedErrorId : CommandNotFoundException\n\nWrite-SNCLog : The term 'Write-SNCLog' is not recognized as the name of a cmdlet, function, script file, or operable\nprogram. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.\nAt C:\\ServiceNow\\ServiceNow MID Server mid.name\\agent\\scripts\\PowerShell\\PSScript.ps1:80 char:1\n+ Write-SNCLog DEBUG \"`$PSScriptRoot = $PSScriptRoot\"\n+ ~~~~~~~~~~~~\n+ CategoryInfo : ObjectNotFound: (Write-SNCLog:String) [], CommandNotFoundException\n+ FullyQualifiedErrorId : CommandNotFoundException\n (Process Automation.082703af87f055107701ed3e0ebb35d4; line 35)" } Release<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: #000000; } span { font-size: 12pt; font-family: Lato; color: #000000; } h2 { font-size: 24pt; font-family: Lato; color: black; } h3 { font-size: 18pt; font-family: Lato; color: black; } h4 { font-size: 14pt; font-family: Lato; color: black; } a { font-size: 12pt; font-family: Lato; color: #00718F; } a:hover { font-size: 12pt; color: #024F69; } a:target { font-size: 12pt; color: #032D42; } a:visited { font-size: 12pt; color: #7057C7; } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: block; max-width: ; width: auto; height: auto; } } All Releases Resolution<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: #000000; } span { font-size: 12pt; font-family: Lato; color: #000000; } h2 { font-size: 24pt; font-family: Lato; color: black; } h3 { font-size: 18pt; font-family: Lato; color: black; } h4 { font-size: 14pt; font-family: Lato; color: black; } a { font-size: 12pt; font-family: Lato; color: #00718F; } a:hover { font-size: 12pt; color: #024F69; } a:target { font-size: 12pt; color: #032D42; } a:visited { font-size: 12pt; color: #7057C7; } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: block; max-width: ; width: auto; height: auto; } } In this case the error indicates that under the Powershell folder in the midserver the folder IH is not found which contains the Logging module. There are 2 possibilities: 1. The folder IH was deleted from under the Powershell folder. or 2. Moved to a different location by mistake. To check this, please navigate to Mid Server --> Scripts files (ecc_agent_script_file.list) Search for the IH folder if it is missing then you need to import the record from a different working instance if it is there then you need to check the Parent column and make sure it has the correct parent in this case the parent should be the Powershell folder as shown below