LIst disk mappings on an EC2 Instance.
List the disk mappings on an EC2 instance to reference the volume ID with the Windows volume and drive letter.
This function is only supported on EC2 Windows instance.
Get-DiskMappings [<CommonParameters>]
The output type is the type of the objects that the cmdlet emits.
Returns a list of EC2 Instances
Returns a list of EC2 Instances with relevant properties.
Get-EC2InstanceList [[-Name] <String>] [[-InstanceId] <String>] [[-Filter] <String>] [[-ProfileName] <String>] [-HideProgress] [<CommonParameters>]
| Name | Alias | Type | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|---|
| String | Returns a single instance with this name (The value of the Tag: Name) | false | false | |||
| String | Returns a single instance with this instance Id/ | false | false | |||
| String | Returns instances that match the filter. The filter is a string in the format "Property=Value;Property=Value" Values can be multiple values separated by commas. These are a logical OR comparison. Multiple filters are a logical AND comparison. To filter on a tag use "tag:TagName=TagValue". For a list of valid filter properties see the -Filter parameter of the Get-EC2Instance command in the AWS.Tools.EC2 documentation. https://docs.aws.amazon.com/powershell/latest/reference/items/Get-EC2Instance.html |
false | false | |||
| String | The saved EC2 profile to used to retrieve the data. | false | false | |||
| SwitchParameter | false | false | False |
The output type is the type of the objects that the cmdlet emits.
Name : AWSWORKATOPROD2
InstanceId : i-08001da8c43088586
InstanceState : running
InstanceType : t3a.xlarge
ImageId : ami-0a0ebee827a585d06
AvailabilityZone : us-east-1b
SecurityGroup : Any-Any_Internal_IP-ICMP
KeyName : PRODUCTION-KEY
PrivateIpAddress : 10.7.52.212
PrivateDnsName : ip-10-7-52-212.ec2.internal
PublicIPAddress :
PublicDNSName :
SubnetId : subnet-d2b9f98f
Subnet : PRIVATE-1b
LaunchTime : 2/10/2025 3:55:58 PM
Platform : Windows
Instance : Amazon.EC2.Model.Instance
ProcessorMgr : AMD
ProcessorArchitecture : {x86_64}
ProcessorCPUs : 4
ProcessorCores : 2
ProcessorClockSpeed : 2.2
InstanceStorageSupported : True
InstanceStorageNvmeSupport : required
InstanceStorageEncryption : required
InstanceStorageSize : 237
InstanceStorageType : ssd
Memory : 16
Tags : {Environment, Landscape, Class, backupAction…}
EnaSupported : required
NetworkPerformance : Up to 5 Gigabit
AccountId : 268928949034
Get-EC2InstanceList -Name "MyInstance" Returns a single instance with the name "MyInstance"EXAMPLE 2
Get-EC2InstanceList -Filter "tag:Name=MyInstance;tag:Environment=Production" Returns instances with the tag Name=MyInstance and Environment=ProductionEXAMPLE 3
Get-EC2InstanceList -Filter "private-ip-address=10.7.48.*" Returns instances with a private IP address that starts with 10.7.48EXAMPLE 4
Get-EC2InstanceList -Filter "instance.group-name=MYSecurityGroup" Returns instances that are in the security group MYSecurityGroup.EXAMPLE 5
Get-EC2InstanceList -Filter "instance-state-name=running;tag:Environment=Production" Returns instances that are running and have the tag Environment=ProductionEXAMPLE 6
Get-EC2InstanceList -InstanceId "i-1234567890abcdef0" Returns a single instance with the instance Id "i-1234567890abcdef0"EXAMPLE 7
Get-EC2InstanceList Returns all instances.
Returns the permissions assigned to this group.
Returns an object containing the permissions and policies assigned to a group.
Get-IAMGroupPermissions [-GroupName] <String> [<CommonParameters>]
| Name | Alias | Type | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|---|
| String | The name of the group. | true | true (ByPropertyName) |
The output type is the type of the objects that the cmdlet emits.
Returns the permissions assigned to a role.
Returns an object containing the permissions and policies assigned to a role.
Get-IAMRolePermissions [-RoleName] <String> [<CommonParameters>]
| Name | Alias | Type | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|---|
| String | The name of the role. | true | true (ByPropertyName) |
The output type is the type of the objects that the cmdlet emits.
Returns permissions assigned to a user.
Returns an object containing user information and the permissions and policies assigned to a user.
Also contains a collection of group objects the User is a member of (See Get-IAMGroupPermissions).
Get-IAMUserPermissions [-Username] <String> [<CommonParameters>]
| Name | Alias | Type | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|---|
| String | The Name of the user. | true | true (ByPropertyName) |
The output type is the type of the objects that the cmdlet emits.
List S3 Folders
This function emulates working with folders "Common prefixes" in S3. It will list the files and top level prefixes for a given bucket and prefix.
Get-S3Folder [-BucketName] <String> [[-Prefix] <String>] [-Files] [-Folders] [[-MaxServiceCallHistory] <Int32>] [<CommonParameters>]
| Name | Alias | Type | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|---|
| String | The name of the bucket | true | false | |||
| String | The prefix to list. | false | false | |||
| SwitchParameter | Only return the files in the top level prefix. | false | false | False | ||
| SwitchParameter | Only return the folders in the top level prefix | false | false | False | ||
| Int32 | To get the common prefixes we call the $AWSHistory.LastCommand. By default that only returns the last 10 commands. So we set this to 50 as our default. This is usually fine for most uses unless you have a prefix with lot of sub-prefixes and files. |
false | false | 50 |
The output type is the type of the objects that the cmdlet emits.
Display the progress of a Glacier Restore.
Get-S3RestoreProgress -BucketName <String> [-Prefix <String>] [<CommonParameters>] Get-S3RestoreProgress -BucketName <String> [-Key <String>] [<CommonParameters>]
| Name | Alias | Type | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|---|
| String | The bucket name. | true | false | |||
| String | The prefix to check the restore progress. Required if Key is omitted. | false | false | |||
| String | The full key of an object to check. Required if Prefix is omitted. | false | false |
The output type is the type of the objects that the cmdlet emits.
Restore an S3 folder, i.e. "common prefix", from Glacier.
AWS Powershell Tools for S3 only has the ability to restore a single s3 object from glacier.
This function allows you to restore all object with a common prefix.
Restore-S3Folder [-BucketName] <String> [-Prefix] <String> [-CopyLifetime] <Int32> [-Tier] <String> [<CommonParameters>]
| Name | Alias | Type | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|---|
| String | The bucket name. | true | false | |||
| String | The Prefix to restore. | true | false | |||
| Int32 | The Number of days to keep the restored objects before returning them to glacier. | true | false | 0 | ||
| String | The storage tier to restore the objects to. Valid entries are Standard, Expedited, Bulk | true | false |
The output type is the type of the objects that the cmdlet emits.
Creates a Secrets vault and sets the option configuration parameters.
Note: If you plan to use this vault for automation purposes you must set Authentication and Interaction to 'None'.
Set-SecretVault [-VaultName] <String> [[-Authentication] <String>] [[-Interaction] <String>] [<CommonParameters>]
| Name | Alias | Type | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|---|
| String | The Name of the vault. | true | false | |||
| String | The type of Authentication, Either 'Password' or 'None' | false | false | |||
| String | Allow or suppress user interaction. Either 'Prompt' or 'None'. If set to none and the vault requires a password an error will occur. | false | false |
Creates a secure entry in the aws credentials file.
Creates a secure entry in the AWS Credentials file. The AWS Keys are stored in a Secret vault created by Set-SecretVault.
This credential entry uses a credential process. This process calls a script based on the Operating System.
For Windows: credential_process.cmd
For Linux/Mac: credential_process.sh
Copy the appropriate file into a directory that is in the path.
For Linux the best place is ~/.local/bin
For Windows any directory that is in the path. For optimal security create a folder under the user profile and add that path to the User section of the Path Environment variable configuration.
Set-SecureAWSCredentials [-ProfileName] <String> [[-AccessKeyId] <String>] [-SecretAccessKey] <String> [[-SessionToken] <String>] [-Region] <String> [[-Expiration] <DateTime>] [[-VaultName] <String>] [<CommonParameters>]
| Name | Alias | Type | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|---|
| String | The name of the profile. To set a default profile you must name the profile default. | true | false | |||
| String | The AWS Access Key ID. | false | false | |||
| String | The AWS Secret Access key. | true | false | |||
| String | A Session Token for this credential. | false | false | |||
| String | The AWS Region for this profile. | true | false | |||
| DateTime | An option expiration date, the stored secret will expire after this date/time. | false | false | |||
| String | An optional vault name. If omitted, the secret will be created in the default vault. | false | false |