Skip to main content

Posts

Showing posts from November, 2019

Powershell Cmdlet from which module?

Powershell is pretty much the scripting language that is in every system administrators bag. One of the problems that I have is that I have installed lots of different Powershell modules on my servers, workstations, VM you name it. Over time you kinda of lose track and end up with differs of different versions of modules on different boxes. As the team I am working in is quite young to scripting we have not really followed a process to write within our scripts to check which version of module people should have installed before executing the script so that the cmdlet will run. In the meantime you can run this handy command to quickly check what module and the version of  module you need to be able to use that particular cmdlet. Remember the same cmdlet may of been updated in a newer version too to have more features. So on the machine where your script/cmdlet has run successfully run the following command in Powershell; Get-Command -type cmdlet get-vm | select ModuleNa