- This topic has 6 replies, 4 voices, and was last updated 1 month, 2 weeks ago by
August 3, 2020 at 11:04 am #246795
I am new with powershell and need to write a script that collects windows features that exist on a machine. I am aware V5 has the command “Get-WindowsFeature”.
However, I have not found the same in V2.
The closest thing I found was “Get-WMIObject Win32_OptionalFeatures”. I have scoured the internet but have been unsuccesful.
Any help would be greatly appreciated!
Thank you in advance.
- This topic was modified 1 month, 2 weeks ago by izShell57.
August 3, 2020 at 11:17 am #246801ParticipantTopics: 7Replies: 2458Points: 6,439Rank: Community MVP
all Windows version coming with a Powershell version prior 3.0 are not supported anymore. You should not put any effort into Powershell v 2.0.
August 3, 2020 at 11:25 am #246804ParticipantTopics: 7Replies: 557Points: 2,122Rank: Community Hero
Like @Olaf said, efforts should be spent on newer versions of powershell. If you are looking for alternatives, DISM can also enable features starting with Windows 8/2012.
August 3, 2020 at 2:12 pm #246825
I appreciate your help!
August 3, 2020 at 2:53 pm #246834Senior ModeratorTopics: 10Replies: 161Points: 871Rank: Major Contributor
To expand on this a bit more, PowerShell 2.0 has been officially deprecated by Microsoft, largely due to a lack of security features. It should not be used in business/production environments. For example, the Department of Defense requires that PowerShell 2.0 not be installed on its computers. If this is for work, you should try to get your company to update because of the risks. If it’s for personal use just be aware that having PowerShell 2.0 installed on your computer creates a risk, regardless of how you use it.
August 3, 2020 at 3:32 pm #246843
Thank you for your concern!
I appreciate the indepth explanation. However, when the boss says “jump!” then I’m forced to say “how high”…or in this scenario “what version”.
August 3, 2020 at 4:22 pm #246846Senior ModeratorTopics: 10Replies: 161Points: 871Rank: Major Contributor
I figured this might be your situation, and it’s not uncommon for businesses to be tied to outdated software for operational reasons. But, after the recent Garmin ransomware debacle, the Marriott data breach, the massive issues surrounding the use of Zoom for teleconferencing, and the rising expense of data breaches, every company should be taking their information security seriously. Attacks are increasing in frequency and in impact. Quite literally, you cannot afford to ignore known vulnerabilities.
The bottom line is, this will cost the company money.
If for some reason you can’t win that argument, then you should at least CYA. Get the instruction in writing, along with a specific acknowledgement of the risk involved. And tell your boss that you’re trying to protect him, too.
- This reply was modified 1 month, 2 weeks ago by grokkit.
- You must be logged in to reply to this topic.