# Does all PS module run on linus machine as well as windows?

**URL:** <https://forums.powershell.org/t/does-all-ps-module-run-on-linus-machine-as-well-as-windows/22854>\
**Category:** PowerShell Help\
**Created:** [September 8, 2023, 11:05am UTC](https://forums.powershell.org/t/does-all-ps-module-run-on-linus-machine-as-well-as-windows/22854 "2023-09-08T11:05:37Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Soheil\_D.Amiri](https://avatars.discourse-cdn.com/v4/letter/s/a9adbd/32.png) [@Soheil\_D.Amiri](https://forums.powershell.org/u/Soheil_D.Amiri)\
**Post date:** [September 8, 2023, 11:05am UTC](https://forums.powershell.org/t/does-all-ps-module-run-on-linus-machine-as-well-as-windows/22854/1 "2023-09-08T11:05:37Z")

</div>

hi  
i installed network module on my ubuntu 22.04 but command does not run  
here is my outputL

PS /\> Get-Command -module Network

CommandType Name Version Source

* * *

Alias Add-WebSecurityProtocol 0.9.1 Network  
Alias Expand-Url 0.9.1 Network  
Function Add-HostsFileEntry 0.9.1 Network  
Function Clear-DnsCache 0.9.1 Network  
Function Convert-CidrToDottedSubnetMask 0.9.1 Network  
Function Convert-SubnetMaskToCidr 0.9.1 Network  
Function ConvertTo-DecimalIP 0.9.1 Network  
Function ConvertTo-DottedDecimalIP 0.9.1 Network  
Function Disable-Proxy 0.9.1 Network  
Function Enable-Proxy 0.9.1 Network  
Function Expand-Uri 0.9.1 Network  
Function Get-DnsAddressList 0.9.1 Network  
Function Get-DnsCache 0.9.1 Network  
Function Get-DNSDebugLog 0.9.1 Network  
Function Get-DNSScavengeRecord 0.9.1 Network  
Function Get-HostsFile 0.9.1 Network  
Function Get-MyIpAddress 0.9.1 Network  
Function Get-Netstat 0.9.1 Network  
Function Get-Proxy 0.9.1 Network  
Function Get-WebCertificate 0.9.1 Network  
Function Get-WebSecurityProtocol 0.9.1 Network  
Function Import-509Certificate 0.9.1 Network  
Function Invoke-DNSManualCleanUp 0.9.1 Network  
Function Remove-HostsFileEntry 0.9.1 Network  
Function Send-WakeOnLan 0.9.1 Network  
Function Set-WebCertificatePolicy 0.9.1 Network  
Function Set-WebSecurityProtocol 0.9.1 Network  
Function Test-CertificateAuthorityPlacement 0.9.1 Network

PS /\> Get-Netstat  
ConvertFrom-String: The term ‘ConvertFrom-String’ is not recognized as a name of a cmdlet, 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.

what should i do ?

---

<div class="post-metadata">

**Author:** ![neemobeer](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/neemobeer/32/4087_2.png) [@neemobeer](https://forums.powershell.org/u/neemobeer)\
**Post date:** [September 8, 2023, 1:56pm UTC](https://forums.powershell.org/t/does-all-ps-module-run-on-linus-machine-as-well-as-windows/22854/2 "2023-09-08T13:56:10Z")

</div>

The short answer, no.  
Looking at this particular module source. It is very much geared toward Windows systems.

---

<div class="post-metadata">

**Author:** ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)\
**Post date:** [September 8, 2023, 1:58pm UTC](https://forums.powershell.org/t/does-all-ps-module-run-on-linus-machine-as-well-as-windows/22854/3 "2023-09-08T13:58:06Z")

</div>

Soheil,  
Welcome to the forum. 👋🏼

When you post code, sample data, console output or error messages please format it as code using the preformatted text button ( \</\> ). Simply place your cursor on an empty line, click the button and paste your code.

Thanks in advance

[How to format code in PowerShell.org](https://us1.discourse-cdn.com/flex019/uploads/powershell/original/2X/b/bee50c628238f2c076c0504efb6b15f2fb11f002.gif) 1 \<---- Click 👆🏽 😉

( !! Sometimes the _preformatted text_ button hides behind the settings gear symbol. 😉 )

> [@Soheil\_D.Amiri](#):
>
> ConvertFrom-String: The term ‘ConvertFrom-String’ is not recognized as a name of a cmdlet, 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.

> **[ConvertFrom-String (Microsoft.PowerShell.Utility) - PowerShell](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/convertfrom-string?view=powershell-5.1)**
>
> The ConvertFrom-String cmdlet extracts and parses structured properties from string content. This cmdlet generates an object by parsing text from a traditional text stream. For each string in the pipeline, the cmdlet splits the input by either a...

Your first stop should always be the documentation. There you can see that this command is part of the `Windows PowerShell`. So it is not available in version 6 and higher.

You may try if

> **[ConvertFrom-StringData (Microsoft.PowerShell.Utility) - PowerShell](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/convertfrom-stringdata?view=powershell-7.3)**
>
> The ConvertFrom-StringData cmdlet converts a string that contains one or more key and value pairs into a hash table. Because each key-value pair must be on a separate line, here-strings are often used as the input format. By default, the key must be...

does the trick for your purpose. 😉

---

<div class="post-metadata">

**Author:** ![krzydoug](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/krzydoug/32/1008_2.png) [@krzydoug](https://forums.powershell.org/u/krzydoug)\
**Post date:** [September 8, 2023, 2:37pm UTC](https://forums.powershell.org/t/does-all-ps-module-run-on-linus-machine-as-well-as-windows/22854/4 "2023-09-08T14:37:33Z")

</div>

You could try out my `Get-NetStat` - it does not depend on `ConvertFrom-String` and works in powershell 6+

> <https://github.com/krzydoug/Tools/blob/master/Get-Netstat.ps1>

---

<div class="post-metadata">

**Author:** ![krzydoug](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/krzydoug/32/1008_2.png) [@krzydoug](https://forums.powershell.org/u/krzydoug)\
**Post date:** [September 8, 2023, 4:12pm UTC](https://forums.powershell.org/t/does-all-ps-module-run-on-linus-machine-as-well-as-windows/22854/5 "2023-09-08T16:12:26Z")

</div>

So the function I made really was just for windows as well. I’ve added some linux support (TCP) as I don’t have a linux machine that has UDP connections at the moment. Naturally, netstat command line utility must be present for the function to work.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/powershell/original/1X/385e4f9fe133561ad30a814262fe0e0ae6bc3ef0.png) [@system](https://forums.powershell.org/u/system)\
**Post date:** [February 10, 2024, 5:34pm UTC](https://forums.powershell.org/t/does-all-ps-module-run-on-linus-machine-as-well-as-windows/22854/6 "2024-02-10T17:34:03Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
