Revisiting Get-FileTimestamp with Reflection
Ever since I wrote my function to locate a file’s MFT (ChangeTime) timestamp, I wanted to take on an extra challenge by taking all of the C# code that included using pinvoke and rewrite it using...
View ArticleGuest Spot on Hey, Scripting Guy! On Making The Console Glassy
I did a spot on Hey, Scripting Guy! today talking about using reflection to hook into the Win32 API and give your PowerShell console a more glassy look. Click on the link below to check it out!...
View ArticleRetrieving a Registry Key LastWriteTime Using PowerShell
While navigating through the registry, you may have noticed that there is something missing from there that you normally see in other places such as the file system. That little thing is a timestamp...
View ArticleA Look at Implementing $Using: Support in PowerShell for PoshRSJob
After I made my initial release of PoshRSJob, one of the things left that I wanted to accomplish was implementing the $Using: scope that is found when using Invoke-Command or Start-Job which allows you...
View ArticleManaging Privileges using PoshPrivilege
A recent project of mine has been to write a module to manage privileges on a local system. What I came up is a module called PoshPrivilege that allows you to not only look at what user rights are...
View ArticleInvoking Private Static Methods Using PowerShell
Usually if I want to accomplish a task in PowerShell, I can count on either a cmdlet or a publicly available .Net method to come to my rescue. Sometimes though, a method that I would like to use is...
View ArticleFinding the PowerShellAsyncResult on PowerShell Object After Using BeginInvoke
I’ve been here many of times when working with the console and creating a PowerShell instance and runspace to kick off a runspace in the background. I have everything situated and then call...
View ArticleManaging Privileges using PoshPrivilege
A recent project of mine has been to write a module to manage privileges on a local system. What I came up is a module called PoshPrivilege that allows you to not only look at what user rights are...
View ArticleInvoking Private Static Methods Using PowerShell
Usually if I want to accomplish a task in PowerShell, I can count on either a cmdlet or a publicly available .Net method to come to my rescue. Sometimes though, a method that I would like to use is...
View ArticleFinding the PowerShellAsyncResult on PowerShell Object After Using BeginInvoke
I’ve been here many of times when working with the console and creating a PowerShell instance and runspace to kick off a runspace in the background. I have everything situated and then call...
View ArticleBuilding a Enum that Supports Bit Fields in PowerShell
I was working on a project recently that required me to have an Enum that allowed bit fields as opposed to the normal fields that we might deal with in our day to day endeavors with PowerShell. If you...
View ArticleQuick Hits: Writing to a Read-Only Property
This post is less on doing something useful and more on just proving that I can do something even though PowerShell is trying to tell me that I cannot do it. That little thing is updating a property on...
View ArticleViewing Net Sessions using PowerShell and PInvoke
We are all used to view net sessions on a local or remote system by calling net session to see what clients are connected to another system such as a file server or even a domain controller. This...
View ArticleRevisiting NetSession Function using PSReflect
In an article that I wrote a little while ago, I talked about how you can view the net sessions on systems by making use of some pinvoke magic to call some Win32 apis. If you have ever worked with this...
View ArticleYet Another Way to Get Output from a Runspace, Reflection Edition
While working on some possible feature updates to my module, PoshRSJob, I have been looking at ways to get the output from a runspace without relying on the usual approach of using EndInvoke() while...
View ArticleTracking the State of PowerShell Runspaces in a Runspacepool
A question that I have received a number of times has always involved a way to determine the state of each runspace that is in a runspacepool. Since a runspacepool is used to throttle the number of...
View Article