en-US/about_AzureConnectionAssistant.help.txt

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
TOPIC
    about_AzureConnectionAssistant

SHORT DESCRIPTION
    A module to assist with connecting to and validating a connection to an Azure RM Subscription.

LONG DESCRIPTION
    The following functions allows for the saving and retrieving of encrypted credentials from the HKCU hive of the , and to validate
    or connect to an Azure RM Subscription.

    Test-Session: Initiates a check to see if you are have a current Azure Login session, if it finds you don't, it prompts you to select credentials
                        saved in the Registry.

    New-AzureRMLogin: Used by Test-Session to connect to Azure using credentials saved in the Registry of the user.

    Get-SavedCreds: Retrieves a credential that is stored in the registry.

    Show-SavedCreds: Displays credentials that are stored in the registry.

    New-SavedCreds: Used to add a new credential set to the registry.

    Set-SavedCreds: Used to update an exisiting stored credentual.

    Created by: Scott Thomas - scott@deathbyvegemite.com
    Copyright (c) 2017. All rights reserved.

    THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND. THE ENTIRE RISK
    OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE USER.

EXAMPLES
# Test-Session
    PS C:\> Test-Session
    No session found or No local credentials stored.
    Please select from the following
    1: MyAzureCreds
    2: To enter credentials manually (Needed for any Federated credentials)
    Select: : 1

    Environment : AzureCloud
    Account : scott@examplenotreal.com
    TenantId : 123e7e65-2654-43c1-b123-caf99f844a69
    SubscriptionId : 5095e43d-2fee-4c98-bd73-b7c5c7e01012
    SubscriptionName : Pay-As-You-Go
    CurrentStorageAccount :

    PS C:\>


# Get-SavedCreds
    PS C:\> $creds = Get-SavedCreds MyAzureCreds
    PS C:\> $creds
    UserName Password
    -------- --------
    scott@examplenotreal.com System.Security.SecureString

    PS C:\>

# Show-SavedCredentials
    PS C:\> Show-SavedCreds -ShowPasswords

    Name UserName Password
    ---- -------- --------
    MyAzureCreds scott@examplenotreal.com P@s$W0rd!

    PS C:\>


#New-SavedCreds
    PS C:\> $creds = Get-Credential scott@examplenotreal.com
    PS C:\> New-SavedCreds -CredName MyAzureCreds -Creds $creds
        Hive: HKEY_CURRENT_USER\System\CurrentControlSet\SecCreds
    Name Property
    ---- --------
    MyAzureCreds

    UserName : scott@examplenotreal.com
    PSPath : Microsoft.PowerShell.Core\Registry::HKEY_CURRENT_USER\System\CurrentControlSet\SecCreds\MyAzureCreds
    PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_CURRENT_USER\System\CurrentControlSet\SecCreds
    PSChildName : MyAzureCreds
    PSDrive : HKCU
    PSProvider : Microsoft.PowerShell.Core\Registry

    Password : cAOSp3ihzlAtXC8vSzI9TYBHHpGGIV3SnbCQMJJQMZ7AjPDkcIXL0UpKqZ1tw1TLstQtIsUhGhHsfntYYnz1eKEMAh1vuR5vy9oPRkgNA3LibSINV2Ku4AYIKwwSW5sAefEYaxrxAPOsY2OOgX1B0w6KHUShEpy9U2HQxiOSEk
                   tDR12J9Ir1q4NCALIvpnfB6iEMFYJfY80bqvyTjmcpTlBpVNbja2rGHeXGj5yzWOeuluSqH6MX9IT963Ruoy1QPYIJSiWN8KIEDvbLs8vciGaU4v3o2G1gajl0KY5iuQ32p8sbwiIU8RzjfPg9Hmi5f3mt
    PSPath : Microsoft.PowerShell.Core\Registry::HKEY_CURRENT_USER\System\CurrentControlSet\SecCreds\MyAzureCreds
    PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_CURRENT_USER\System\CurrentControlSet\SecCreds
    PSChildName : MyAzureCreds
    PSDrive : HKCU
    PSProvider : Microsoft.PowerShell.Core\Registry

    PS C:\>


#Set-SavedCreds
    PS C:\> $creds = Get-Credential scott@examplenotreal.com
    PS C:\> Set-SavedCreds -CredName MyAzureCreds -Creds $creds
    True
    PS C:\>

KEYWORDS
    Login-AzureRmAccount, AzureRM, SavedCreds.