Options

[Sysadmin] Go to the new thread now, dog.

1525355575899

Posts

  • Options
    bowenbowen How you doin'? Registered User regular
    wunderbar wrote: »
    bowen wrote: »
    Aioua wrote: »
    bowen wrote: »
    powershell was an okay concept

    but integrating objects and .net into it was bizarre as fuck

    just like

    make managing windows suck less, not a hard concept

    can you add users from the command line?
    can you make groups?
    add DNS?
    edit text files

    that's like the barest minimum you need to shoot for and it still sucks in powershell

    yes
    yes
    yes (probably? I've never messed with that tbh)
    there's a version of nano for windows

    is it as simple as "add user"

    New-ADUser

    like that's literally all you type and boom you're done? Or do you need to add the containers and all that? Because I know for sure it's much more than just that.

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    AiouaAioua Ora Occidens Ora OptimaRegistered User regular
    wunderbar wrote: »
    bowen wrote: »
    Aioua wrote: »
    bowen wrote: »
    powershell was an okay concept

    but integrating objects and .net into it was bizarre as fuck

    just like

    make managing windows suck less, not a hard concept

    can you add users from the command line?
    can you make groups?
    add DNS?
    edit text files

    that's like the barest minimum you need to shoot for and it still sucks in powershell

    yes
    yes
    yes (probably? I've never messed with that tbh)
    there's a version of nano for windows

    is it as simple as "add user"

    New-ADUser

    or you could still use net user if you wanted for local shit

    it's not like powershell means all the old commands were deleted

    life's a game that you're bound to lose / like using a hammer to pound in screws
    fuck up once and you break your thumb / if you're happy at all then you're god damn dumb
    that's right we're on a fucked up cruise / God is dead but at least we have booze
    bad things happen, no one knows why / the sun burns out and everyone dies
  • Options
    FeralFeral MEMETICHARIZARD interior crocodile alligator ⇔ ǝɹʇɐǝɥʇ ǝᴉʌoɯ ʇǝloɹʌǝɥɔ ɐ ǝʌᴉɹp ᴉRegistered User regular
    Oh hey sysadmin thread. Why don't I ever post in this thread? I should post in this thread more.

    Hello, thread!

    every person who doesn't like an acquired taste always seems to think everyone who likes it is faking it. it should be an official fallacy.

    the "no true scotch man" fallacy.
  • Options
    SeidkonaSeidkona Had an upgrade Registered User regular
    edited March 2017
    Aioua wrote: »
    Entaru wrote: »
    I like "enter command:recieve text".

    Ultimately I am asking the shell for information. I then can decide what to do with that info and there are a lot of ways for me to use it.

    With Powershell you are constrained to the objects they decided for you. It bothers me.

    as opposed to the text it decides for you?

    it's the same arbitrary information just packaged in a way that makes it easier to use

    No, they're objects and I have to work with whatever arbitrary things MS wrote into Powershell or extend it myself.

    I don't have to do that with Bash. I just pipe it to however I want to work with it.

    Seidkona on
    Mostly just huntin' monsters.
    XBL:Phenyhelm - 3DS:Phenyhelm
  • Options
    bowenbowen How you doin'? Registered User regular
    You should Feral, be an old codgy system admin like me.

    You were the one who started the original one.

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    bowenbowen How you doin'? Registered User regular
    guys remember when everyone told me Windows 8 is the future and I should suck it up and just learn to deal with it

    that's how I feel with powershell right now, trying too hard to bridge programming and scripting languages

    just commit and learn to program already!

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    jungleroomxjungleroomx It's never too many graves, it's always not enough shovels Registered User regular
    bowen wrote: »
    guys remember when everyone told me Windows 8 is the future and I should suck it up and just learn to deal with it

    that's how I feel with powershell right now, trying too hard to bridge programming and scripting languages

    just commit and learn to program already!

    Windows 8 is dead p much.

    Windows 10 is the future, son.

  • Options
    AiouaAioua Ora Occidens Ora OptimaRegistered User regular
    Entaru wrote: »
    Aioua wrote: »
    Entaru wrote: »
    I like "enter command:recieve text".

    Ultimately I am asking the shell for information. I then can decide what to do with that info and there are a lot of ways for me to use it.

    With Powershell you are constrained to the objects they decided for you. It bothers me.

    as opposed to the text it decides for you?

    it's the same arbitrary information just packaged in a way that makes it easier to use

    No, they're objects and I have to work with whatever arbitrary things MS wrote into Powershell or extend it myself.

    I don't have to do that with Bash. I just pipe it to however I want to work with it.

    pipe it through Out-String then

    there now you have arbitrary text data that you can play with however you want

    life's a game that you're bound to lose / like using a hammer to pound in screws
    fuck up once and you break your thumb / if you're happy at all then you're god damn dumb
    that's right we're on a fucked up cruise / God is dead but at least we have booze
    bad things happen, no one knows why / the sun burns out and everyone dies
  • Options
    bowenbowen How you doin'? Registered User regular
    bowen wrote: »
    guys remember when everyone told me Windows 8 is the future and I should suck it up and just learn to deal with it

    that's how I feel with powershell right now, trying too hard to bridge programming and scripting languages

    just commit and learn to program already!

    Windows 8 is dead p much.

    Windows 10 is the future, son.

    Yeah but the paradigms it created with the metro interface and "FULL SCREEN APPS ARE THE FUTURE!"

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    SeidkonaSeidkona Had an upgrade Registered User regular
    Aioua wrote: »
    Entaru wrote: »
    Aioua wrote: »
    Entaru wrote: »
    I like "enter command:recieve text".

    Ultimately I am asking the shell for information. I then can decide what to do with that info and there are a lot of ways for me to use it.

    With Powershell you are constrained to the objects they decided for you. It bothers me.

    as opposed to the text it decides for you?

    it's the same arbitrary information just packaged in a way that makes it easier to use

    No, they're objects and I have to work with whatever arbitrary things MS wrote into Powershell or extend it myself.

    I don't have to do that with Bash. I just pipe it to however I want to work with it.

    pipe it through Out-String then

    there now you have arbitrary text data that you can play with however you want

    so I have to take an extra step to get what should be the base functionality?

    Mostly just huntin' monsters.
    XBL:Phenyhelm - 3DS:Phenyhelm
  • Options
    FeralFeral MEMETICHARIZARD interior crocodile alligator ⇔ ǝɹʇɐǝɥʇ ǝᴉʌoɯ ʇǝloɹʌǝɥɔ ɐ ǝʌᴉɹp ᴉRegistered User regular
    Powershell's object-oriented-ness* is one of the best things about it.

    You can get a list of Active Directory users with AD-User...
    ...filter it based on a criterion (say, last login date older than 90 days ago)...
    ...pass the results to another command, say Get-Mailbox to get the primary SMTP address...
    ...use Send-MailMessage to send the user a quick email if they have an SMTP address...
    ...and then export the results to CSV for further processing.

    And do the whole thing on one line!

    You can pack all of that into a single Task Scheduler task without having to save a stupid batch file somewhere.

    Yeah, the learning curve is high and there are a lot of places where things are named weirdly or syntax is a little odd, but once you get used to piping Powershell objects to other commands it is just fantastic.

    * I don't know if it's truly object-oriented, so that might be a misnomer.

    every person who doesn't like an acquired taste always seems to think everyone who likes it is faking it. it should be an official fallacy.

    the "no true scotch man" fallacy.
  • Options
    AiouaAioua Ora Occidens Ora OptimaRegistered User regular
    bowen wrote: »
    guys remember when everyone told me Windows 8 is the future and I should suck it up and just learn to deal with it

    that's how I feel with powershell right now, trying too hard to bridge programming and scripting languages

    just commit and learn to program already!

    I've actually tried and I don't like it!

    life's a game that you're bound to lose / like using a hammer to pound in screws
    fuck up once and you break your thumb / if you're happy at all then you're god damn dumb
    that's right we're on a fucked up cruise / God is dead but at least we have booze
    bad things happen, no one knows why / the sun burns out and everyone dies
  • Options
    jungleroomxjungleroomx It's never too many graves, it's always not enough shovels Registered User regular
    bowen wrote: »
    bowen wrote: »
    guys remember when everyone told me Windows 8 is the future and I should suck it up and just learn to deal with it

    that's how I feel with powershell right now, trying too hard to bridge programming and scripting languages

    just commit and learn to program already!

    Windows 8 is dead p much.

    Windows 10 is the future, son.

    Yeah but the paradigms it created with the metro interface and "FULL SCREEN APPS ARE THE FUTURE!"

    Garbo.

    Microsoft has a long history of fucking up a version of Windows then doing better.

    3.11 -> 95. 98 -> 2000. ME -> XP. Vista -> 7. 8 -> 10.

  • Options
    bowenbowen How you doin'? Registered User regular
    You could probably write the same code in C# and it will be much easier to troubleshoot, expand, and be understood by others who need to fix it compared to PS' janky ass syntax.

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    AiouaAioua Ora Occidens Ora OptimaRegistered User regular
    Entaru wrote: »
    Aioua wrote: »
    Entaru wrote: »
    Aioua wrote: »
    Entaru wrote: »
    I like "enter command:recieve text".

    Ultimately I am asking the shell for information. I then can decide what to do with that info and there are a lot of ways for me to use it.

    With Powershell you are constrained to the objects they decided for you. It bothers me.

    as opposed to the text it decides for you?

    it's the same arbitrary information just packaged in a way that makes it easier to use

    No, they're objects and I have to work with whatever arbitrary things MS wrote into Powershell or extend it myself.

    I don't have to do that with Bash. I just pipe it to however I want to work with it.

    pipe it through Out-String then

    there now you have arbitrary text data that you can play with however you want

    so I have to take an extra step to get what should be the base functionality?

    don't move the goalposts

    life's a game that you're bound to lose / like using a hammer to pound in screws
    fuck up once and you break your thumb / if you're happy at all then you're god damn dumb
    that's right we're on a fucked up cruise / God is dead but at least we have booze
    bad things happen, no one knows why / the sun burns out and everyone dies
  • Options
    bowenbowen How you doin'? Registered User regular
    Aioua wrote: »
    bowen wrote: »
    guys remember when everyone told me Windows 8 is the future and I should suck it up and just learn to deal with it

    that's how I feel with powershell right now, trying too hard to bridge programming and scripting languages

    just commit and learn to program already!

    I've actually tried and I don't like it!

    you're already doing it in powershell!

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    SeidkonaSeidkona Had an upgrade Registered User regular
    bowen wrote: »
    You could probably write the same code in C# and it will be much easier to troubleshoot, expand, and be understood by others who need to fix it compared to PS' janky ass syntax.

    And you could take it farther than the half step Powershell tried to be.

    Mostly just huntin' monsters.
    XBL:Phenyhelm - 3DS:Phenyhelm
  • Options
    bowenbowen How you doin'? Registered User regular
    I'll tie you down and force c# into your brain vowels, don't make me.

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    jungleroomxjungleroomx It's never too many graves, it's always not enough shovels Registered User regular
    bowen wrote: »
    Aioua wrote: »
    bowen wrote: »
    guys remember when everyone told me Windows 8 is the future and I should suck it up and just learn to deal with it

    that's how I feel with powershell right now, trying too hard to bridge programming and scripting languages

    just commit and learn to program already!

    I've actually tried and I don't like it!

    you're already doing it in powershell!

    ulxlwnbflev5.png

  • Options
    AiouaAioua Ora Occidens Ora OptimaRegistered User regular
    bowen wrote: »
    You could probably write the same code in C# and it will be much easier to troubleshoot, expand, and be understood by others who need to fix it compared to PS' janky ass syntax.

    but powershell isn't for that

    it's for the dirty bullshit that people have been hacking together in batch files for ages

    it's so some sysadmin 10 years from now who doesn't have programming training can crack it open and update the servername or whatever

    life's a game that you're bound to lose / like using a hammer to pound in screws
    fuck up once and you break your thumb / if you're happy at all then you're god damn dumb
    that's right we're on a fucked up cruise / God is dead but at least we have booze
    bad things happen, no one knows why / the sun burns out and everyone dies
  • Options
    jungleroomxjungleroomx It's never too many graves, it's always not enough shovels Registered User regular
    Entaru wrote: »
    bowen wrote: »
    You could probably write the same code in C# and it will be much easier to troubleshoot, expand, and be understood by others who need to fix it compared to PS' janky ass syntax.

    And you could take it farther than the half step Powershell tried to be.

    Wouldn't bash be a quarter step then?

  • Options
    SeidkonaSeidkona Had an upgrade Registered User regular
    Aioua wrote: »
    Entaru wrote: »
    Aioua wrote: »
    Entaru wrote: »
    Aioua wrote: »
    Entaru wrote: »
    I like "enter command:recieve text".

    Ultimately I am asking the shell for information. I then can decide what to do with that info and there are a lot of ways for me to use it.

    With Powershell you are constrained to the objects they decided for you. It bothers me.

    as opposed to the text it decides for you?

    it's the same arbitrary information just packaged in a way that makes it easier to use

    No, they're objects and I have to work with whatever arbitrary things MS wrote into Powershell or extend it myself.

    I don't have to do that with Bash. I just pipe it to however I want to work with it.

    pipe it through Out-String then

    there now you have arbitrary text data that you can play with however you want

    so I have to take an extra step to get what should be the base functionality?

    don't move the goalposts

    Ok. But it doesn't change the fact that I have to take extra steps to get it to do what I think is fundamental to how a shell should function?

    Mostly just huntin' monsters.
    XBL:Phenyhelm - 3DS:Phenyhelm
  • Options
    SeidkonaSeidkona Had an upgrade Registered User regular
    Entaru wrote: »
    bowen wrote: »
    You could probably write the same code in C# and it will be much easier to troubleshoot, expand, and be understood by others who need to fix it compared to PS' janky ass syntax.

    And you could take it farther than the half step Powershell tried to be.

    Wouldn't bash be a quarter step then?

    I'll quarter step you.

    Mostly just huntin' monsters.
    XBL:Phenyhelm - 3DS:Phenyhelm
  • Options
    bowenbowen How you doin'? Registered User regular
    Aioua wrote: »
    bowen wrote: »
    You could probably write the same code in C# and it will be much easier to troubleshoot, expand, and be understood by others who need to fix it compared to PS' janky ass syntax.

    but powershell isn't for that

    it's for the dirty bullshit that people have been hacking together in batch files for ages

    it's so some sysadmin 10 years from now who doesn't have programming training can crack it open and update the servername or whatever

    if it's C# you will open an app.config file and change the servername

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    jungleroomxjungleroomx It's never too many graves, it's always not enough shovels Registered User regular
    But for real powershell is a bitch to use.

    I like it when it works. We have a few scripts for updating cfg files that are in PS and it makes life easy as hell in the end.

  • Options
    AiouaAioua Ora Occidens Ora OptimaRegistered User regular
    Entaru wrote: »
    Aioua wrote: »
    Entaru wrote: »
    Aioua wrote: »
    Entaru wrote: »
    Aioua wrote: »
    Entaru wrote: »
    I like "enter command:recieve text".

    Ultimately I am asking the shell for information. I then can decide what to do with that info and there are a lot of ways for me to use it.

    With Powershell you are constrained to the objects they decided for you. It bothers me.

    as opposed to the text it decides for you?

    it's the same arbitrary information just packaged in a way that makes it easier to use

    No, they're objects and I have to work with whatever arbitrary things MS wrote into Powershell or extend it myself.

    I don't have to do that with Bash. I just pipe it to however I want to work with it.

    pipe it through Out-String then

    there now you have arbitrary text data that you can play with however you want

    so I have to take an extra step to get what should be the base functionality?

    don't move the goalposts

    Ok. But it doesn't change the fact that I have to take extra steps to get it to do what I think is fundamental to how a shell should function?

    well yes, it's different paradigm for a shell do the default functionality is different

    but you can still do what you want if you find the .net object model insufficient

    life's a game that you're bound to lose / like using a hammer to pound in screws
    fuck up once and you break your thumb / if you're happy at all then you're god damn dumb
    that's right we're on a fucked up cruise / God is dead but at least we have booze
    bad things happen, no one knows why / the sun burns out and everyone dies
  • Options
    jungleroomxjungleroomx It's never too many graves, it's always not enough shovels Registered User regular
    Entaru wrote: »
    Entaru wrote: »
    bowen wrote: »
    You could probably write the same code in C# and it will be much easier to troubleshoot, expand, and be understood by others who need to fix it compared to PS' janky ass syntax.

    And you could take it farther than the half step Powershell tried to be.

    Wouldn't bash be a quarter step then?

    I'll quarter step you.

    Promise?

  • Options
    bowenbowen How you doin'? Registered User regular
    also a compiled c# binary won't break with a new version of powershell

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    SeidkonaSeidkona Had an upgrade Registered User regular
    Entaru wrote: »
    Entaru wrote: »
    bowen wrote: »
    You could probably write the same code in C# and it will be much easier to troubleshoot, expand, and be understood by others who need to fix it compared to PS' janky ass syntax.

    And you could take it farther than the half step Powershell tried to be.

    Wouldn't bash be a quarter step then?

    I'll quarter step you.

    Promise?

    Come by on Saturday and bring a lot of beer.

    Mostly just huntin' monsters.
    XBL:Phenyhelm - 3DS:Phenyhelm
  • Options
    FeralFeral MEMETICHARIZARD interior crocodile alligator ⇔ ǝɹʇɐǝɥʇ ǝᴉʌoɯ ʇǝloɹʌǝɥɔ ɐ ǝʌᴉɹp ᴉRegistered User regular
    Entaru wrote: »
    Aioua wrote: »
    Entaru wrote: »
    Aioua wrote: »
    Entaru wrote: »
    I like "enter command:recieve text".

    Ultimately I am asking the shell for information. I then can decide what to do with that info and there are a lot of ways for me to use it.

    With Powershell you are constrained to the objects they decided for you. It bothers me.

    as opposed to the text it decides for you?

    it's the same arbitrary information just packaged in a way that makes it easier to use

    No, they're objects and I have to work with whatever arbitrary things MS wrote into Powershell or extend it myself.

    I don't have to do that with Bash. I just pipe it to however I want to work with it.

    pipe it through Out-String then

    there now you have arbitrary text data that you can play with however you want

    so I have to take an extra step to get what should be the base functionality?

    The vast majority of Powershell commands send the most commonly desired text straight to standard output. "Out-String" is only if you're actually doing string manipulation in a script or piped command.

    Like, if I do Get-ADUser feral where "feral" is my username, I see:

    DistinguishedName : CN=Feral,OU=Penny Arcade,OU=Forums,CN=penny-arcade,CN=com
    Enabled : True
    Given Name : Feral
    Name : Feral Kitten
    ...


    and more for SamAccountName, SID, etc.

    If that isn't sufficient, I can do

    Get-ADUser feral |fl

    to dump all Active Directory properties for username "feral."

    If I want to get a CSV of all Active Directory users on my server, I just do

    Get-ADUser | Export-CSV ./users.csv

    There are still a handful of tasks that are much easier dealing with in batch or cmd.exe but the most common tasks in Powershell are dead simple. It's just trying to remember the new command names and syntax has a learning curve.

    every person who doesn't like an acquired taste always seems to think everyone who likes it is faking it. it should be an official fallacy.

    the "no true scotch man" fallacy.
  • Options
    jungleroomxjungleroomx It's never too many graves, it's always not enough shovels Registered User regular
    Nerdiest.

    Argument.

    Ever.

    I love you guys.

  • Options
    jungleroomxjungleroomx It's never too many graves, it's always not enough shovels Registered User regular
    I wonder what Ferals stance is on coupon applications and those who install them.

  • Options
    DarkewolfeDarkewolfe Registered User regular
    I'm just gonna point out that Win10 added a bash prompt.

    What is this I don't even.
  • Options
    bowenbowen How you doin'? Registered User regular
    Darkewolfe wrote: »
    I'm just gonna point out that Win10 added a bash prompt.

    did it?

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    jungleroomxjungleroomx It's never too many graves, it's always not enough shovels Registered User regular
    bowen wrote: »
    Darkewolfe wrote: »
    I'm just gonna point out that Win10 added a bash prompt.

    did it?

    Yup.

  • Options
    wunderbarwunderbar What Have I Done? Registered User regular
    Get-NewFoodCoupon | export c:\couponfolder\lunch.txt

    XBL: thewunderbar PSN: thewunderbar NNID: thewunderbar Steam: wunderbar87 Twitter: wunderbar
  • Options
    CogCog What'd you expect? Registered User regular
    God I leave you guys alone for like twenty minutes and look at the mess you make.

  • Options
    bowenbowen How you doin'? Registered User regular
    bowen wrote: »
    Darkewolfe wrote: »
    I'm just gonna point out that Win10 added a bash prompt.

    did it?

    Yup.

    I'm not seeing it. I see one added by git, but not one that's default.

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    wunderbarwunderbar What Have I Done? Registered User regular
    bowen wrote: »
    bowen wrote: »
    Darkewolfe wrote: »
    I'm just gonna point out that Win10 added a bash prompt.

    did it?

    Yup.

    I'm not seeing it. I see one added by git, but not one that's default.

    it's an optional feature you install, called the "linux subystem for windows" it's basically an Ubuntu install so you can run bash.
    https://blogs.msdn.microsoft.com/wsl/

    XBL: thewunderbar PSN: thewunderbar NNID: thewunderbar Steam: wunderbar87 Twitter: wunderbar
  • Options
    jungleroomxjungleroomx It's never too many graves, it's always not enough shovels Registered User regular
    bowen wrote: »
    bowen wrote: »
    Darkewolfe wrote: »
    I'm just gonna point out that Win10 added a bash prompt.

    did it?

    Yup.

    I'm not seeing it. I see one added by git, but not one that's default.

    This one?

    https://www.google.com/amp/s/www.howtogeek.com/249966/how-to-install-and-use-the-linux-bash-shell-on-windows-10/amp/

This discussion has been closed.