Personal computing discussed

Moderators: renee, Dposcorp

 
End User
Minister of Gerbil Affairs
Topic Author
Posts: 2977
Joined: Fri Apr 16, 2004 6:47 pm
Location: Upper Canada

Microsoft Powershell - customers didn't like that it was Windows-only - now cross platform

Thu Aug 18, 2016 11:51 am

"Microsoft today released its PowerShell scripting language and command-line shell as open source. The project joins .NET and the Chakra JavaScript engine as an MIT-licensed open source project hosted on GitHub.

Alpha version prebuilt packages of the open source version are available for CentOS, Ubuntu, and OS X, in addition, of course, to Windows. Additional platforms are promised in the future."

http://arstechnica.com/information-tech ... inux-os-x/
 
Redocbew
Minister of Gerbil Affairs
Posts: 2495
Joined: Sat Mar 15, 2014 11:44 am

Re: Microsoft Powershell - customers didn't like that it was Windows-only - now cross platform

Thu Aug 18, 2016 12:20 pm

Well, that makes life easier for sysadmins(I guess?), but I can't see any reason why you'd need powershell if you've already got something bash-like.
Do not meddle in the affairs of archers, for they are subtle and you won't hear them coming.
 
just brew it!
Administrator
Posts: 54500
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: Microsoft Powershell - customers didn't like that it was Windows-only - now cross platform

Thu Aug 18, 2016 12:21 pm

Redocbew wrote:
Well, that makes life easier for sysadmins(I guess?), but I can't see any reason why you'd need powershell if you've already got something bash-like.

Easier porting of existing scripts from Windows to *NIX.
Nostalgia isn't what it used to be.
 
TheRazorsEdge
Gerbil Team Leader
Posts: 219
Joined: Tue Apr 03, 2007 1:10 pm

Re: Microsoft Powershell - customers didn't like that it was Windows-only - now cross platform

Thu Aug 18, 2016 12:26 pm

My employer has a predominantly Windows shop, but there are some Linux hosts. This may make it easier to write management scripts, assuming the cmdlets translate well on the Linux systems

Since Microsoft is supposed to offer a Linux subsystem with bash on Windows, this looks like a straight up interoperability improvement. If you are Linux-dominated you can bash on Windows, and if you are Windows-dominated now you can use PowerShell on Linux.

This represents a bit of a different attitude from Microsoft, but it's good news if their intentions are genuine.
 
derFunkenstein
Gerbil God
Posts: 25427
Joined: Fri Feb 21, 2003 9:13 pm
Location: Comin' to you directly from the Mothership

Re: Microsoft Powershell - customers didn't like that it was Windows-only - now cross platform

Thu Aug 18, 2016 12:46 pm

I don't use PowerShell for nearly everything I can, but I really like it. I feel like it's an easier tool than awk and sed for manipulating text files (I hate regexes), particularly CSV and tab-delimited files. It seems like I've done a lot of automating PowerShell scripts for that purpose this summer. It's probably the "wrong" tool for the job, but I understand the features and can whip up something serviceable in a half hour that converts from one layout to another, renames the headers, rearrange columns, whatever else. 

$reader = [System.IO.File]::OpenText('C:\exports\data.txt')
$writer = New-Object System.IO.StreamWriter 'C:\exports\dataformatted.csv'
$writer.WriteLine('ReferenceCode,Institution,FirstName,LastName,Gender,EmailAddress,PrimaryPhone,AdditionalPhone,Mobilephone,SMSPhone')
for(;;) {
    $line = $reader.ReadLine()
    if ($null -eq $line) {
        break
    }
    $data = $line.Split(",")
    if ($data[17] -eq "Y"){
    $data[6] = ""
    $data[7] = ""
    }
    $data[1] = $data[1].replace("something","otherthing")
    if ($data[2] -ne "Administrator") {
        $writer.WriteLine('{0},{1},{2},{3},{4},{5},{6},{7},{8},{9}', 
             $data[0], $data[1], $data[2], $data[3],  $data[4],  $data[5], 
             $data[6], $data[7], $data[8], $data[8])
        }
}
$reader.Close()
$writer.Close()


