• Ameen joined the group Group logo of PowerShellPowerShell 1 month ago

  • How I can uninstall without reboot?

  • Thanks for the response. I deal with people that have lingering old OSes so I try to figure these out. Unfortunately, they have less memory on those things so it was easier remoting in and changing it manually. Just going to focus on Windows 10. Still curious why so hard to get an alias.

  • Hi, Joe.
    Unfortunately, I know from experience the feeling of clients with old stuff. Win7 is not even the worst offender. If I throw a stick I’d easily hit a couple of Win2003 Servers. I don’t have to maintain them (nobody is maintaining them, actually), but fortunately they’re for some other project, (physically) disconnected from mine.
    Anyway. The command should work in PS5.1 (or higher, if possible on Win7). I renamed a NIC to Local Area Network, and ran
    [powershell]Get-NetAdapter | where InterfaceAlias -Like “Local*” | Format-List [/powershell]
    and it worked fine.

    Name : Local Area Network
    InterfaceDescription : Intel(R) Ethernet Connection (4) I219-LM
    InterfaceIndex : 17

  • Hi, Joe. You could try to install PowerShell 5.1 on Windows 7. Then you should have the cmdlet available. I say “should”, because… I haven’t tested on Win7. To be honest, I try to keep away from older OSes as much as possible…

    Some info is available here (including download links):

    I hope this helps. Cheers!

  • Thanks for the code. Unfortunately, I tried it on some older OSes. Windows 7. I had great difficulty trying to find alias on that machine. Since it had an older powershell there was not a get-netadapter command. I finally found the alias using the wmic NIC command. It turned out to be Local Area Connection. However, the command did not work saying it could not find that alias. I spent a few hours trying to figure out why but to no avail. It was the only windows 7 device on the network but I was stubborn. Any suggestions? I just changed it manually but still curious.

  • Hi Sitaram / Tech members,

    Question – in servers.txt do we have to mention only the server name(computer name) and
    I have multiple services of my application on windows servers, How can we achieve that?

  • The return of the dialog should be the folder path. If you want the file, you need the FileBrowserDialog instead (almost exactly the same and it returns the full file path). Does that answer the question?

    David F.

  • excellent description, thanks. I get a authorisation error when connting to linux based target. is there anyway to connect ? Microsoft unfortunately removed the iscsi app from Windows 11

  • Hi David
    I was looking for this for longtime. But I have one more questions. I am very new in this scripting world but learning… I am trying to create a script that will install printer package onto remote machine. when I will run the script it will open the dialog box to select the printer package. I got it so far to select now how can I parse that to copy the selected file to the remote machine. I know the copy part but wondering how to use this dialog box part to select in the copy portion. I would appreciate your answer if you can. Thanks a lot in advance.

  • is there any way we can use it with pssession and use invoke command to reach multiple servers?

    like instead of this
    .Get-FileVersionInfoRemotely.ps1 -ComputerName (get-content C:TempComputers.txt) -Path C:Windowssystem32ntoskrnl.exe -OutputFile C:TempOutputFileVer1.csv

    Can we use like this below?

    $Computers = Get-Content “C:TempComputers.txt”

    $Sessions = New-PSSession -ComputerName $Computers
    foreach($line in $Computers)
    Invoke-Command -ComputerName (get-content $line) -FilePath .Get-FileVersionInfoRemotely.ps1 -Path C:Windowssystem32ntoskrnl.exe -OutputFile C:TempOutputFileVer1.csv

    I am unable to run above getting error

    I am not that much good in powershell can someone help so I can reach somany servers using winrm

  • Is there really still no way to automate the login process? I know with Connect-MicrosoftTeams I can very easily pass credentials too it and automate a script. This module would be perfect if I could automate the login process.

  • The PowerShell module psansible.Inventory allows you to simplify the dynamic creation of your Ansible inventory with the help of an Ansible inventory script. You can retrieve data from your preferred sources, structure the data, and create a standardized Ansible inventory.

  • Well, I also introduced you to filtering. And I’d definitely use Where-Object instead of more convoluted syntax and arrays for that purpose.
    Those are great tools and just as essential for other purposed, but not for this. I mentioned them here just to show there are more ways to accomplish something. And I also mentioned there are more ways, and that you should use the most suitable one for each case. 🙂

  • I meant ‘forcing the codes’. Sorry for the typo.

  • I meant ‘forcing the codes…’. Sorry for the typo.

  • Hi Emanuel!

    While happily looking at what I’ve been learning, there’s this realization (and warning) that I’m forching the codes to just ‘stop’ at the 1st record/occurence of ‘Ethernet 2’. What if there’s more? What if the value ‘Ethernet 2’ appears on the 2nd, 3rd, so on…? How will I be able to capture it if it’s not on the 1st record? Meaning, how will I be able to capture ‘Ethernet 2’ in InterfaceAlias when/if I don’t know when it will appear?

    You’ve introduced me to string formatting in your latest reply. Thank you!

  • Hi Alex, I’m telling you that I also have the same error as Luciano, but in my case, according to your comment, I don’t use a signature certificate on my server. ?

  • Load More
© 4sysops 2006 - 2022


Please ask IT administration questions in the forums. Any other messages are welcome.


Log in with your credentials


Forgot your details?

Create Account