Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Support Forum
Download Visual Studio Add-In

Terms of Use
Privacy Policy

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)


 
Access PInvoke.net directly from VS: