K
K
kaktak2552021-01-19 00:16:23
PowerShell
kaktak255, 2021-01-19 00:16:23

The Get-NetQosPolicy command does not work in Power Shell v7.1.1, what should I do?

Other commands like Get-Command work

Response to using the Get-NetQosPolicy command:

Get-NetQosPolicy: The term 'Get-NetQosPolicy' is not recognized as a name of ac
mdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path
is correct and try again.

In the patch, I registered both the path only to the folder and tried the path to the folder and to the exe itself, the result is the same. I installed power shell from a zip archive, that is, there were a lot of files among them there was an exe, I unzipped it all into a folder, threw the folder into the c: directory, help

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
MaxKozlov, 2021-01-19
@kaktak255

It is better to install MSI
The command itself is not from the PS kit, but from the module

PS C:\> Get-Command Get-NetQosPolicy

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Function        Get-NetQosPolicy                                   2.0.0.0    NetQos

PS C:\> Get-Module NetQos|fl

Name              : NetQos
Path              : C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\NetQos\NetQos.psd1
Description       :
ModuleType        : Manifest
Version           : 2.0.0.0
NestedModules     : {MSFT_NetQosPolicy}
ExportedFunctions : {Get-NetQosPolicy, New-NetQosPolicy, Remove-NetQosPolicy, Set-NetQosPolicy}
ExportedCmdlets   :
ExportedVariables :
ExportedAliases   :

Apparently, with simple unzipping, the seventh version does not pick up modules from the main paths
. You can try without rearranging to load this module by directly specifying the path.
If it works out, everything is ok with it, you will need to rearrange it as expected and it will work
PS C:\> Import-Module C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\NetQos\NetQos.psd1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question