This PowerShell module is aimed at providing a widely useful set of additional cmdlets, providers, aliases, filters, functions and scripts for PowerShell that members of the community have expressed interest in.
See ReleaseNotes.txt.
Pscx is hosted on the PowerShell Gallery. You can install Pscx with the following command:
Install-Module Pscx -Scope CurrentUser
You may be prompted to trust the PSGallery. Respond with a 'y' (for yes) to proceed with the install.
If you already have installed Pscx from the PowerShell Gallery, you can update Pscx with the command:
Update-Module Pscx
Cmdlets and functions below are sorted by noun. As always, you can get full Powershell help including examples using get-help [command]
Search for objects in the Active Directory/Global Catalog.
Execute a SQL query against an ADO.NET datasource.
Create an ADO connection to any database supported by .NET on the current machine. You can enumerate available ADO.NET Data Providers with the Get-AdoDataProvider Cmdlet.
List all registered ADO.NET Data Providers on the current machine.
Tests for the existence of the specified alternate data stream from an NTFS file.
PSCX Cmdlet:
Expands a compressed archive file, or ArchiveEntry object, to its constituent file(s).
Enumerates compressed archives such as 7z or rar, emitting ArchiveEntry objects representing records in the archive.
Tests whether or not the specified file is a .NET assembly.
Converts base64 encoded string to byte array.
Converts byte array or specified file contents to base64 string.
Invokes the specified batch file and retains any environment variable changes it makes.
Exports bitmap objects to various formats.
Loads bitmap files.
Sets the size of the specified bitmap.
Displays numbers in multiples of byte units.
Create BZIP2 format archive files from pipline or parameter input.
Gets data from the clipboard.
Formats text via Out-String before placing in clipboard. Can also place string in clipboard as a file.
Puts the specified object into the system clipboard.
Writes objects to the clipboard using their string representation, bypassing the default PowerShell formatting.
Gets a list of authorized DHCP servers.
Calculates the sizes of the specified directory and adds that size as a "Length" NoteProperty to the input DirectoryInfo object.
Gets domain controllers.
Gets disk usage information on the system's disk drives.
Runs the specified command in an elevated context.
Lists the environment blocks stored on the environment block stack.
Pops the topmost environment block.
Pushes the current environment onto the environment block stack.
Resolves the PowerShell error code to a textual description of the error.
Gets the execution time for the specified Id of a command in the current session history.
Edits a file using a regex pattern to find text to be replaced by a specified replacement string.
Tails the contents of a file - optionally waiting on new content.
Sets a file or folder's created and last accessed/write times.
Gets a FileVersionInfo object for the specified path.
Returns the hWnd or handle of the window in the foreground on the current desktop. See also Set-ForegroundWindow.
Given an hWnd or window handle, brings that window to the foreground. Useful for restoring a window to uppermost after an application which seizes the foreground is invoked. See also Get-ForegroundWindow
Invokes the .NET garbage collector to clean up garbage objects.
Create GNU ZIP (GZIP) format files from pipeline or parameter input.
Creates filesystem hard links. The hardlink and the target must reside on the same NTFS volume.
Gets the hash value for the specified file or byte array via the pipeline.
Create a PSObject from a dictionary such as a hashtable.
System.Object[]
Sends ICMP echo requests to network hosts.
Resolves host names to IP addresses.
Opens the current user's profile for the current host in a text editor.
Resolves the hresult error code to a textual description of the error.
Gets an HTTP resource or optionally the headers associated with the resource.
Creates NTFS directory junctions.
CD function that tracks location history allowing easy navigation to previous locations.
PSCX Cmdlet:
Converts the line endings in the specified file to Mac OS9 and earlier style line endings "\r".
Function to call a single method on an incoming stream of piped objects.
PSCX Cmdlet:
Returns all mount points defined for a specific root path.
Removes a mount point, dismounting the current media if any. If used against the root of a fixed drive, removes the drive letter assignment.
Purges all messages from a queue
Returns a list of all queues matching the filter parameters
Creates a new queue object with the defined properties
Receives the first message available in the queue. This call is synchronous, and blocks the current thread of execution until a message is available.
Wraps an object in a Message, and places it onto the defined queue.
PSCX Cmdlet:
Similar to the C# ?? operator e.g. name = value ?? String.Empty
Skips the specified objects in the pipeline.
Creates the registry entries required to create Windows Explorer context menu "Open PowerShell Here" for both Directories and Drives
Get information on optical drive capabilities on the local machine.
Enumerates the parameters of one or more commands.
Adds the specified paths to the end of the named, path-oriented environment variable.
Gets the specified path-oriented environment variable.
Sets the specified path-oriented environment variable.
Gets the Portable Header information from an executable file.
Starts a new Windows PowerShell process.
Lists privileges held by the session and their current status.
Adjusts privileges associated with a user (identity).
Opens the current user's "all hosts" profile in a text editor.
Generates a XML file containing all documentation data.
Sets a file's read only status to true making it read only.
Stops a process on a remote machine.
Gets NTFS reparse point data.
Removes NTFS reparse junctions and symbolic links.
PSCX Cmdlet:
Generate CSS header for HTML "screen shot" of the host buffer.
Functions to generate HTML "screen shot" of the host buffer.
Determines whether a PowerShell script has any syntax errors.
Creates shell shortcuts.
Adds the file or directory's short path as a "ShortPath" NoteProperty to each input object.
Gets the short, 8.3 name for the given path.
Sends email via specified SMTP server to specified recipients.
Outputs text as spoken words.
Joins an array of strings into a single string.
Splits a single string into an array of strings.
Creates filesystem symbolic links. Requires Microsoft Windows Vista or later.
Create Tape Archive (TAR) format files from pipeline or parameter input.
Disconnects a specific remote desktop session on a system running Terminal Services/Remote Desktop
Gets information on terminal services sessions.
Logs off a specific remote desktop session on a system running Terminal Services/Remote Desktop
Similar to the C# ? : operator e.g. name = (value != null) ? String.Empty : value
Shows the specified path as a tree.
Get-TypeName displays the typename of the input object.
Converts the line endings in the specified file to Unix line endings "\n".
Gets the operating system's uptime and last bootup time.
Tests whether or not a user (current user by default) is a member of the specified group name.
Dismounts a Virtual Hard Drive (VHD) file.
Mounts a Virtual Hard Drive (VHD) file.
Gets the possible alternate views for the specified object.
Imports environment variables for the specified version of Visual Studio.
Modifies the label shown in Windows Explorer for a particular disk volume.
Resolves a Windows error number a textual description of the error.
Converts the line endings in the specified file to Windows line endings "\r\n".
Sets a file's read only status to false making it writable.
Performs XSLT transforms on the specified XML file or XmlDocument.
Pretty print for XML files and XmlDocument objects.
Tests for well formedness and optionally validates against XML Schema.
Create ZIP format archive files from pipline or parameter input.