Tag: Windows

[Solved] No valid module file was found in any module directory

Problem context Everything seems correct: The path is correctly set to find your PowerShell module (normally C:\Program Files\WindowsPowerShell\Modules) Your PowerShell module was correctly build Your files are in a subfolder of the C:\Program Files\WindowsPowerShell\Modules folder the PSM1 and PSD1 (if you created one) files have the same name as the folder name Your module is … Continue reading [Solved] No valid module file was found in any module directory

How to connect to an Azure VM with PowerShell from the Internet

Main key steps If you are already opening PSSessions on other computers, then there are only two key steps which are different for Azure VMs: Add a new inbound rule to the VM's Network Security Group Change the existing firewall rule on the target computer to accept remote computers outside the local subnet However, to … Continue reading How to connect to an Azure VM with PowerShell from the Internet

How to replace an existing static IP address with PowerShell

Starting with Windows Server 2012, you can now handle directly the IP configuration with PowerShell cmdlets. Unfortunately, there is no cmdlet which directly updates an already existing IP address. You have to use four of them. Please be aware that you will disconnect yourself from the computer if you do this operation remotely. This won't … Continue reading How to replace an existing static IP address with PowerShell

How to switch between static IP address and DHCP with PowerShell

How to switch between static IP address and DHCP with PowerShell

Starting with Windows Server 2012, you can now handle directly the IP configuration with PowerShell cmdlets. However, despite the way to go from a DHCP IP address to a static IP address is not easy to find, if you know it, it is pretty easy to understand. Please be aware that you will disconnect yourself … Continue reading How to switch between static IP address and DHCP with PowerShell

[Solved] PowerShell run as Administrator doesn’t find the program

[Solved] PowerShell run as Administrator doesn’t find the program

Sometimes on a Windows 2012 R2 server, you can get this error message This file does not have a program associated with it for performing this action. Please install a program or, if one is already installed, create an association in the Default Programs control panel. The solution Click on the shortcut without the Run … Continue reading [Solved] PowerShell run as Administrator doesn’t find the program