• Skip to main content
  • Skip to primary sidebar
  • Skip to footer
  • Home
  • About Darknet
  • Hacking Tools
  • Popular Posts
  • Darknet Archives
  • Contact Darknet
    • Advertise
    • Submit a Tool
Darknet – Hacking Tools, Hacker News & Cyber Security

Darknet - Hacking Tools, Hacker News & Cyber Security

Darknet is your best source for the latest hacking tools, hacker news, cyber security best practices, ethical hacking & pen-testing.

PowerShell – More than the command prompt

July 10, 2007

Views: 19,103

[ad]

For this article you should thank Patrick Ogenstad and his comment on my post , because I did not know about PowerShell until he mentioned about it… so a white point for him =)
The parts that will follow are snippets from the Getting Started document that comes with it…

Abstract

Windows PowerShell™ is a new Windows command-line shell designed especially for system administrators. The shell includes an interactive prompt and a scripting environment that can be used independently or in combination.

Introducing Windows PowerShell

Most shells, including Cmd.exe and the SH, KSH, CSH, and BASH Unix shells, operate by executing a command or utility in a new process, and presenting the results to the user as text. Over the years, many text processing utilities, such as sed, AWK, and PERL, have evolved to support this interaction.
These shells also have commands that are built into the shell and run in the shell process, such as the typeset command in KSH and the dir command in Cmd.exe. In most shells, because there are few built-in commands.many utilities have been created.
Windows PowerShell is very different.

  • Windows PowerShell does not process text. Instead, it processes objects based on the .NET platform.
  • Windows PowerShell comes with a large set of built-in commands with a consistent interface.
  • All shell commands use the same command parser, instead of different parsers for each tool. This makes it much easier to learn how to use each command.

Best of all, you don’t have to give up the tools that you have become accustomed to using. You can still use the traditional Windows tools, such as Net, SC, and Reg.exe in Windows PowerShell.

Windows PowerShell Cmdlets

A cmdlet (pronounced “command-let”) is a single-feature command that manipulates objects in Windows PowerShell. You can recognize cmdlets by their name format — a verb and noun separated by a dash (-), such as Get-Help, Get-Process, and Start-Service.

In traditional shells, the commands are executable programs that range from the very simple (such as attrib.exe) to the very complex (such as netsh.exe).

In Windows PowerShell, most cmdlets are very simple, and they are designed to be used in combination with other cmdlets. For example, the “get” cmdlets only retrieve data, the “set” cmdlets only establish or change data, the “format” cmdlets only format data, and the “out” cmdlets only direct the output to a specified destination.
Each cmdlet has a help file that you can access by typing:

get-help -detailed

The detailed view of the cmdlet help file includes a description of the cmdlet, the command syntax, descriptions of the parameters, and example that demonstrate use of the cmdlet.

…and more

Besides the above mentioned things, powerShell also includes: a new scripting language (not the lame-ass batch), processes objects, object pipelines, interaction, etc. If you are interested take a look at microsoft.com/powershell

Once again thanks to Patrick….

Share
Tweet
Share
Buffer
WhatsApp
Email
0 Shares

Filed Under: Secure Coding, Windows Hacking Tagged With: .NET, cmd, powershell, windows



Reader Interactions

