NAME

Get-RegQWord

SYNOPSIS

Retrieves a 64-bit binary number registry value (REG_QWORD) from local or remote computers.

SYNTAX

Get-RegQWord [[-ComputerName] <>] [[-Hive] <>] [-Key] <> [-Value] <> [-AsHex] [-View] [-Ping] [<CommonParameters>]

DESCRIPTION

 

PARAMETERS

-ComputerName <String[]>

Adds a new member even the object has a custom member with the same name. You cannot use the Force parameter to replace a standard member of a type.

Required? false
Position? 1
Default value $env:COMPUTERNAME
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false

 

-Hive <String>

Adds a new member even the object has a custom member with the same name. You cannot use the Force parameter to replace a standard member of a type.

Required? false
Position? 2
Default value LocalMachine
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

 

-Key <String>

Adds a new member even the object has a custom member with the same name. You cannot use the Force parameter to replace a standard member of a type.

Required? true
Position? 3
Default value  
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

 

-Value <String>

Adds a new member even the object has a custom member with the same name. You cannot use the Force parameter to replace a standard member of a type.

Required? true
Position? 4
Default value  
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

 

-AsHex <SwitchParameter>

Adds a new member even the object has a custom member with the same name. You cannot use the Force parameter to replace a standard member of a type.

Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false

 

-View <RegistryView>

Adds a new member even the object has a custom member with the same name. You cannot use the Force parameter to replace a standard member of a type.

Required? false
Position? named
Default value Default
Accept pipeline input? false
Accept wildcard characters? false

 

-Ping <SwitchParameter>

Adds a new member even the object has a custom member with the same name. You cannot use the Force parameter to replace a standard member of a type.

Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false

 

<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

INPUTS

 

OUTPUTS

PSFanatic.Registry.RegistryValue (PSCustomObject)

NOTES

Author: Shay Levy
Blog : http://PowerShay.com

EXAMPLES

-------------------------- EXAMPLE 1 --------------------------

C:\PS>$Key = "SOFTWARE\MyCompany"

Get-RegQWord -ComputerName SERVER1 -Hive LocalMachine -Key $Key -Value SystemLastStartTime

ComputerName Hive Key Value Data Type
------------ ---- --- ----- ---- ----
SERVER1 LocalMachine SOFTWARE\MyCompany SystemLastStartTime 129057765227436584 QWord


Description
-----------
The command gets the SystemLastStartTime value from SERVER1 server.

-------------------------- EXAMPLE 2 --------------------------

C:\PS>[Environment]::Is64BitProcess

False

PS> Get-RegQWord -Hive LocalMachine -Key SOFTWARE\Mykey -ComputerName Server1 -Value 64DWord -View Registry64

ComputerName Hive Key Value Data Type
------------ ---- --- ----- ---- ----
Server1 LocalMachine SOFTWARE\Mykey 64DWord 100 QWord


Description
-----------
This command is using an elevated 32-bit instance of Windows PowerShell to read values from
a 64-bit registry section of a remote 64-bit server. First we verify that the current console
is a 32-bit instance by using the Is64BitProcess system environment variable.

Connecting to the 64-bit section of the remote server registry is done using the View
parameter.

-------------------------- EXAMPLE 3 --------------------------

C:\PS>Get-RegQWord -ComputerName SERVER1 -Key $Key -Value QWordValue

ComputerName Hive Key Value Data Type
------------ ---- --- ----- ---- ----
SERVER1 LocalMachine SOFTWARE\MyCompany SystemLastStartTime 129057765227436584 QWord


Description
-----------
The command gets the SystemLastStartTime value from SERVER1 server.
You can omit the -Hive parameter (which is optional), if the registry Hive the key resides in is LocalMachine (HKEY_LOCAL_MACHINE).

-------------------------- EXAMPLE 4 --------------------------

C:\PS>Get-RegQWord -CN SERVER1,SERVER2 -Key $Key -Value QWordValue -AsHex

ComputerName Hive Key Value Data Type
------------ ---- --- ----- ---- ----
SERVER1 LocalMachine SOFTWARE\MyCompany SystemLastStartTime 0x1ca815a8be31a28 QWord
SERVER2 LocalMachine SOFTWARE\MyCompany SystemLastStartTime 0x1ca815a8be31a28 QWord


Description
-----------
This command gets the SystemLastStartTime value from SERVER1 and SERVER2.
The command uses the ComputerName parameter alias 'CN' to specify a collection of computer names.
When the AsHex Switch Parameter is used, the value's data returnes in HEX notation.

RELATED LINKS

http://psrr.codeplex.com
Set-RegQWord
Get-RegValue
Remove-RegValue
Test-RegValue

Last edited Jun 11, 2012 at 1:45 PM by Shay, version 3

Comments

No comments yet.