locked
create a non-administrator user for SAM polling RRS feed

  • General discussion

  • Hello

    I am trying to write a script and attach to Group Policy to do what is mentioned here:

    https://support.solarwinds.com/Success_Center/Server_Application_Monitor_(SAM)/Knowledgebase_Articles/How_to_create_a_non-administrator_user_for_SAM_polling

    what I tried to do in my test environment:

    Register-PSRepository -Name "PSGallery" –SourceLocation "https://www.powershellgallery.com" -InstallationPolicy Trusted

    # WmiNamespaceSecurity: Manages WMI Namespace Security

    Install-Module -Name WmiNamespaceSecurity # -Scope AllUsers

    Install-Module WmiNamespaceSecurityResource

    $Server = $env:COMPUTERNAME

    $UserName = "TestSolarWind"

    $ComputerName = $env:computername

    New-ADUser -Name $UserName -GivenName Test -Surname SolarWind `

    -SamAccountName TestSolarWind -UserPrincipalName TestSolarWind@$DomainName `

    -AccountPassword (Read-Host -AsSecureString "AccountPassword") `

    -PassThru | Enable-ADAccount

    Get-ADUser -Filter * -searchbase 'CN=Users,DC=test,DC=local' | Format-Table -Property Name

    $DomainName = Get-ADDomainController | select Domain

    # Lists Localgroups

    net LocalGroup

    Get-ADGroupMember -identity "Distributed COM Users"

    # Add user to the “Performance Monitor Users” group

    Add-ADGroupMember -identity "Distributed COM Users" -Members 'CN=TestSolarWind,CN=Users,DC=test,DC=local'

    # Add user to the "Performance Monitor Users" group

    Add-ADGroupMember -identity "Performance Monitor Users" -Members 'CN=TestSolarWind,CN=Users,DC=test,DC=local'

    Get-ADGroupMember -identity "Performance Monitor Users"

    # CHECK: Get list of AD groups which $UserName is a member of

    (Get-ADUser $UserName –Properties MemberOf | Select-Object MemberOf).MemberOf

    ##In the Windows Management Instrumentation (WMI) management console, give user the following permissions:

    #a.    Add the user to the Authenticated Users off of Root.

    #b.    Allow Enable Account and Remote Enable permissions.

    PS: .\Set-WmiNamespaceSecurity.ps1 root add test\$UserName enable, remoteaccess

    Now I do not know how to do/script step 8 to 15.

    It would be great someone can help me.



    • Edited by frhling Tuesday, September 4, 2018 12:00 PM
    • Changed type Bill_Stewart Monday, October 22, 2018 2:16 PM
    • Moved by Bill_Stewart Monday, October 22, 2018 2:16 PM This is not third-party support forum
    Tuesday, September 4, 2018 11:58 AM

All replies

  • This is not a support forum for your vendor's software.

    -- Bill Stewart [Bill_Stewart]

    Tuesday, September 4, 2018 4:32 PM