aboutsummaryrefslogtreecommitdiff
path: root/docs/Recon/Get-ForestTrust.md
diff options
context:
space:
mode:
authorDave Hull <dave.hull@tanium.com>2017-09-08 16:33:11 -0500
committerDave Hull <dave.hull@tanium.com>2017-09-08 16:33:11 -0500
commit6eb3c6f281f0812a103283d1da80be14bb04f944 (patch)
treecfe2e46596ef251274e954c267c5634d62991da2 /docs/Recon/Get-ForestTrust.md
parentbf652bcd261c2c74445c2aa1b4e283c4bf167109 (diff)
parent3d0d32d9ee6af70f0dfd5ecfe809a49a65d6822d (diff)
downloadPowerSploit-6eb3c6f281f0812a103283d1da80be14bb04f944.tar.gz
PowerSploit-6eb3c6f281f0812a103283d1da80be14bb04f944.zip
Merge branch 'dev' of github.com:PowerShellMafia/PowerSploit into dev
Diffstat (limited to 'docs/Recon/Get-ForestTrust.md')
-rwxr-xr-xdocs/Recon/Get-ForestTrust.md91
1 files changed, 91 insertions, 0 deletions
diff --git a/docs/Recon/Get-ForestTrust.md b/docs/Recon/Get-ForestTrust.md
new file mode 100755
index 0000000..0ff5e3d
--- /dev/null
+++ b/docs/Recon/Get-ForestTrust.md
@@ -0,0 +1,91 @@
+# Get-ForestTrust
+
+## SYNOPSIS
+Return all forest trusts for the current forest or a specified forest.
+
+Author: Will Schroeder (@harmj0y)
+License: BSD 3-Clause
+Required Dependencies: Get-Forest
+
+## SYNTAX
+
+```
+Get-ForestTrust [[-Forest] <String>] [-Credential <PSCredential>]
+```
+
+## DESCRIPTION
+This function will enumerate domain trust relationships for the current (or a remote)
+forest using number of method using the .NET method GetAllTrustRelationships() on a
+System.DirectoryServices.ActiveDirectory.Forest returned by Get-Forest.
+
+## EXAMPLES
+
+### -------------------------- EXAMPLE 1 --------------------------
+```
+Get-ForestTrust
+```
+
+Return current forest trusts.
+
+### -------------------------- EXAMPLE 2 --------------------------
+```
+Get-ForestTrust -Forest "external.local"
+```
+
+Return trusts for the "external.local" forest.
+
+### -------------------------- EXAMPLE 3 --------------------------
+```
+$SecPassword = ConvertTo-SecureString 'Password123!' -AsPlainText -Force
+```
+
+$Cred = New-Object System.Management.Automation.PSCredential('TESTLAB\dfm.a', $SecPassword)
+Get-ForestTrust -Forest "external.local" -Credential $Cred
+
+Return trusts for the "external.local" forest using the specified alternate credenitals.
+
+## PARAMETERS
+
+### -Forest
+Specifies the forest to query for trusts, defaults to the current forest.
+
+```yaml
+Type: String
+Parameter Sets: (All)
+Aliases: Name
+
+Required: False
+Position: 1
+Default value: None
+Accept pipeline input: True (ByPropertyName, ByValue)
+Accept wildcard characters: False
+```
+
+### -Credential
+A \[Management.Automation.PSCredential\] object of alternate credentials
+for connection to the target domain.
+
+```yaml
+Type: PSCredential
+Parameter Sets: (All)
+Aliases:
+
+Required: False
+Position: Named
+Default value: [Management.Automation.PSCredential]::Empty
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+## INPUTS
+
+## OUTPUTS
+
+### PowerView.DomainTrust.NET
+
+A TrustRelationshipInformationCollection returned when using .NET methods (default).
+
+## NOTES
+
+## RELATED LINKS
+