Quantcast
Channel: PowerShell – The AEMS Flogger
Browsing latest articles
Browse All 19 View Live

Tricking PowerShell Into Treating a String as a Stream

The PowerShell cmdlet Get-FileHash accepts only files or streams as inputs. If I want to generate a hash for a string, I could save it as a file and then feed that file to the command, or I could...

View Article


Cisco AnyConnect breaks network connectivity in Ubuntu running under WSL

Despite being primarily a Windows admin, I like to use my WSL Ubuntu instance to access Unixy-networking commands, but establishing AnyConnect VPN sessions breaks network connectivity within the...

View Article


Image may be NSFW.
Clik here to view.

ChatGPT Writes PowerShell Scripts…Badly

One of the most intriguing features of ChatGPT is its ability to take a plain-English description of desired functionality and turn that into a simple script or program in a variety of programming and...

View Article

Using EMS to enumerate the e-mail addresses of Distribution Group members

The magic mojo for listing the SMTP addresses of all members of a Distribution Group is as follows: Get-DistributionGroupMember “My Distribution Group Name” | ForEach {$_.PrimarySMTPAddress.ToSTring()}...

View Article

Addition in PowerShell

In general, PowerShell is able to detect when a mathematical operation is being performed and convert strings on the fly to permit this: PS C:\> $x = 10 + “20” PS C:\> $x 30 However, there are...

View Article


Behold the power of Get-MailboxFolderStatistics

Not too long ago, I received a ticket from a user who was having quota issues and could not account for what was using up their Exchange quota. With a simple Exchange Management Shell one-liner, I was...

View Article

Exploring Delegates with the EWS Managed API – Part I: The EWS Delegate...

As an Exchange administrator, a long-standing source of frustration for me has been the fact that Microsoft does not provide tools for administratively inspecting and repairing delegate settings....

View Article

Using PasswordVault with PowerShell

A handy way to securely store credentials for use by a PowerShell script (particularly one running from within a Scheduled Task) is to use the Windows PasswordVault class.  Please note that this should...

View Article


PowerShell Hash Tables

A hash table is an array of key/value pairs, along with accompanying functions for readily accessing or modifying values by way of their corresponding keys. Creating and Populating a Hash Table Here is...

View Article


Image may be NSFW.
Clik here to view.

Scripting with AI, Redux

A few years ago, I explored using ChatGPT to write simple PowerShell scripts.  The results were…less than impressive.  But, it has had time to improve.  The more data that a Large Language Model is...

View Article
Browsing latest articles
Browse All 19 View Live


Latest Images