Showing posts with label commands. Show all posts
Showing posts with label commands. Show all posts

Wednesday, 26 April 2017

Install Bash Shell on Windows to Execute Linux Commands from Windows

Install Bash Shell on Windows to Execute Linux Commands from Windows


  • To install Bash,your PC should be running a 64-bit version of Windows 10 Anniversary Update build 14393 or later
  • Now Open Settings -> Update and Security -> For developers
  • Select the Developer Mode radio button

  • Then from Start, search for "Turn Windows features on or off" (type 'turn')
  • Select Windows Subsystem for Linux (beta)

  • Click OK
  • Now Open a PowerShell prompt as administrator and run:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux


  • Restart your computer when prompted

Saturday, 25 June 2016

Powershell Basics for Dummies - Set-ExecutionPolicy

Powershell Basics for Dummies - Set-ExecutionPolicy

Set-ExecutionPolicy

  • By Default Microsoft has disabled scripting  in an effort to prevent malicious code from executing in a PowerShell environment. 
  • You should use Set-ExecutionPolicy command to control the level of security surrounding PowerShell scripts. 

Four levels of security exist:

  • 1. Restricted — Restricted is the default execution policy and locks PowerShell down, so that commands can be entered only interactively. PowerShell scripts are not allowed to run.
  • 2. All Signed — If the execution policy is set to All Signed then scripts will be allowed to run, but only if they are signed by a trusted publisher like Microsft etc.
  • 3.Remote Signed — If the execution policy is set to Remote Signed, any PowerShell scripts that have been locally created will be allowed to run. Scripts created remotely are allowed to run only if they are signed by a trusted publisher like Microsoft.
  • 4. Unrestricted — Unrestricted removes all restrictions from the execution policy.

You can set an execution policy by entering the Set-ExecutionPolicy command followed by the name of the policy. For example, if you wanted to allow scripts to run in an All Signed manner you could type:

Set-ExecutionPolicy All Signed

Wednesday, 6 April 2016

How to get list of All commands for SCOM 2012 R2 Module in Powershell

How to get list of All commands for SCOM 2012 R2 Module in Powershell


  • Today i am going to Show you how get list of all commands available in SCOM module.
  • First Open the Powershell and Import the SCOM module
                    Import-Module OperationsManager
  • This will load the SCOM module in Powershell
  • Then to see all the commands in the OperationsManager Modulle type the below command
                   get-command - module OperationsManager | more
  • This will list all the commands in SCOM.