Get-NetUser | select cn not working
Ninja2040 opened this issue · 2 comments
PS C:\Users\Administrator\Downloads> .\PowerView.ps1
PS C:\Users\Administrator\Downloads> Get-NetUser | select cn
cmdlet, function, script file, or operable program. Check the spelling of the
name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
- Get-NetUser | select cn
-
+ CategoryInfo : ObjectNotFound: (Get-NetUser:String) [], Command NotFoundException + FullyQualifiedErrorId : CommandNotFoundException
PS C:\Users\Administrator\Downloads> .\PowerView.ps1 PS C:\Users\Administrator\Downloads> Get-NetUser | select cn cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1
* Get-NetUser | select cn * ``` + CategoryInfo : ObjectNotFound: (Get-NetUser:String) [], Command NotFoundException + FullyQualifiedErrorId : CommandNotFoundException ```
I also have same problem hit me up if you find some solution
It seems like the Get-NetUser cmdlet is not recognized, which might indicate that the required module or function is not loaded. This could be the result of a few different issues.
PowerShell Version:
Ensure that you are using a version of PowerShell that supports the Get-NetUser cmdlet. Some cmdlets or functions may not be available in older versions of PowerShell.
Import Module or Script:
If Get-NetUser is part of a module or script, make sure that you have imported or loaded it before using the cmdlet. For example, if you are using PowerView, make sure it is loaded using the Import-Module command:
Import-Module .\PowerView.ps1
After importing the module, try running the Get-NetUser | select cn command again.
Execution Policy:
Check your PowerShell execution policy to make sure it allows script execution. You can set the execution policy to RemoteSigned using the following command:
Set-ExecutionPolicy RemoteSigned
Run this command in an elevated PowerShell session (Run as Administrator).
Correct Path:
Make sure that the PowerView.ps1 script is in the correct path. If it's not in the current directory, provide the full or relative path when importing the module.
If you are still encountering issues, please provide more details about the environment and the source of the Get-NetUser cmdlet (whether it's part of a specific module or script).