• Ronnie Wong

    @eric-tang,

    I'm waiting to here some information on what has occurred here, hopefully it will be resolved soon.

    posted in ITIL read more
  • Mike Rodrick

    @Waqkas-Ahmed ,

    What are you trying to do with the If ($existing -eq $null) statement? In this script, I believe it will always be null, since the variable $existing is never set to anything.

    Also, the account is created, or fails, when you run the New-LocalUser cmdlet
    $Account = New-LocalUser -Name $TrimmedUserName
    before the if statement is run. We would need to move this command inside the if statement.

    We can use the Get-LocalUser cmdlet to test if a username exists. Then we can use that boolean to control our if statement. Something like this

    $NewLocalUserName = Read-Host -Prompt "Enter a name for the new user"
    $TrimmedUserName = $NewLocalUsername.TrimEnd()
    $group1 = "Power Users"
    $group2 = "Remote Desktop Users"
    # $Password
    $exists = Get-LocalUser -Name $TrimmedUserName -ErrorAction SilentlyContinue
    
    if (!$exists) {
        $Account = New-LocalUser -Name $TrimmedUserName
        Write-Host "Creating new local user $Account. `n"
        Write-Host "Adding $Account to the $group1 group."
        net localgroup "Power Users" "$Account" /add
        Write-Host "Adding $Account to the $group2 group."
        net localgroup "Remote Desktop Users" "$Account" /add
        Write-Host "Ensuring password for $Account never expires."
        WMIC USERACCOUNT WHERE "Name='$Account'" SET PasswordExpires=FALSE
    }
    else {
        Write-Host "Username already exists"
       # Write-Host "Setting password for existing local user $Username."
       # $existing.SetPassword($Password)
    }
    
    

    posted in Microsoft read more
  • Mike Rodrick

    Hey @Waqkas-Ahmed ,

    One solution would be to prompt them for the name first. Then you can trim the name before you pass it to the New-LocalUser cmdlet.

    $NewLocalUserName = Read-Host -Prompt "Enter a name for the new user"
    $TrimmedUserName = $NewLocalUsername.TrimEnd()
    
    
    $Account = New-LocalUser -Name $TrimmedUserName
    
    $Password
    
    if ($existing -eq $null) {
    Write-Host "Creating new local user $Account."
    
    Write-Host "Adding local user $Username to $group."
    & net localgroup "Power Users" "$Account" /add
    & net localgroup "Remote Desktop Users" "$Account" /add
    }
    else {
    Write-Host "Setting password for existing local user $Username."
    $existing.SetPassword($Password)
    }
    Write-Host "Ensuring password for $Account never expires."
    & WMIC USERACCOUNT WHERE "Name='$Account'" SET PasswordExpires=FALSE
    

    I'm not sure what you are trying to do with the password. Since you are not providing a password when running New-LocalUser, it is prompting them to enter a password. It is stored as a secure string, which doesn't have a trim method. You want them to change it again?

    Let me know and we can fix that too. Hope this helps.

    posted in Microsoft read more
  • wes-bryan

    Great question @Robert when it comes to switching, the layer 2 information is going to be MAC address to port mappings. Switches can contain an ARP table for management. However, if the managed switch operates at layer 3, then it will also have an ARP table (Layer 3) to map MAC addresses to IP addresses, like routers do.

    posted in CompTIA read more
  • Ronnie Wong

    @danny-swarbrick,

    Please submit this by clicking on Course Request link in our Course Library. This is the official way that ITProTV tracks these requests. It makes sure that I don't forget to mention it. Thanks for suggestion!

    posted in General Discussion read more
  • Ronnie Wong

    @brian-carson,

    "...there are issues with radius and external authentication, although it is 
    probably fixed by now for basic auth; I use either AD or TACACS without issue."
    
    Thanks for writing, Todd
    

    posted in Cisco read more
  • Ronnie Wong

    @brian-carson,

    I hope he'll answer my message to him...but I'm not sure either. The only thing that I can even think of is that the whole authentication process with RADIUS is not protected and only the password is encrypted...I wish I could tell you this is what was on Lammle's mind but I'm not sure it was.

    posted in Cisco read more
  • Ronnie Wong

    @brian-carson,

    Apologies for the delay...
    I was hoping to hear from Mr. Lammle himself on this question. I've reached out to him. But I'll asked the other guys here to see if they know of any reason this would be the case and try to see if we can find if this is a logical reason or just a preferential reason for his choice.

    posted in Cisco read more
  • Angie

    @michael-mckenney Hi Michael! Thanks for the kind words and we are glad you are enjoying the ITProTV. We appreciate any personal recommendations you can provide to your community. We only allow official partners to display our logo but thank you for being such a fan!

    posted in General Discussion read more
  • A
    Adam Gordon

    Michael,

    I hope all is well. I am not sure if I understand your question correctly, so please advise me if the information that I am providing makes sense after you take a look, and we can clarify as needed.

    Because your VM's tools are "Guest Managed", that means that they cannot be updated or upgraded via vCenter (vSphere Web Client or vSphere client) or directly via the vSphere Host Client.

    Instead, you use OSP''s to manage and update the tools natively from within the Linux Guest O/S directly leveraging whatever update mechanism is supported natively.

    If you are not familiar with OSPs, check out the link below to see what versions are available/supported:

    https://www.vmware.com/support/packages.html

    VMware provides OSPs for older operating systems. For newer operating systems, the vendor or community provides open-vm-tools as part of the operating system, and VMware recommends that you use the open-vm-tools that come with these operating systems. VMware does not provide OSPs for operating system for which open-vm-tools are available. To learn more about open-vm-tools, see the following:

    https://github.com/vmware/open-vm-tools

    This article "VMware support for open-vm-tools (2073803)" has some good summary info on the open-vm-tools, maily the same info to be found on the GitHub Repo that I point you to above, but almost at the very bottom of the article is a blurb about the release schedule for open-vm-tools and being able to subscribe to the list for release announcements, which I would advise you do if you want to stay current.

    https://kb.vmware.com/s/article/2073803

    I hope that helps to answer the question, but if not, please be in touch as needed and I can adjust to help you as needed in a more specific way.

    Good Luck !!!

    Cheers,

    Adam

    posted in General Discussion read more