Tag Archives: pinvoke

Revisiting 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 … Continue reading

Posted in powershell | Tagged , , , , , , | 2 Comments

Viewing 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 provides a … Continue reading

Posted in powershell | Tagged , , , | 3 Comments

Creating a Robust Services Function

I had a time when I needed to know whether or not a service had triggers, which would mean that the StartMode could be Auto (Triggered Start) so that the service might just stop for its own reason and if … Continue reading

Posted in powershell | Tagged , , , | 3 Comments

Updated Function to Remove Long Files and Directories

I had a post last month ( or year for that matter) on Hey, Scripting Guy! where I talked about using PInvoke and PowerShell to create a function that allowed you to remove files which were nested too deep in … Continue reading

Posted in powershell | Tagged , , | 2 Comments

Another Way to List Files and Folders Beyond 260 Characters Using Pinvoke and PowerShell

I covered a pretty nice way to list all of files and folders in which the total number of characters extended beyond the 260 limitation (MAX_PATH limitation) using a mix of robocopy and PowerShell. In that article I show you … Continue reading

Posted in powershell | Tagged , , , , | 3 Comments