PowerShell Community Extensions module repository
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 CurrentUserYou 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 PscxCmdlets and functions below are sorted by noun. As always, you can get full Powershell help including examples using get-help [command]
Get-ADObjectSearch for objects in the Active Directory/Global Catalog.
Invoke-AdoCommandExecute a SQL query against an ADO.NET datasource.
Get-AdoConnectionCreate 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.
Get-AdoDataProviderList all registered ADO.NET Data Providers on the current machine.
Test-AlternateDataStreamTests for the existence of the specified alternate data stream from an NTFS file.
Invoke-ApartmentPSCX Cmdlet:
Expand-PscxArchiveExpands a compressed archive file, or ArchiveEntry object, to its constituent file(s).
Read-PscxArchiveEnumerates compressed archives such as 7z or rar, emitting ArchiveEntry objects representing records in the archive.
Test-AssemblyTests whether or not the specified file is a .NET assembly.
ConvertFrom-Base64Converts base64 encoded string to byte array.
ConvertTo-Base64Converts byte array or specified file contents to base64 string.
Invoke-BatchFileInvokes the specified batch file and retains any environment variable changes it makes.
Export-BitmapExports bitmap objects to various formats.
Import-BitmapLoads bitmap files.
Set-BitmapSizeSets the size of the specified bitmap.
Format-ByteDisplays numbers in multiples of byte units.
Write-BZip2Create BZIP2 format archive files from pipeline or parameter input.
Get-PscxClipboardGets data from the clipboard.
Out-PscxClipboardFormats text via Out-String before placing in clipboard. Can also place string in clipboard as a file.
Set-PscxClipboardPuts the specified object into the system clipboard.
Write-PscxClipboardWrites objects to the clipboard using their string representation, bypassing the default PowerShell formatting.
Get-DhcpServerGets a list of authorized DHCP servers.
Add-DirectoryLengthCalculates the sizes of the specified directory and adds that size as a "Length" NoteProperty to the input DirectoryInfo object.
Get-DomainControllerGets domain controllers.
Get-DriveInfoGets disk usage information on the system's disk drives.
Invoke-ElevatedRuns the specified command in an elevated context.
Get-EnvironmentBlockLists the environment blocks stored on the environment block stack.
Pop-EnvironmentBlockPops the topmost environment block.
Push-EnvironmentBlockPushes the current environment onto the environment block stack.
Resolve-ErrorRecordResolves the PowerShell error code to a textual description of the error.
Get-ExecutionTimeGets the execution time for the specified Id of a command in the current session history.
Edit-FileEdits a file using a regex pattern to find text to be replaced by a specified replacement string.
Get-FileTailTails the contents of a file - optionally waiting on new content.
Set-FileTimeSets a file or folder's created and last accessed/write times.
Get-FileVersionInfoGets a FileVersionInfo object for the specified path.
Get-ForegroundWindowReturns the hWnd or handle of the window in the foreground on the current desktop. See also Set-ForegroundWindow.
Set-ForegroundWindowGiven 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
Invoke-GCInvokes the .NET garbage collector to clean up garbage objects.
Write-GZipCreate GNU ZIP (GZIP) format files from pipeline or parameter input.
New-HardlinkCreates filesystem hard links. The hardlink and the target must reside on the same NTFS volume.
Get-HashGets the hash value for the specified file or byte array via the pipeline.
New-HashObjectCreate a PSObject from a dictionary such as a hashtable.
Format-PsxHexSystem.Object[]
Ping-HostSends ICMP echo requests to network hosts.
Resolve-HostResolves host names to IP addresses.
Edit-HostProfileOpens the current user's profile for the current host in a text editor.
Resolve-HResultResolves the hresult error code to a textual description of the error.
Get-HttpResourceGets an HTTP resource or optionally the headers associated with the resource.
New-JunctionCreates NTFS directory junctions.
Set-PscxLocationCD function that tracks location history allowing easy navigation to previous locations.
Get-LoremIpsumPSCX Cmdlet:
ConvertTo-MacOs9LineEndingConverts the line endings in the specified file to Mac OS9 and earlier style line endings "\r".
Invoke-MethodFunction to call a single method on an incoming stream of piped objects.
ConvertTo-MetricPSCX Cmdlet:
Get-MountPointReturns all mount points defined for a specific root path.
Remove-MountPointRemoves a mount point, dismounting the current media if any. If used against the root of a fixed drive, removes the drive letter assignment.
Clear-MSMQueuePurges all messages from a queue
Get-MSMQueueReturns a list of all queues matching the filter parameters
New-MSMQueueCreates a new queue object with the defined properties
Receive-MSMQueueReceives the first message available in the queue. This call is synchronous, and blocks the current thread of execution until a message is available.
Send-MSMQueueWraps an object in a Message, and places it onto the defined queue.
Test-MSMQueuePSCX Cmdlet:
Invoke-NullCoalescingSimilar to the C# ?? operator e.g. name = value ?? String.Empty
Skip-ObjectSkips the specified objects in the pipeline.
Enable-OpenPowerShellHereCreates the registry entries required to create Windows Explorer context menu "Open PowerShell Here" for both Directories and Drives
Get-OpticalDriveInfoGet information on optical drive capabilities on the local machine.
Get-ParameterEnumerates the parameters of one or more commands.
Add-PathVariableAdds the specified paths to the end of the named, path-oriented environment variable.
Get-PathVariableGets the specified path-oriented environment variable.
Set-PathVariableSets the specified path-oriented environment variable.
Get-PEHeaderGets the Portable Header information from an executable file.
Start-PowerShellStarts a new Windows PowerShell process.
Get-PrivilegeLists privileges held by the session and their current status.
Set-PrivilegeAdjusts privileges associated with a user (identity).
Edit-ProfileOpens the current user's "all hosts" profile in a text editor.
Get-PSSnapinHelpGenerates a XML file containing all documentation data.
Set-ReadOnlySets a file's read only status to true making it read only.
Stop-RemoteProcessStops a process on a remote machine.
Get-ReparsePointGets NTFS reparse point data.
Remove-ReparsePointRemoves NTFS reparse junctions and symbolic links.
Get-RunningObjectPSCX Cmdlet:
Get-ScreenCssGenerate CSS header for HTML "screen shot" of the host buffer.
Get-ScreenHtmlFunctions to generate HTML "screen shot" of the host buffer.
Test-ScriptDetermines whether a PowerShell script has any syntax errors.
New-ShortcutCreates shell shortcuts.
Add-ShortPathAdds the file or directory's short path as a "ShortPath" NoteProperty to each input object.
Get-ShortPathGets the short, 8.3 name for the given path.
Send-SmtpMailSends email via specified SMTP server to specified recipients.
Out-SpeechOutputs text as spoken words.
Join-PscxStringJoins an array of strings into a single string.
Split-StringSplits a single string into an array of strings.
New-SymlinkCreates filesystem symbolic links. Requires Microsoft Windows Vista or later.
Write-TarCreate Tape Archive (TAR) format files from pipeline or parameter input.
Disconnect-TerminalSessionDisconnects a specific remote desktop session on a system running Terminal Services/Remote Desktop
Get-TerminalSessionGets information on terminal services sessions.
Stop-TerminalSessionLogs off a specific remote desktop session on a system running Terminal Services/Remote Desktop
Invoke-TernarySimilar to the C# ? : operator e.g. name = (value != null) ? String.Empty : value
Show-TreeShows the specified path as a tree.
Get-TypeNameGet-TypeName displays the typename of the input object.
ConvertTo-UnixLineEndingConverts the line endings in the specified file to Unix line endings "\n".
Get-PscxUptimeGets the operating system's uptime and last bootup time.
Test-UserGroupMembershipTests whether or not a user (current user by default) is a member of the specified group name.
Dismount-VHDDismounts a Virtual Hard Drive (VHD) file.
Mount-VHDMounts a Virtual Hard Drive (VHD) file.
Get-ViewDefinitionGets the possible alternate views for the specified object.
Import-VisualStudioVarsImports environment variables for the specified version of Visual Studio.
Set-VolumeLabelModifies the label shown in Windows Explo
No open issues yet, or sync has not completed.