We just wanted check the log information to see if any module information was listed.
Another user with the same issue rebuilt his OS and the issue was resolved. It is possible that something in PowerShell or .NET is corrupted, because it seems the Get-Module -ListAvailable is failing in the caching process. Otherwise the V5 Module log would contain a list of modules.
If you are willing, we can send you a test component that includes extra logging.
David
Missing Modules and Snapins in Object Browser
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Re: Missing Modules and Snapins in Object Browser
We sent you an email with links and instructions on how to use the diagnostic version of the component.
David
David
David
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: Missing Modules and Snapins in Object Browser
Hi!
I have now followed your instructions and here comes the new logs... Se the attached zip file.
When I looked into the log files, Your new version of the dll didn't tell much more information....
I have now followed your instructions and here comes the new logs... Se the attached zip file.
When I looked into the log files, Your new version of the dll didn't tell much more information....
- Attachments
-
- Local Machine.zip
- Local Machine
- (201.46 KiB) Downloaded 130 times
Re: Missing Modules and Snapins in Object Browser
It confirms that PowerShell is not returning any modules when the CacheBuilder issues the Get-Module -ListAvailable command. I don't know why this is the case on your machine, but I suspect that some other setting is causing this.
Let's look at the PSModulePath values and see what we can find. Please run the following script and post the results:
David
Let's look at the PSModulePath values and see what we can find. Please run the following script and post the results:
- "User:"
- [Environment]::GetEnvironmentVariable('PSModulePath', 'User').split(";")
- "Machine:"
- [Environment]::GetEnvironmentVariable('PSModulePath', 'Machine').split(";")
- "Process:"
- [Environment]::GetEnvironmentVariable('PSModulePath', 'Process').split(";")
David
David
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: Missing Modules and Snapins in Object Browser
Here comes the output:
PS C:\Users\XXXXXX> [Environment]::GetEnvironmentVariable("PSModulePath", "User").split(";")
You cannot call a method on a null-valued expression.
At line:1 char:1
+ [Environment]::GetEnvironmentVariable("PSModulePath", "User").split(" ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
PS C:\Users\XXXXXX> [Environment]::GetEnvironmentVariable("PSModulePath", "Machine").split(";")
C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\
C:\Program Files (x86)\Microsoft SQL Server\120\Tools\PowerShell\Modules\
C:\Program Files\Intel\
C:\Program Files\WindowsPowerShell\Modules\
C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ResourceManager\AzureResourceManager\
C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ServiceManagement\
PS C:\Users\XXXXXX> [Environment]::GetEnvironmentVariable("PSModulePath", "Process").split(";")
C:\Users\XXXXXX\Documents\WindowsPowerShell\Modules
C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\
C:\Program Files (x86)\Microsoft SQL Server\120\Tools\PowerShell\Modules\
C:\Program Files\Intel\
C:\Program Files\WindowsPowerShell\Modules\
C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ResourceManager\AzureResourceManager\
C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ServiceManagement\
PS C:\Users\XXXXXX> [Environment]::GetEnvironmentVariable("PSModulePath", "User").split(";")
You cannot call a method on a null-valued expression.
At line:1 char:1
+ [Environment]::GetEnvironmentVariable("PSModulePath", "User").split(" ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
PS C:\Users\XXXXXX> [Environment]::GetEnvironmentVariable("PSModulePath", "Machine").split(";")
C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\
C:\Program Files (x86)\Microsoft SQL Server\120\Tools\PowerShell\Modules\
C:\Program Files\Intel\
C:\Program Files\WindowsPowerShell\Modules\
C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ResourceManager\AzureResourceManager\
C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ServiceManagement\
PS C:\Users\XXXXXX> [Environment]::GetEnvironmentVariable("PSModulePath", "Process").split(";")
C:\Users\XXXXXX\Documents\WindowsPowerShell\Modules
C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\
C:\Program Files (x86)\Microsoft SQL Server\120\Tools\PowerShell\Modules\
C:\Program Files\Intel\
C:\Program Files\WindowsPowerShell\Modules\
C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ResourceManager\AzureResourceManager\
C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ServiceManagement\
Re: Missing Modules and Snapins in Object Browser
The same but from inside PS Studio Console:
User:
[Environment]::GetEnvironmentVariable('PSModulePath', 'User').split(";")
You cannot call a method on a null-valued expression.
At line:1 char:1
+ [Environment]::GetEnvironmentVariable('PSModulePath', 'User').split(" ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
Machine:
[Environment]::GetEnvironmentVariable('PSModulePath', 'Machine').split(";")
C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\
C:\Program Files (x86)\Microsoft SQL Server\120\Tools\PowerShell\Modules\
C:\Program Files\Intel\
C:\Program Files\WindowsPowerShell\Modules\
C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ResourceManager\AzureResourceManager\
C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ServiceManagement\
Process:
[Environment]::GetEnvironmentVariable('PSModulePath', 'Process').split(";")
C:\Users\XXXXXXXX\Documents\WindowsPowerShell\Modules
C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\
C:\Program Files (x86)\Microsoft SQL Server\120\Tools\PowerShell\Modules\
C:\Program Files\Intel\
C:\Program Files\WindowsPowerShell\Modules\
C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ResourceManager\AzureResourceManager\
C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ServiceManagement\
User:
[Environment]::GetEnvironmentVariable('PSModulePath', 'User').split(";")
You cannot call a method on a null-valued expression.
At line:1 char:1
+ [Environment]::GetEnvironmentVariable('PSModulePath', 'User').split(" ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
Machine:
[Environment]::GetEnvironmentVariable('PSModulePath', 'Machine').split(";")
C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\
C:\Program Files (x86)\Microsoft SQL Server\120\Tools\PowerShell\Modules\
C:\Program Files\Intel\
C:\Program Files\WindowsPowerShell\Modules\
C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ResourceManager\AzureResourceManager\
C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ServiceManagement\
Process:
[Environment]::GetEnvironmentVariable('PSModulePath', 'Process').split(";")
C:\Users\XXXXXXXX\Documents\WindowsPowerShell\Modules
C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\
C:\Program Files (x86)\Microsoft SQL Server\120\Tools\PowerShell\Modules\
C:\Program Files\Intel\
C:\Program Files\WindowsPowerShell\Modules\
C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ResourceManager\AzureResourceManager\
C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ServiceManagement\
Re: Missing Modules and Snapins in Object Browser
The fact that PowerShell is reporting no modules has me stumped.
You said when you ran Get-Module -ListAvailable in PowerShell Studio (not the console) it returns results, yet it makes no sense that the caching process is not getting any results.
Let's try something:
1. Go to PowerShell Studio's folder:
C:\Program Files\SAPIEN Technologies, Inc\PowerShell Studio 2016
2. Right Click the CacheManager.exe and select "Run as administrator" from the context menu.
3. Also try running the cache under another user profile (if you have multiple users on the machine), to see if this issue is related to the current user account.
David
You said when you ran Get-Module -ListAvailable in PowerShell Studio (not the console) it returns results, yet it makes no sense that the caching process is not getting any results.
Let's try something:
1. Go to PowerShell Studio's folder:
C:\Program Files\SAPIEN Technologies, Inc\PowerShell Studio 2016
2. Right Click the CacheManager.exe and select "Run as administrator" from the context menu.
3. Also try running the cache under another user profile (if you have multiple users on the machine), to see if this issue is related to the current user account.
David
David
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.