> ## Documentation Index
> Fetch the complete documentation index at: https://tally.wharflab.com/llms.txt
> Use this file to discover all available pages before exploring further.

# powershell/PSAvoidInvokingEmptyMembers

> Avoid Invoking Empty Members

`powershell/PSAvoidInvokingEmptyMembers` is a PSScriptAnalyzer diagnostic emitted by tally for PowerShell snippets embedded in Dockerfiles.

| Property | Value            |
| -------- | ---------------- |
| Severity | Warning          |
| Category | PSScriptAnalyzer |
| Auto-fix | No               |

## Description

Invoking non-constant members can cause potential bugs. Please double-check the syntax to make sure
that invoked members are constants.

## How

Provide the requested members for a given type or class.

## Examples

### Problematic code

```powershell theme={null}
$MyString = 'abc'
$MyString.('len'+'gth')
```

### Correct code

```powershell theme={null}
$MyString = 'abc'
$MyString.('length')
```

## Source

This rule documentation is adapted from Microsoft's PSScriptAnalyzer documentation for
[AvoidInvokingEmptyMembers](https://github.com/MicrosoftDocs/PowerShell-Docs-Modules/blob/main/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidInvokingEmptyMembers.md),
licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/).