Comments

  1. SN says

    July 11, 2007 at 4:23 pm

    cool

  2. backbone says

    July 11, 2007 at 5:30 pm

    I know… It’s to awesome to have words to describe it =)

  3. Bogwitch says

    July 12, 2007 at 7:29 pm

    Wot no Win2K support?

  4. backbone says

    July 12, 2007 at 8:42 pm

    nope… microsoft never cared about backwards compatibility… X(
    anyway powershell was though for windows 2k8

  5. freyk says

    July 16, 2007 at 7:16 am

    I’ve compared powershell with cygwin.
    And i can now say that cygwin is more powerfull

  6. Bogwitch says

    July 16, 2007 at 1:58 pm

    Thanks freyk, I would have stuck with cygwin anyway due to the lack of 2k support, but that saves me investigating it for 2k3 up!

  7. backbone says

    July 16, 2007 at 5:43 pm

    freyk can you write a paper on your comparison? I’ll post it ;)

  8. lrbell says

    July 16, 2007 at 6:53 pm

    I think Powershell is better in a homogenous environment. I have written KSH BASH etc.. for 8 years, and LOVE IT, but actually having OBJECTS to pass around in Powershell is the HUGE difference maker.
    It all has to do with what you want to do.

    If the environment is Windows centric, then the Powershell is easily superior.
    If it is heterogeneous, then I would have to agree that Cygwin/Perl etc… ties the pieces together. Python has topped the list for me of late.

    It is the age old argument. It just depends on the task of the day, and the direction of the group.

    On that same note. Powershell is packaged with Exchange 2007 and also works with SQL 2005 SMO (SQL Management Objects).

    It also plays nicely with Sharepoint, Active Directory, and will be bundled with Server 2008.

    Also, I have found that rudimentary automation in Windows with Powershell can effectively cut out 80% lines of code.

    What takes me 200 lines in VB or Java, takes 20 lines in Powershell
    (It took MSFT until 2006 to get it going, vs. 30 yrs ago in UNIX LOL!!).

    freyk, please let me know what you found to be far superior in function, as I too am interested in knowing.

    BTW, Cross platform is a no brain-er.

    L

  9. backbone says

    July 16, 2007 at 11:45 pm

    very interesting thing you point Irbell… i think that is very good to have ppl who are accomodated with powerShell to tell us some informative tips about it…. keep up the good commenting… ;)

  10. backbone says

    July 27, 2007 at 11:51 pm

    I wrote a comparison between bash and powershell for the ones who really want to see them compared in an non-subjective way =)

    http://backbone.lx.ro

  11. Joaquin Menchaca says

    July 30, 2007 at 5:05 pm

    Considering only the Windows platform, you have a command shell that only works on certain Windows (no w2k), and doesn’t have raw ability to access important parts of OS needed for security and system administration (ACLs on pipes, services, drivers, etc.). So to get the job done, one will used Windows command console tools from 3rd parties, e.g. system internals group at MS, do stuff in C++, or well, just use Perl which has wrappers to a lot of these.

    In contrast to all the platforms, Powershell looks extremely resource intensive, and limited or cumbersome to program in certain areas. For example, short-circuit operations:

    command1 && command2 # do command2 if command1 succeeds

    And still, just piping objects is limited when you just want to get at the text:


    command | awk '{ do stuff }' # easy
    command | perl -a -e 'do stuff using $_ per line' # easy too
    command | write "strings using $_" # fails in power shell
    command | } # works, ugly

    Notes: Web Site Mangling my Code, cannot do ampersand squiggly “process” squiggly combination.

  12. lrbell says

    July 30, 2007 at 5:39 pm

    I am right there with you on a lack of backward compatibility, but upgrade and commence!

    Now this is just not accurate Joaquin;

    “And still, just piping objects is limited when you just want to get at the text”

    The absolute sweetest thing about PS is that beneath teh covers you are pass OBJECTS around.

    command | foreach {$_.getSomthing}

    works like a charm.
    Piping objects, not text.

    so, get-Process | foreach{$_.ID} will spit out all the PIDs for the procs running, ala “ps -ealf” in my beloved *NIX.

    Anything that is not a cmdlet can be cast to the .NET object of your choosing, and hence has the properties of said object.

    You can pipe a cmdlet to Get-Member and see the plethora of methods and properties associated with the object.

    For example;
    Get-Childitem | Get-Member will return all methods and props associated with a file or directory object.

    I do not mind the opinions, but be sure facts are straight to be fair.

    HTH

    L

  13. Sir Henry says

    December 15, 2007 at 6:06 pm

    I have found powershell to be vital when working in a windows environment, while being a linux user first. There is no better feeling that to have all the same tools and commands at your disposal when you absolutely have to use windows.

Primary Sidebar

Search Darknet

  • Email
  • Facebook
  • LinkedIn
  • RSS
  • Twitter

Advertise on Darknet

Latest Posts

SUDO_KILLER - Auditing Sudo Configurations for Privilege Escalation Paths

SUDO_KILLER – Auditing Sudo Configurations for Privilege Escalation Paths

Views: 83

sudo is a powerful utility in Unix-like systems that allows permitted users to execute commands with … ...More about SUDO_KILLER – Auditing Sudo Configurations for Privilege Escalation Paths

Bantam - Advanced PHP Backdoor Management Tool For Post Exploitation

Bantam – Advanced PHP Backdoor Management Tool For Post Exploitation

Views: 319

Bantam is a lightweight post-exploitation utility written in C# that includes advanced payload … ...More about Bantam – Advanced PHP Backdoor Management Tool For Post Exploitation

AI-Powered Cybercrime in 2025 - The Dark Web’s New Arms Race

AI-Powered Cybercrime in 2025 – The Dark Web’s New Arms Race

Views: 515

In 2025, the dark web isn't just a marketplace for illicit goods—it's a development lab. … ...More about AI-Powered Cybercrime in 2025 – The Dark Web’s New Arms Race

Upload_Bypass - Bypass Upload Restrictions During Penetration Testing

Upload_Bypass – Bypass Upload Restrictions During Penetration Testing

Views: 504

Upload_Bypass is a command-line tool that automates discovering and exploiting weak file upload … ...More about Upload_Bypass – Bypass Upload Restrictions During Penetration Testing

Shell3r - Powerful Shellcode Obfuscator for Offensive Security

Shell3r – Powerful Shellcode Obfuscator for Offensive Security

Views: 695

If antivirus and EDR vendors are getting smarter, so are the tools that red teamers and penetration … ...More about Shell3r – Powerful Shellcode Obfuscator for Offensive Security

Understanding the Deep Web, Dark Web, and Darknet (2025 Guide)

Understanding the Deep Web, Dark Web, and Darknet (2025 Guide)

Views: 8,673

Introduction: How Much of the Internet Can You See? You're only scratching the surface when you … ...More about Understanding the Deep Web, Dark Web, and Darknet (2025 Guide)

Topics

  • Advertorial (28)
  • Apple (46)
  • Countermeasures (227)
  • Cryptography (82)
  • Database Hacking (89)
  • Events/Cons (7)
  • Exploits/Vulnerabilities (431)
  • Forensics (65)
  • GenAI (3)
  • Hacker Culture (8)
  • Hacking News (229)
  • Hacking Tools (684)
  • Hardware Hacking (82)
  • Legal Issues (179)
  • Linux Hacking (74)
  • Malware (238)
  • Networking Hacking Tools (352)
  • Password Cracking Tools (104)
  • Phishing (41)
  • Privacy (219)
  • Secure Coding (118)
  • Security Software (233)
  • Site News (51)
    • Authors (6)
  • Social Engineering (37)
  • Spammers & Scammers (76)
  • Stupid E-mails (6)
  • Telecomms Hacking (6)
  • UNIX Hacking (6)
  • Virology (6)
  • Web Hacking (384)
  • Windows Hacking (169)
  • Wireless Hacking (45)

Security Blogs

  • Dancho Danchev
  • F-Secure Weblog
  • Google Online Security
  • Graham Cluley
  • Internet Storm Center
  • Krebs on Security
  • Schneier on Security
  • TaoSecurity
  • Troy Hunt

Security Links

  • Exploits Database
  • Linux Security
  • Register – Security
  • SANS
  • Sec Lists
  • US CERT

Footer

Most Viewed Posts

  • Brutus Password Cracker – Download brutus-aet2.zip AET2 (2,291,921)
  • Darknet – Hacking Tools, Hacker News & Cyber Security (2,173,071)
  • Top 15 Security Utilities & Download Hacking Tools (2,096,614)
  • 10 Best Security Live CD Distros (Pen-Test, Forensics & Recovery) (1,199,675)
  • Password List Download Best Word List – Most Common Passwords (933,464)
  • wwwhack 1.9 – wwwhack19.zip Web Hacking Software Free Download (776,130)
  • Hack Tools/Exploits (673,287)
  • Wep0ff – Wireless WEP Key Cracker Tool (530,143)

Search

Recent Posts

  • SUDO_KILLER – Auditing Sudo Configurations for Privilege Escalation Paths May 12, 2025
  • Bantam – Advanced PHP Backdoor Management Tool For Post Exploitation May 9, 2025
  • AI-Powered Cybercrime in 2025 – The Dark Web’s New Arms Race May 7, 2025
  • Upload_Bypass – Bypass Upload Restrictions During Penetration Testing May 5, 2025
  • Shell3r – Powerful Shellcode Obfuscator for Offensive Security May 2, 2025
  • Understanding the Deep Web, Dark Web, and Darknet (2025 Guide) April 30, 2025

Tags

apple botnets computer-security darknet Database Hacking ddos dos exploits fuzzing google hacking-networks hacking-websites hacking-windows hacking tool Information-Security information gathering Legal Issues malware microsoft network-security Network Hacking Password Cracking pen-testing penetration-testing Phishing Privacy Python scammers Security Security Software spam spammers sql-injection trojan trojans virus viruses vulnerabilities web-application-security web-security windows windows-security Windows Hacking worms XSS

Copyright © 1999–2025 Darknet All Rights Reserved · Privacy Policy