Skip to content

Instantly share code, notes, and snippets.

{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "PreventIAMUserWithLoginprofile",
"Effect": "Deny",
"Action": [
"iam:ChangePassword",
"iam:CreateLoginProfile",
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "DenyAllOutsideEU",
"Effect": "Deny",
"NotAction": [
"a4b:*",
"acm:*",
"aws-marketplace-management:*",
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Deny",
"Action": "*",
"Resource": "*",
"Condition": {
"StringLike": {
"aws:PrincipalArn": "arn:aws:iam::*:root"
@dgwhited
dgwhited / getloggedonuser.ps1
Created May 20, 2013 15:42
Get logged on user
$GetWMIObject = Get-WMIObject Win32_ComputerSystem -Computername $comp1
$UserName = $GetWMIObject.UserName