A small collection specialised scripts for Active Directory.
Includes:
- Compare-ADMemberOf
- Get-ADSystemInfo
- Get-GroupMemberTree
- Get-LdapObject
- Get-MemberOfTree
- Test-LdapSslConnection
using namespace System.Management.Automation.Runspaces | |
using namespace System.Reflection | |
function Import-PSCmdlet { | |
param ( | |
[String]$Name, | |
[Type]$Type | |
) | |
function Compress-Item { | |
<# | |
.SYNOPSIS | |
Compress a file or directory. | |
.DESCRIPTION | |
Create a zip file from a collection of files. | |
.INPUTS | |
System.IO.FileInfo | |
.EXAMPLE | |
Compress-Item .SomeFile.txt |
function New-DynamicParameter { | |
<# | |
.SYNOPSIS | |
Create a new dynamic parameter object for use with a dynamicparam block. | |
.DESCRIPTION | |
New-DynamicParameter allows simplified creation of runtime (dynamic) parameters. | |
.EXAMPLE | |
New-DynamicParameter Name -DefaultValue "Test" -ParameterType "String" -Mandatory -ValidateSet "Test", "Live" | |
.EXAMPLE | |
New-DynamicParameter Name -ValueFromPipelineByPropertyName |
function Find-String { | |
<# | |
.SYNOPSIS | |
Find a matching string from an alphabetically sorted file. | |
.DESCRIPTION | |
Find-String is a specialised binary (half interval) searcher designed to find matches in sorted ASCII encoded text files. | |
.NOTES | |
Change log: | |
11/08/2014 - Chris Dent - First release. | |
#> |
function Get-InstalledSoftware { | |
<# | |
.SYNOPSIS | |
Get all installed from the Uninstall keys in the registry. | |
.DESCRIPTION | |
Read a list of installed software from each Uninstall key. | |
This function provides an alternative to using Win32_Product. | |
.EXAMPLE | |
Get-InstalledSoftware |
A small collection specialised scripts for Active Directory.
Includes:
Option Explicit | |
' ContactImport.vbs | |
' | |
' Contact Import / Maintenance Script | |
' | |
' Subroutines | |
' |
<# | |
Module file content: | |
CmdLet Name Category Access modifier Updated | |
----------- -------- --------------- ------- | |
Set-SessionKey Passphrase management Public 02/10/2012 | |
Get-Key Keyring management Public 02/10/2012 | |
Import-Key Keyring management Public 02/10/2012 | |
Export-Key Keyring management Public 02/10/2012 | |
Remove-Key Keyring management Public 02/10/2012 |
using assembly System.DirectoryServices.Protocols | |
using namespace System.DirectoryServices.Protocols; using namespace System.Collections.Generic | |
function Get-LdapObject { | |
<# | |
.SYNOPSIS | |
Get objects from an LDAP directory. | |
.DESCRIPTION | |
Get objects from an LDAP directory. | |
.EXAMPLE |