Being able to do this on a Mac or Linux system would make it easier for those guys, too. Huzzah. 
I do not understand what I do. For what I want to do I do not do, but what I hate I do.
Twittering away the day at @TVsBen
 
Redocbew
Minister of Gerbil Affairs
Posts: 2495
Joined: Sat Mar 15, 2014 11:44 am

Re: Microsoft Powershell - customers didn't like that it was Windows-only - now cross platform

Thu Aug 18, 2016 12:53 pm

derFunkenstein wrote:
I hate regexes

I don't mind them so much, but I don't think anyone really likes regexes.  I tend to keep the ones I use small and simple, or look them up on stack overflow first.   :P
Do not meddle in the affairs of archers, for they are subtle and you won't hear them coming.
 
DancinJack
Maximum Gerbil
Posts: 4494
Joined: Sat Nov 25, 2006 3:21 pm
Location: Kansas

Re: Microsoft Powershell - customers didn't like that it was Windows-only - now cross platform

Thu Aug 18, 2016 1:09 pm

Redocbew wrote:
I don't mind them so much, but I don't think anyone really likes regexes.  I tend to keep the ones I use small and simple, or look them up on stack overflow first.   :P


P sure we all feel this way, and use SO :)
i7 6700K - Z170 - 16GiB DDR4 - GTX 1080 - 512GB SSD - 256GB SSD - 500GB SSD - 3TB HDD- 27" IPS G-sync - Win10 Pro x64 - Ubuntu/Mint x64 :: 2015 13" rMBP Sierra :: Canon EOS 80D/Sony RX100
 
derFunkenstein
Gerbil God
Posts: 25427
Joined: Fri Feb 21, 2003 9:13 pm
Location: Comin' to you directly from the Mothership

Re: Microsoft Powershell - customers didn't like that it was Windows-only - now cross platform

Thu Aug 18, 2016 1:33 pm

Googling feels so futile sometimes, because (for example) I need a regex to count over X number of \t and then check a value, and then count over a different X number of \t and make changes based on that. Just forget it, I'd rather deal with it like this. :lol:
I do not understand what I do. For what I want to do I do not do, but what I hate I do.
Twittering away the day at @TVsBen
 
jihadjoe
Gerbil Elite
Posts: 835
Joined: Mon Dec 06, 2010 11:34 am

Re: Microsoft Powershell - customers didn't like that it was Windows-only - now cross platform

Thu Aug 18, 2016 1:34 pm

Powershell for 'nix sounds like a great partner to BASH for Windows
 
PenGun
Gerbil Elite
Posts: 893
Joined: Fri Jun 18, 2004 1:48 pm
Location: BC Canada
Contact:

Re: Microsoft Powershell - customers didn't like that it was Windows-only - now cross platform

Thu Aug 18, 2016 1:38 pm

 I was surprised to find, according to wiki, that less 2% of the top million servers run windows. Since M$ wants windows SQL to run on Linux, which make perfect sense for their cloud crap, this is just another tool for that effort.
Fuji X-E1 Leica Elmar 135 4 XF60mm 2.4 Macro | Zeiss FE 35mm 2.8
http://carnagepro.com
"Everything ... they eat everything, and fear is their bacon bits."
 
Redocbew
Minister of Gerbil Affairs
Posts: 2495
Joined: Sat Mar 15, 2014 11:44 am

Re: Microsoft Powershell - customers didn't like that it was Windows-only - now cross platform

Thu Aug 18, 2016 1:44 pm

derFunkenstein wrote:
Googling feels so futile sometimes, because (for example) I need a regex to count over X number of \t and then check a value, and then count over a different X number of \t and make changes based on that. Just forget it, I'd rather deal with it like this. :lol:

Yeah I wouldn't use a regex for that either.  In fact I can't remember the last time I used one for any kind of search and replace although if I did more shell scripting I might.  It's a little bit different when you've got a full library of string functions at your disposal anyway.
Do not meddle in the affairs of archers, for they are subtle and you won't hear them coming.
 
DancinJack
Maximum Gerbil
Posts: 4494
Joined: Sat Nov 25, 2006 3:21 pm
Location: Kansas

Re: Microsoft Powershell - customers didn't like that it was Windows-only - now cross platform

