Desktop Functions: Smart Device Functions:
|
Search Results for "CreateProfile" in [All]userenv
static extern int CreateProfile( [MarshalAs(UnmanagedType.LPWStr)] String pszUserSid, [MarshalAs(UnmanagedType.LPWStr)] String pszUserName, [Out, MarshalAs(UnmanagedType.LPWStr)] System.Text.StringBuilder pszProfilePath, uint cchProfilePath); pszProfilePath's capacity must not exceed 260 characters or CreateProfile will return error code 0x800706f7.
int hResult = CreateProfile(i.Owner.Value, username, s, c);
public static extern int CreateProfile([MarshalAs(UnmanagedType.LPWStr)] String pszUserSid, [MarshalAs(UnmanagedType.LPWStr)] String pszUserName, [Out, MarshalAs(UnmanagedType.LPWStr)] System.Text.StringBuilder pszProfilePath, uint cchProfilePath);
$u=Add-Type -MemberDefinition $TypeDefinition -Name "UserCreateProfile" -Namespace "UserProfile" -UsingNamespace "System.Security.Principal" -PassThru
$u::CreateProfile($identity.Owner.Value, $identity.Name, $ProfilePath, $intSizeOfProfilePath) Sample PowerShell to lookup Domain User / SID for CreateProfile
$u::CreateProfile($strUserSid, $userSamAccountName, $ProfilePath, $intSizeOfProfilePath) |