Skip to content

Commit 9f4df46

Browse files
committed
Added Get-NtLocallyUniqueId command.
1 parent b56ac50 commit 9f4df46

2 files changed

Lines changed: 18 additions & 1 deletion

File tree

NtObjectManager/NtObjectManager.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ FunctionsToExport = 'Get-AccessibleAlpcPort', 'Set-NtTokenPrivilege',
6666
'Get-RpcClient', 'Format-RpcClient', 'Set-RpcServer', 'Connect-RpcClient', 'New-RpcContextHandle', 'Format-RpcComplexType',
6767
'Get-Win32File', 'Close-NtObject', 'Start-AccessibleScheduledTask', 'Get-NtEaBuffer', 'Set-NtEaBuffer',
6868
'Suspend-NtProcess', 'Resume-NtProcess', 'Stop-NtProcess', 'Suspend-NtThread', 'Resume-NtThread', 'Stop-NtThread',
69-
'Format-NtToken', 'Remove-NtTokenPrivilege', 'Get-NtTokenPrivilege'
69+
'Format-NtToken', 'Remove-NtTokenPrivilege', 'Get-NtTokenPrivilege', 'Get-NtLocallyUniqueId'
7070

7171
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
7272
CmdletsToExport = 'Add-NtKey', 'Get-NtDirectory', 'Get-NtEvent', 'Get-NtFile',

NtObjectManager/NtObjectManager.psm1

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5116,4 +5116,21 @@ function Stop-NtThread
51165116
}
51175117
}
51185118
}
5119+
}
5120+
5121+
<#
5122+
.SYNOPSIS
5123+
Gets a new Locally Unique ID (LUID)
5124+
.DESCRIPTION
5125+
This cmdlet requests a new LUID value.
5126+
.INPUTS
5127+
None
5128+
.OUTPUTS
5129+
NtApiDotNet.Luid
5130+
.EXAMPLE
5131+
Get-NtLocallyUniqueId
5132+
Get a new locally unique ID.
5133+
#>
5134+
function Get-NtLocallyUniqueId {
5135+
[NtApiDotNet.NtSystemInfo]::AllocateLocallyUniqueId() | Write-Output
51195136
}

0 commit comments

Comments
 (0)