I have 2 Powershell applications sitting on the desk of a server I have inherited.
What is the difference between "Windows Powershell" and "Microsoft Azure Powershell"?
Windows PowerShell is a new command shell and scripting language for Windows. You can think of it as a really complicated version of the command prompt designed for repeatable tasks.
Windows Azure PowerShell is used extensively in the Microsoft HDInsight articles because it makes it easier to use Hadoop remotely from your workstation.
Microsoft Azure Powershell is specifically targeted for Cloud (MS Azure operations)
As far as Azure Powershell Modules are installed, you can interact with the Cloud (MS Azure Operations) from the Windows Powershell Application.
A set of Azure PowerShell cmdlets allow you to manage Azure resources from PowerShell. With Azure PowerShell, you can learn and start automating quickly, and it offers powerful features.
Related
I'm currently trying to remote to multiple servers that are on PowerShell 4.0 whereas the local computer currently runs on 5.0+. I am attempting to query servers that are Server 2016 for the Local Administrator group, but will fail for servers that are on 2012. Which upon researching the error messages for cmdlets from Microsoft.Powershell.LocalAccounts indicates that the modules don't exist for 2012.
Rather than updating the PowerShell version, or installing the modules to each server, I wondering if it's possible to execute cmdlets from the local 2016 into remote sessions of the 2012 servers.
Technically, yes, you could copy modules from the local server to one of the module directories on the remote server's $env:PSModulePath and import them in the remote session, but as #mklement0 stated there is no guarantee current modules will work with PowerShell 4.0, let alone Server 2012.
That said, Microsoft.PowerShell.LocalAccounts is a module provided by PowerShell 5.1, not the OS, and the features should still work on 2012. However, I don't have a 2012 instance I can test with. But you may be able to get your task done by upgrading your servers' PowerShell version to PowerShell 5.1 (Windows Management Framework 5.1) to leverage the additional features and built-in modules this version brings. But any modules that are shipped with later Windows versions and not PowerShell itself will remain unavailable.
$localAdminUsers = net localgroup administrators
After some talking with a colleague, I realized I had overcomplicated my script, when I could have used the command prompt. From there, I parse the string for the users I was looking for.
Thank you for your responses.
I am using ansible hosted on linux to manage both Linux and windows VMs hosted on azure, and use azure xplat-cli commandline to create VMs. When i create windows server 2008, I need to trigger few startup scripts so that those are preconfigured while windows server is up. I was able to install CustomScript extension using below command
azure vm extension set
I have uploaded my scripts to azure blob storage account, and i need to trigger scripts using the extension, and i don't find any proper documentation (documentation was only for powershell). Can you please help
I have been searching for a way to create new web farms add add servers to it with PowerShell.
I stumbled on this link http://www.iis.net/learn/web-hosting/microsoft-web-farm-framework-20-for-iis-7/web-farm-framework-20-for-iis-cmdlets-for-windows-powershell which says that you should add a snapin called WebFarmSnapin.
But this does not seem to work at all in powershell v3.0 because it only says:
Add-PSSnapin : No snap-ins have been registered for Windows PowerShell version 3.
Does anyone know how to manage web farms in PowerShell v3.0?
At last I found a way to do this!
http://brentdacodemonkey.wordpress.com/2014/02/12/automating-arr-configuration/
You can generate a script from the Configuration Editor in IIS Manager. But the funny thing is that on my Windows 7 machine I could not generate PowerShell scripts. I had to do it directly on the 2012 server.
I'm running Windows Server 2012 R2 in an Azure VM in which I have an older version of Azure Powershell (ISE) - when I run . I searched for instructions on how to update Azure Powershell (ISE) but all I'm finding is on how to install from scratch per http://azure.microsoft.com/en-us/documentation/articles/install-configure-powershell/
Is there a way to upgrade without having to re-import the Azure subscription publish-settings file etc ?
By the way, an easy way to find out what version I'm on would be great. Doing get-module azure or get-module does not give me version info per http://cropme.ru/fc7037d19a74cd0db256c52142d9b98a
After you upgrade the Azure PowerShell module, you can just run Add-AzureAccount to update your subscription settings.
We have a PowerShell script that utilises the TFS PowerShell snapin (Microsoft.TeamFoundation.PowerShell).
When installing the TFS 2013 Power Tools on my development workstation, the "PowerShell Cmdlets" feature is missing from the list of available features in the Custom Setup.
Please see - http://i.imgur.com/cLxUVx5.png
A colleague of mine has the PowerShell Cmdlets in his Custom Setup feature list.
Please see - http://i.imgur.com/REBuVms.png
I didn't have this problem with the TFS 2012 Power Tools. Why is the "PowerShell Cmdlets" feature hidden in my Custom Setup list?
You need to install power shell 3.0 first.