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
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
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
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.
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
+1
Options
jungleroomxIt's never too many graves, it's always not enough shovelsRegistered Userregular
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
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
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
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
+2
Options
jungleroomxIt's never too many graves, it's always not enough shovelsRegistered Userregular
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.
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
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
0
Options
jungleroomxIt's never too many graves, it's always not enough shovelsRegistered Userregular
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.
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
0
Options
jungleroomxIt's never too many graves, it's always not enough shovelsRegistered Userregular
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.
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
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.
+1
Options
jungleroomxIt's never too many graves, it's always not enough shovelsRegistered Userregular
Nerdiest.
Argument.
Ever.
I love you guys.
+3
Options
jungleroomxIt's never too many graves, it's always not enough shovelsRegistered Userregular
I wonder what Ferals stance is on coupon applications and those who install them.
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/
Posts
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.
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
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
Hello, thread!
the "no true scotch man" fallacy.
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.
XBL:Phenyhelm - 3DS:Phenyhelm
You were the one who started the original one.
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.
pipe it through Out-String then
there now you have arbitrary text data that you can play with however you want
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
Yeah but the paradigms it created with the metro interface and "FULL SCREEN APPS ARE THE FUTURE!"
so I have to take an extra step to get what should be the base functionality?
XBL:Phenyhelm - 3DS:Phenyhelm
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.
the "no true scotch man" fallacy.
I've actually tried and I don't like it!
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
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.
don't move the goalposts
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
you're already doing it in powershell!
And you could take it farther than the half step Powershell tried to be.
XBL:Phenyhelm - 3DS:Phenyhelm
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
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
Wouldn't bash be a quarter step then?
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?
XBL:Phenyhelm - 3DS:Phenyhelm
I'll quarter step you.
XBL:Phenyhelm - 3DS:Phenyhelm
if it's C# you will open an app.config file and change the servername
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.
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
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
Promise?
Come by on Saturday and bring a lot of beer.
XBL:Phenyhelm - 3DS:Phenyhelm
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.
the "no true scotch man" fallacy.
Argument.
Ever.
I love you guys.
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/
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/