How to install Selenium PowerShell eXtensions? - powershell

I'm trying to make a PowerShell script( here is the question about it )
somebody answer me, that I need to install Selenium PowerShell eXtensions
but I doesn't find the manual - "how to install a Selenium PowerShell eXtensions", Somebody please help!

There isn't an install guide specifically for Selenium as it's just a standard powershell module and they are all imported with the same command.
Download the zip from codeplex, extract it and then import the module (substituting the path for yours):
If you call the folder SePSX you can use this:
Import-Module "C:\folder\SePSX"
Any other name use this:
Import-Module "C:\folder\Selenium\SePSX.dll

Related

how to uninstall a powershell module when it can't find it by name even if it lists the searched name as an installed module?

I'm trying to uninstall a module from powershell but I can't.
Powershell says it can't find that module by name but when I list all installed modules, it is right there. What I'm doing wrong?
Try Remove-Module -Name oh-my-posh

How to create and install a powershell command package using chocolatey?

I have a few powershell commands in a script that I want to distribute to everyone on my team. This script may be updated and I would want an easy way for my team to update this script as well. Someone suggested Chocolatey which I have never used before. I found the following in the Chocolatey.org FAQ:
"What kind of package types does Chocolatey support?
Binary Packages – Installable/portable applications – This is 98% of the Chocolatey packages – most are pointers to the real deal native installers and/or zipped software.
PowerShell Command Packages – Packages that have the suffix .powershell will install PowerShell scripts as commands for you to call from anywhere.
Development Packages – Packages that have the suffix .dev. For instance dropkick.dev.
Coming soon – Virtual Packages – Packages that are like a category, and you just want one package from that category. Read more ..."
Does anyone have an example of using chocolatey to install a powershell script to the Path so that the commands in it can be executed from anyway on the machine? I am unable to find an example of how to do this online.
If this is an inappropriate use of chocolatey, please let me know and feel free to recommend an alternate solution.
Thank you very much for your time. Please let me know if I am being unclear or if you have any questions for me?
Look at the PowerShell Function Reference, which has all of the different functions you can call. Then take a look, specifically, at the Install-ChocolateyPowershellCommand helper. Here's an example of a package that installs a powershell script as a command (source).

How to install Azure cmdlets using powershell

I'm trying to install Azure cmdlets using powershell, not the wizard provided by Microsoft.
That's because my script (which has Azure cmdlets) will be used in a new virtual machine located in Azure and if my script try to run some cmdlet of Azure, will fail for sure.
I would like to put the installation lines of the powershell cmdlets on the top of my script for install the whole cmdlets and after that, that my script execute the other cmdlets without problem.
So, anyone knows?
Thanks!
If you have the Web Platform Installer in the VM, you can use the script I posted at PowerShell Magazine.
http://www.powershellmagazine.com/2014/02/27/using-powershell-and-web-platform-installer-to-install-azure-powershell-cmdlets/
Or get the Windows Standalone installer from https://github.com/Azure/azure-sdk-tools/releases and use msiexec to install that.
If you want to use PowerShell to download the latest version too:
You can use Invoke-WebRequest to read the page (https://github.com/Azure/azure-sdk-tools/releases) and then get all links from that. You can then get all links that end with .msi and take the first link for download.
#Code not tested
$doc = Invoke-WebRequest 'https://github.com/Azure/azure-sdk-tools/releases'
$links = $doc.Links.Href

WebAdministration module not found

I have installed a WebServer 2008 R2 Core version and I'm trying to configure it to be remotely managed from another server in the domain I need to import the WebAdministration module According to the steps exposed in this article
http://www.iis.net/learn/install/installing-iis-7/install-and-configure-iis-on-server-core
using the Import-module WebAdministration it gives me the specified module 'WebAdministration' was not loaded because no valid module file was found in any module directoryAt line1 char 14. I executed the command Get-Module -ListAvailable and returned 4 module types
BestPractices, BitsTrabsfer, PSDiagnostics and ServeManager
I read the other threads about the issue none of them is consistent and proposes a good solution to that. BTW is there a way to let the server download the requested modules form microsoft repository if not found. Any consistent proposal to solve this will be appreciated
Is the IIS PowerShell Snap-In installed? If not, you can download the 32-Bit version or the 64-Bit version. After you run the MSI (using msiexec /i, since this is core), the snap-in should be registered and can be invoked via import-module or
& "$env:programfiles\IIS\PowerShellSnapin\iisConsole.psc1"
On Windows 7 I installed Web Platform Installer from
https://www.microsoft.com/web/downloads/
On the start menu search for "web" to make the app visible.
Then using Web Platform Installer ... Install IIS: Management Scripts and Tools
Make sure that the IIS is installed and configured properly

Setting up PSake

Does anybody know or have a link to how I set up psake to run through powershell?
I have absolutely no idea and I can find nothing to tell me.
Download it from here. Here are some examples of its use:
http://ayende.com/Blog/archive/2009/08/30/on-psake.aspx
http://www.jameskovacs.com/blog/IntroducingPsake.aspx
The 2.0 version of PSake is a PowerShell module which requires PowerShell 2.0. Extract the contents of the PSake ZIP into $env:Home\Documents\WindowsPowerShell\Modules\PSake. Then you import it like so:
Import-Module PSake
Define a "properties" hashtable and then start using its exported commands like Task in your build scripts.