Skip to content

Commit

Permalink
Merge pull request #23 from Smalls1652/development
Browse files Browse the repository at this point in the history
Merge development changes to stable for 2021.01.00 release.
  • Loading branch information
Smalls1652 authored Feb 4, 2021
2 parents 926012a + 1f960d5 commit e36b0f3
Show file tree
Hide file tree
Showing 55 changed files with 1,825 additions and 93 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
build/
tests/

MdatpPwsh.dll-Help.xml

.DS_Store

# User-specific files
Expand Down
11 changes: 10 additions & 1 deletion BuildModule.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ $ScriptLocation = $PSScriptRoot
$csProjectDir = [System.IO.Path]::Combine($ScriptLocation, "src\")
$csProjectPublishDir = [System.IO.Path]::Combine($csProjectDir, "bin\", "Debug\", "netstandard2.1\", "publish\")

$helpDocsDir = [System.IO.Path]::Combine($ScriptLocation, "help-docs\")
$enusHelpDocs = [System.IO.Path]::Combine($helpDocsDir, "locale\", "en-us\")
$compiledHelpDir = [System.IO.Path]::Combine($helpDocsDir, "compiled\")
$compiledHelpFile = [System.IO.Path]::Combine($compiledHelpDir, "MdatpPwsh.dll-Help.xml")

Import-Module -Name "platyPS"
New-ExternalHelp -Path $enusHelpDocs -OutputPath $compiledHelpDir -Force

$buildDir = [System.IO.Path]::Combine($ScriptLocation, "build\")
$buildModuleDir = [System.IO.Path]::Combine($buildDir, "mdatp-pwsh\")

Expand All @@ -18,7 +26,8 @@ $filesToCopy = [System.Collections.Generic.List[string[]]]@(
([System.IO.Path]::Combine($ScriptLocation, "module-manifest\", "mdatp-pwsh.psd1")),
([System.IO.Path]::Combine($csProjectPublishDir, "MdatpPwsh.dll")),
([System.IO.Path]::Combine($csProjectPublishDir, "Microsoft.Identity.Client.dll")),
([System.IO.Path]::Combine($csProjectPublishDir, "System.Text.Json.dll"))
([System.IO.Path]::Combine($csProjectPublishDir, "System.Text.Json.dll")),
$compiledHelpFile
)

Push-Location -Path $csProjectDir
Expand Down
74 changes: 74 additions & 0 deletions help-docs/locale/en-us/Add-DatpMachineTag.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---
external help file: MdatpPwsh.dll-Help.xml
Module Name: mdatp-pwsh
online version:
schema: 2.0.0
---

# Add-DatpMachineTag

## SYNOPSIS
Add a tag to a machine.

## SYNTAX

```
Add-DatpMachineTag [-MachineId] <String[]> [-TagName] <String> [<CommonParameters>]
```

## DESCRIPTION
Add a tag to a machine in Defender for Endpoint.

## EXAMPLES

### Example 1
```powershell
PS C:\> Add-DatpMachineTag -MachineId "comp-01.contoso.com" -TagName "TestTag-01"
```

Add a tag to the machine 'comp-01.contoso.com' with the name 'TestTag-01'.

## PARAMETERS

### -MachineId
The ID or the FQDN of the machine.

```yaml
Type: String[]
Parameter Sets: (All)
Aliases:

Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -TagName
The name of the tag to add.
```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### System.String[]
## OUTPUTS
### MdatpPwsh.Models.Machine
## NOTES
## RELATED LINKS
37 changes: 37 additions & 0 deletions help-docs/locale/en-us/Connect-DatpGraph.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
external help file: MdatpPwsh.dll-Help.xml
Module Name: mdatp-pwsh
online version:
schema: 2.0.0
---

# Connect-DatpGraph

## SYNOPSIS
Connect to the Defender for Endpoint API.

## SYNTAX

```
Connect-DatpGraph [<CommonParameters>]
```

## DESCRIPTION
Initiates the authentication process to connect to the Defender for Endpoint API.

## EXAMPLES

## PARAMETERS

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

### None
## OUTPUTS

### None
## NOTES

## RELATED LINKS
88 changes: 88 additions & 0 deletions help-docs/locale/en-us/Get-DatpAlert.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
---
external help file: MdatpPwsh.dll-Help.xml
Module Name: mdatp-pwsh
online version:
schema: 2.0.0
---

# Get-DatpAlert

## SYNOPSIS
Get an alert or alerts from Defender for Endpoint.

## SYNTAX

### ListAlerts
```
Get-DatpAlert [[-AlertStatus] <AlertStatus>] [<CommonParameters>]
```

### GetAlert
```
Get-DatpAlert [[-AlertId] <String>] [<CommonParameters>]
```

## DESCRIPTION
Get an alert or all alerts of a specific status from the Defender for Endpoint API.

## EXAMPLES

### Example 1
```powershell
PS C:\> Get-DatpAlert -AlertId "da123456789123456_1234567890"
```

Get an alert by a specific AlertID.

### Example 2
```powershell
PS C:\> Get-DatpAlert -AlertStatus "New"
```

Get all alerts with the status of "New".

## PARAMETERS

### -AlertId
The ID of an alert generated by Defender for Endpoint.

```yaml
Type: String
Parameter Sets: GetAlert
Aliases:

Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -AlertStatus
The current status of the alerts to get.
```yaml
Type: AlertStatus
Parameter Sets: ListAlerts
Aliases:
Accepted values: InProgress, New, Resolved, Unknown

Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### MdatpPwsh.Models.Alert[]
## NOTES
## RELATED LINKS
75 changes: 75 additions & 0 deletions help-docs/locale/en-us/Get-DatpDomainRelated.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
---
external help file: MdatpPwsh.dll-Help.xml
Module Name: mdatp-pwsh
online version:
schema: 2.0.0
---

# Get-DatpDomainRelated

## SYNOPSIS
Get machines or alerts that have interacted with a web domain.

## SYNTAX

```
Get-DatpDomainRelated [-DomainName] <String> [[-Type] <String>] [<CommonParameters>]
```

## DESCRIPTION
Get machines or alerts that have interacted with a web domain.

## EXAMPLES

### Example 1
```powershell
PS C:\> Get-DatpDomainRelated -DomainName "www.reddit.com" -Type Machines
```

Get all machines that have made contact with 'www.reddit.com'.

## PARAMETERS

### -DomainName
The web domain name to search for.

```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Type
The type of objects to return.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Accepted values: Alerts, Machines

Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### MdatpPwsh.Models.Machine[]
## NOTES
## RELATED LINKS
59 changes: 59 additions & 0 deletions help-docs/locale/en-us/Get-DatpDomainStats.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
external help file: MdatpPwsh.dll-Help.xml
Module Name: mdatp-pwsh
online version:
schema: 2.0.0
---

# Get-DatpDomainStats

## SYNOPSIS
Get the stats of a domain in Defender for Endpoint.

## SYNTAX

```
Get-DatpDomainStats [-DomainName] <String> [<CommonParameters>]
```

## DESCRIPTION
Get the stats of a domain in Defender for Endpoint with how often it has been seen in your organization and worldwide.

## EXAMPLES

### Example 1
```powershell
PS C:\> Get-DatpDomainStats -DomainName "www.reddit.com"
```

Get the stats of how prevalent 'www.reddit.com' is.

## PARAMETERS

### -DomainName
The domain name to get stats for.

```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### MdatpPwsh.Models.DomainStats
## NOTES
## RELATED LINKS
Loading

0 comments on commit e36b0f3

Please sign in to comment.