Thu Aug 18, 2016 1:52 pm

PenGun wrote:
 I was surprised to find, according to wiki, that less 2% of the top million servers run windows. Since M$ wants windows SQL to run on Linux, which make perfect sense for their cloud crap, this is just another tool for that effort.


Surprised? You must not be in software.

Also, you must mean MSSQL on Linux? I hadn't heard that, or why anyone would use it over MySQL (for linux based implementations)
i7 6700K - Z170 - 16GiB DDR4 - GTX 1080 - 512GB SSD - 256GB SSD - 500GB SSD - 3TB HDD- 27" IPS G-sync - Win10 Pro x64 - Ubuntu/Mint x64 :: 2015 13" rMBP Sierra :: Canon EOS 80D/Sony RX100
 
PenGun
Gerbil Elite
Posts: 893
Joined: Fri Jun 18, 2004 1:48 pm
Location: BC Canada
Contact:

Re: Microsoft Powershell - customers didn't like that it was Windows-only - now cross platform

Thu Aug 18, 2016 2:05 pm

DancinJack wrote:
PenGun wrote:
 I was surprised to find, according to wiki, that less 2% of the top million servers run windows. Since M$ wants windows SQL to run on Linux, which make perfect sense for their cloud crap, this is just another tool for that effort.


Surprised?  You must not be in software.  

Also, you must mean MSSQL on Linux?  I hadn't heard that, or why anyone would use it over MySQL (for linux based implementations)

 I'm not sure MySQL is a good idea anymore. I'd go PostgreSQL myself these days although I'd have to learn stuff as MySQL is what I used for years.
http://blogs.microsoft.com/blog/2016/03 ... 1igji66j2f
 They need this to run cloud stuff across a wide range of servers. 
Fuji X-E1 Leica Elmar 135 4 XF60mm 2.4 Macro | Zeiss FE 35mm 2.8
http://carnagepro.com
"Everything ... they eat everything, and fear is their bacon bits."
 
just brew it!
Administrator
Posts: 54500
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: Microsoft Powershell - customers didn't like that it was Windows-only - now cross platform

Thu Aug 18, 2016 2:07 pm

PenGun wrote:
 I was surprised to find, according to wiki, that less 2% of the top million servers run windows. Since M$ wants windows SQL to run on Linux, which make perfect sense for their cloud crap, this is just another tool for that effort.

MS lost the battle for the web years ago.

DancinJack wrote:
Also, you must mean MSSQL on Linux? I hadn't heard that, or why anyone would use it over MySQL (for linux based implementations)

http://blogs.microsoft.com/blog/2016/03 ... 1hibhpht7a

MS SQL Server is a decent product; at the end of the day, it is probably a better RDBMS than MySQL/MariaDB. But PostgreSQL is likely a better choice than either one.
Nostalgia isn't what it used to be.
 
DancinJack
Maximum Gerbil
Posts: 4494
Joined: Sat Nov 25, 2006 3:21 pm
Location: Kansas

Re: Microsoft Powershell - customers didn't like that it was Windows-only - now cross platform

Thu Aug 18, 2016 2:13 pm

Yeah, I wasn't saying MSSQL Server was/is a bad product, just that for a Linux implementation I probably wouldn't use it.
i7 6700K - Z170 - 16GiB DDR4 - GTX 1080 - 512GB SSD - 256GB SSD - 500GB SSD - 3TB HDD- 27" IPS G-sync - Win10 Pro x64 - Ubuntu/Mint x64 :: 2015 13" rMBP Sierra :: Canon EOS 80D/Sony RX100
 
PenGun
Gerbil Elite
Posts: 893
Joined: Fri Jun 18, 2004 1:48 pm
Location: BC Canada
Contact:

Re: Microsoft Powershell - customers didn't like that it was Windows-only - now cross platform

Thu Aug 18, 2016 2:17 pm

just brew it! wrote:
PenGun wrote:
 I was surprised to find, according to wiki, that less 2% of the top million servers run windows. Since M$ wants windows SQL to run on Linux, which make perfect sense for their cloud crap, this is just another tool for that effort.

MS lost the battle for the web years ago.

 I know that, I was surprised by the numbers that's all. It was around 17% last time I looked, many years ago.
