Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.0.15-preview-old #12

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Binary file added .hypothesis/tmp/tmp8r11lkq4
Binary file not shown.
Binary file not shown.
13 changes: 6 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
FROM mcr.microsoft.com/powershell:lts-7.2-ubuntu-18.04
#FROM mcr.microsoft.com/powershell
FROM mcr.microsoft.com/powershell:lts-7.2-ubuntu-22.04

# Install dependencies and clean up
RUN apt-get update \
&& apt-get install -y curl \
&& curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash \
&& apt-get install -y dotnet-sdk-8.0 \
&& curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash \
&& . /root/.bashrc \
&& nvm install 14.15.5 \
&& npm config set unsafe-perm true \
&& nvm install 18.20.4 \
&& npm install -g autorest \
&& npm install -g dotnet-sdk-2.1 \
&& apt-get -o Acquire::Check-Valid-Until=false install -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
Expand All @@ -18,4 +17,4 @@ RUN mkdir -p /src

WORKDIR /src

CMD [ "bash" ]
CMD [ "bash" ]
154 changes: 154 additions & 0 deletions help/zeronetworks/Add-ZNAssetManager.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
---
external help file:
Module Name: ZeroNetworks
online version: https://github.com/zeronetworks/zero-powershell/tree/master/src/help/zeronetworks/add-znassetmanager
schema: 2.0.0
---

# Add-ZNAssetManager

## SYNOPSIS
Add an asset manager of asset

## SYNTAX

```
Add-ZNAssetManager -AssetId <String> -ManagerIds <String[]> -Permission <Int32> [-AccountName <String>]
[-PassThru] [-Confirm] [-WhatIf] [<CommonParameters>]
```

## DESCRIPTION
Add an asset manager of asset

## EXAMPLES

### Example 1: Add an asset manager to an asset
```powershell
$asset = Search-ZNAsset -Fqdn wc01.posh.local
$user = Get-ZNUser -Search test
Add-ZNAssetManager -AssetId $asset -ManagerIds @($user.Id)
```

This cmdlet adds an asset manager to an asset.

## PARAMETERS

### -AccountName
this value is per customer / partner

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

Required: False
Position: Named
Default value: (Read-ZNJWTtoken $env:ZNApiKey).aud.split(".")[0]
Accept pipeline input: False
Accept wildcard characters: False
```

### -AssetId
assetId to filter on

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

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -ManagerIds
managers id

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

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -PassThru
Returns true when the command succeeds

```yaml
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Permission
2 - Viewer, 3 - Manager

```yaml
Type: System.Int32
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Confirm
Prompts you for confirmation before running the cmdlet.

```yaml
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.

```yaml
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
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

## OUTPUTS

### ZeroNetworks.PowerShell.Cmdlets.Api.Models.IError

## NOTES

## RELATED LINKS

154 changes: 154 additions & 0 deletions help/zeronetworks/Add-ZNAssetOtAssetManager.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
---
external help file:
Module Name: ZeroNetworks
online version: https://github.com/zeronetworks/zero-powershell/tree/master/src/help/zeronetworks/add-znassetotassetmanager
schema: 2.0.0
---

# Add-ZNAssetOtAssetManager

## SYNOPSIS
Add an asset manager of asset

## SYNTAX

```
Add-ZNAssetOtAssetManager -AssetId <String> -ManagerIds <String[]> -Permission <Int32> [-AccountName <String>]
[-PassThru] [-Confirm] [-WhatIf] [<CommonParameters>]
```

## DESCRIPTION
Add an asset manager of asset

## EXAMPLES

### Example 1: Add an asset manager to an OT asset
```powershell
$asset = Get-ZNAssetsOt | where {$_.Fqdn -eq "test"}
$user = Get-ZNUser -Search test
Add-ZNAssetOtAssetManager -AssetId $asset.Id -ManagerIds @($user.Id)
```

This cmdlet adds an asset manager to an OT asset.

## PARAMETERS

### -AccountName
this value is per customer / partner

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

Required: False
Position: Named
Default value: (Read-ZNJWTtoken $env:ZNApiKey).aud.split(".")[0]
Accept pipeline input: False
Accept wildcard characters: False
```

### -AssetId
assetId to filter on

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

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -ManagerIds
managers id

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

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -PassThru
Returns true when the command succeeds

```yaml
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Permission
2 - Viewer, 3 - Manager

```yaml
Type: System.Int32
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Confirm
Prompts you for confirmation before running the cmdlet.

```yaml
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.

```yaml
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
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

## OUTPUTS

### ZeroNetworks.PowerShell.Cmdlets.Api.Models.IError

## NOTES

## RELATED LINKS

Loading