en-US/about_POSH-Oceanstor.help.txt
|
TOPIC about_POSH-Oceanstor SHORT DESCRIPTION Describes the POSH-Oceanstor PowerShell module for Huawei OceanStor DeviceManager REST operations. LONG DESCRIPTION POSH-Oceanstor is a PowerShell module for working with Huawei OceanStor storage arrays through the DeviceManager REST API. The module includes commands for connecting to arrays, reading inventory and configuration data, exporting reports, managing hosts and initiators, creating storage resources, managing mapping views and groups, and working with LUN and file-system snapshots. Array system configuration commands cover NTP, SNMP, syslog, local users, and roles. The module was originally focused on OceanStor V3 arrays. Current commands also include support for V6 object shapes where the module can detect the connected array version. Some features are available only on specific OceanStor versions, licenses, or array configurations. GETTING STARTED Import the module and connect to an array: Import-Module POSH-Oceanstor Connect-deviceManager -Hostname 10.0.0.1 By default, Connect-deviceManager caches the session in a module-scoped variable. Most commands use that cached session automatically when WebSession is not specified. To work with more than one array, return the session object and pass it to commands with WebSession: $arrayA = Connect-deviceManager -Hostname 10.0.0.1 -PassThru $arrayB = Connect-deviceManager -Hostname 10.0.0.2 -PassThru Get-DMSystem -WebSession $arrayA Get-DMSystem -WebSession $arrayB AUTHENTICATION Connect-deviceManager supports an interactive credential prompt, a PSCredential object, or a username with a SecureString password: $credential = Get-Credential $session = Connect-deviceManager -Hostname 10.0.0.1 -PassThru -Credential $credential $securePassword = Read-Host -AsSecureString $session = Connect-deviceManager -Hostname 10.0.0.1 -PassThru -LoginUser admin -LoginPwd $securePassword Avoid storing plain-text passwords in scripts. TLS certificates are validated by default. For lab or test arrays that use self-signed certificates, use SkipCertificateCheck explicitly: $session = Connect-deviceManager -Hostname 10.0.0.1 -PassThru -Credential $credential -SkipCertificateCheck COMMAND AREAS Discovery and inventory: Get-DMSystem Get-DMstoragePool Get-DMlun Get-DMFileSystem Get-DMhost Get-DMdisk Get-DMAlarm Array system configuration: Get-DMNtpServer Get-DMSnmpConfig Get-DMSnmpTrapServer Get-DMSyslogNotification Get-DMLocalUser Get-DMRole Connectivity and host access: Get-DMFiberChannelInitiator Get-DMIscsiInitiator Get-DMNvmeInitiator Get-DMHostLink Add-DMLunToLunGroup Add-DMHostGroupToMappingView Add-DMPortGroupToMappingView Resource creation: New-DMLun New-DMFileSystem New-DMdTree New-DMCifsShare New-DMnfsShare New-DMHost New-DMMappingView Snapshot operations: Get-DMLunSnapshot New-DMLunSnapshot Enable-DMLunSnapshot Restore-DMLunSnapshot Get-DMFileSystemSnapshot New-DMFileSystemSnapshot Restore-DMFileSystemSnapshot Get-DMSnapshotConsistencyGroup Reporting and export: Export-DeviceManager Export-DMInventory Export-DMStorageToExcel REPORTING Export-DMInventory and Export-DMStorageToExcel write Excel workbooks. These commands require the ImportExcel module. Install-Module -Name ImportExcel Export-DeviceManager returns an OceanStor storage view object that can be reused by report commands or inspected directly: $storage = Export-DeviceManager -Hostname 10.0.0.1 Export-DMStorageToExcel -OceanStor $storage -ReportFile C:\Temp\OceanStor.xlsx -IncludeObject full Export-DMStorageToExcel -OceanStor $storage -ReportFile C:\Temp\OceanStor-Config.xlsx -IncludeObject configuration SAFETY AND CONFIRMATION Many create, association, remove, restore, and snapshot commands support ShouldProcess. Use -WhatIf to preview changes when available: Remove-DMLun -LunName lun01 -WhatIf Restore-DMLunSnapshot -SnapshotName snap_lun01 -WhatIf Destructive operations can delete data or roll back newer data. Review the command-specific help before running remove or restore commands. To view full help for any command: Get-Help New-DMLun -Full Get-Help Restore-DMFileSystemSnapshot -Full NOTES Module version: 0.9.5 Minimum PowerShell version: 6.0 Command help is available for all public commands. Use Get-Command -Module POSH-Oceanstor to list exported commands. RELATED LINKS Get-Command Get-Help Connect-deviceManager Export-DeviceManager https://support.huawei.com/enterprise/en/doc/EDOC1100136666 https://support.huawei.com/enterprise/en/doc/EDOC1100324309 |