Fuji X-E1 Leica Elmar 135 4 XF60mm 2.4 Macro | Zeiss FE 35mm 2.8
http://carnagepro.com
"Everything ... they eat everything, and fear is their bacon bits."
 
derFunkenstein
Gerbil God
Posts: 25427
Joined: Fri Feb 21, 2003 9:13 pm
Location: Comin' to you directly from the Mothership

Re: Microsoft Powershell - customers didn't like that it was Windows-only - now cross platform

Thu Aug 18, 2016 3:17 pm

Heh, it's easy to forget those market share thing sometimes. The company I work for (around 4,000 employees and $800M in sales for FY15, which matches CY15) is a 100% Microsoft shop. The older web apps use ASP.NET and the newer single-page apps are Microsoft MVC/AngularJS. I know that's not the case everywhere, but from my Windows-centric world the rest of the internet seems kind of strange.
I do not understand what I do. For what I want to do I do not do, but what I hate I do.
Twittering away the day at @TVsBen
 
Redocbew
Minister of Gerbil Affairs
Posts: 2495
Joined: Sat Mar 15, 2014 11:44 am

Re: Microsoft Powershell - customers didn't like that it was Windows-only - now cross platform

Thu Aug 18, 2016 3:26 pm

Don't worry, it works both ways.  Being raised on Linux, you Windows people seem strange also.   :P

Probably doesn't help that I learned .net in a completely dysfunctional environment with constant fire drills going on, but for powershell specifically I like it also even though I don't use it much.
Do not meddle in the affairs of archers, for they are subtle and you won't hear them coming.
 
just brew it!
Administrator
Posts: 54500
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: Microsoft Powershell - customers didn't like that it was Windows-only - now cross platform

Thu Aug 18, 2016 3:29 pm

I imagine their share of intranet and vertical market deployments is higher. If you're already running a Windows-centric IT organization you'd rather not need to hire and train additional staff to handle another platform.
Nostalgia isn't what it used to be.
 
the
Gerbil Elite
Posts: 941
Joined: Tue Jun 29, 2010 2:26 am

Re: Microsoft Powershell - customers didn't like that it was Windows-only - now cross platform

Fri Aug 19, 2016 9:59 am

DancinJack wrote:
PenGun wrote:
 I was surprised to find, according to wiki, that less 2% of the top million servers run windows. Since M$ wants windows SQL to run on Linux, which make perfect sense for their cloud crap, this is just another tool for that effort.


Surprised? You must not be in software.

Also, you must mean MSSQL on Linux? I hadn't heard that, or why anyone would use it over MySQL (for linux based implementations)


Databases can be difficult to migrate from one vendor to another. This allows MS to keep users locked into MSSQL even if they're migrating away from Windows. This porting of PowerShell to Linux is likely related to their Linux MSSQL efforts.

Having worked in a remote hosting environment, I can state few things why someone would choose to utilize MSSQL over MySQL. In my experience, a MySQL cluster is rather fragile and relatively easy for it to fall into a split brain scenario (basically one node thinks the other fails so it will become active, resulting in two active nodes that are not sychronized). I haven't seen such a botched MSSQL fail over. Considering that MSSQL ties into some Windows services for fail over, I'm really curious how they implement this feature in Linux and if you could fail over from a Windows hosted node to a Linux hosted node.

I wouldn't recommend MSSQL though. My worst DB issue I've ever encountered required a conference where MS work up one of the senior MSSQL programmers at 3 AM in the morning. On that same call, the MS DBA wanted us to delete some encryption keys that could have rendered all the client data unusable. I was handsomely rewarded the next day for not blindly following instructions to ensure the preservation of that data.
Dual Opteron 6376, 96 GB DDR3, Asus KGPE-D16, GTX 970
Mac Pro Dual Xeon E5645, 48 GB DDR3, GTX 770
Core i7 [email protected] Ghz, 32 GB DDR3, GA-X79-UP5-Wifi
Core i7 [email protected] Ghz, 16 GB DDR3, GTX 970, GA-X68XP-UD4

Who is online

Users browsing this forum: No registered users and 1 guest
GZIP: On