Creates local variables from a data row or dictionary (hashtable).
Import-Variables.ps1 [-InputObject] <PSObject> [-MemberType <PSMemberTypes>] [-Scope <String>] [-Private]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
[^"]+)"\)') {Import-Variables.ps1 $Matches}
Copies $Matches.TypeGuid to $TypeGuid if a match is found.
Invoke-Sqlcmd "select ProductID, Name, ListPrice from Production.Product where ProductID = 1;" -Server 'Server\instance' -Database AdventureWorks |Import-Variables.ps1
Copies field values into $ProductID, $Name, and $ListPrice.
.*?\\)(?<ComExe>[^\\]+$)'){Import-Variables.ps1 $Matches -Verbose}
Sets $ComPath and $ComExe from the regex captures if the regex matches.
Invoke-RestMethod https://api.github.com/ |Import-Variables.ps1 ; Invoke-RestMethod $emojis_url
Sets variables from the fields returned by the web service: $current_user_url, $emojis_url, &c. Then fetches the list of GitHub emojis.
A hash of string names to any values to set as variables, or a DataRow or object with properties to set as variables. Works with DataRows.
Type: PSObject
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
The type of object members to convert to variables.
Type: PSMemberTypes
Parameter Sets: (All)
Aliases: Type
Accepted values: AliasProperty, CodeProperty, Property, NoteProperty, ScriptProperty, PropertySet, Method, CodeMethod, ScriptMethod, Methods, ParameterizedProperty, MemberSet, Event, Dynamic, InferredProperty, Properties, All
Required: False
Position: Named
Default value: Properties
Accept pipeline input: False
Accept wildcard characters: False
The scope of the variables to create.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: Local
Accept pipeline input: False
Accept wildcard characters: False
Indicates that created variables should be hidden from child scopes.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.