4

I have been assigned a project to be done in Windows PowerShell. I am familiar with shell scripting but it's a new technology. I was told that its similar to shell except few syntax changes.

I have one week time to learn and understand the basics.

I tried looking for an emulator but couldn't find one. I don't have a dual system on my laptop. Help me out here.

Do I need to install Windows on my laptop so that I could practice those commands at home or there is a solution available in Ubuntu without making changes to my operating system.

Eliah Kagan
  • 116,445
  • 54
  • 318
  • 493
Uchiha Itachi
  • 79
  • 1
  • 1
  • 5
  • Have a look at http://pash.sourceforge.net. To actually work on a complete implementation, I think you will have to install Windows. – muru Aug 03 '14 at 12:53
  • 1
    If your computer came with windows and you still have the COA (the sticker with the reg code) you can just install virtualbox and windows inside of that. – Scott Goodgame Aug 03 '14 at 13:17
  • 2
    You can also download a windows .iso, install in virtualbox and just skip activation for to have 30 days of use. http://www.askvg.com/direct-download-links-download-official-original-and-untouched-windows-7-iso-32-bit-and-64-bit/ – Scott Goodgame Aug 03 '14 at 13:25
  • i had a preinstalled Windows on my laptop..but i deleted the partion before installing Ubuntu..so thats not an alternative i guess :-( – Uchiha Itachi Aug 03 '14 at 14:26

3 Answers3

7

Posting this here is likely to get a thousand beardies running at you with "BASH IS BETTER THAN POWARSHELL!" If I could grow a beard, I would probably be one of them.

But if you have an assignment that involves Windows Powershell, there's little choice. There are some shells (and even modifiers existing shells like zsh) that aim to pull in some of the PowerShell features but even if they're syntactially identical, the underlying data you're using just won't be the same.

In short: if you need to use Windows, use Windows. And you do.

That said, that doesn't mean you have to reinstall Windows properly. It could temporarily languish in a virtual machine (see VirtualBox). Easy to install, easier to remove, can't touch your existing setup. It'll be a bit slower than a native install but given you're just playing around with a command line, that doesn't seem like an issue at all.

Oli
  • 289,791
  • 117
  • 680
  • 835
  • thanks,i guess that's the only way left without altering my files.Moreover i myself will never switch to power-shell but i don't have a say here ,so need to work accordingly else i m fired,jobless again :-) – Uchiha Itachi Aug 03 '14 at 13:02
5

PowerShell is available on Linux.

https://github.com/PowerShell/PowerShell

There's even a beginners guide:

https://github.com/PowerShell/PowerShell/blob/master/docs/learning-powershell/powershell-beginners-guide.md

Haromn
  • 51
  • 1
  • 3
4

for those who still needs it - MS made a move: https://azure.microsoft.com/en-us/blog/powershell-is-open-sourced-and-is-available-on-linux/

PowerShell on Linux, SSH to Windows box, the Dream...

Ivan Temchenko
  • 674
  • 5
  • 10
  • Note that it's still in alpha. GitHub page [here](https://github.com/PowerShell/PowerShell/blob/master/docs/installation/linux.md) – wjandrea Aug 18 '16 at 20:04
  • Hahaha.. you posted that here QUICK! For all MSFT koolaid drinkers.. this is awesome news! – sam yi Aug 19 '16 at 16:18