How I can uninstall without reboot?
Joe Vasquez commented on
Change remote IP address and DNS entry with a PowerShell script 4 weeks ago
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.
Emanuel Halapciuc commented on
Change remote IP address and DNS entry with a PowerShell script 4 weeks ago
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 : 17Emanuel Halapciuc commented on
Change remote IP address and DNS entry with a PowerShell script 4 weeks ago
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):
https://docs.microsoft.com/en-us/powershell/scripting/windows-powershell/wmf/setup/install-configureI hope this helps. Cheers!
Joe Vasquez commented on
Change remote IP address and DNS entry with a PowerShell script 4 weeks ago
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.
Rohan commented on
Set service startup mode to Automatic (Delayed Start) with PowerShell 1 month ago
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?David Figueroa commented on
How to create an open file/folder dialog box with PowerShell 1 month ago
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.csvCan 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.
Stéphane van Gulick wrote a new post,
Create an Ansible inventory file with psansible.inventory and an Ansible inventory script in PowerShell 1 month ago
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.
Stephen joined the group
PowerShell 1 month ago
Emanuel Halapciuc commented on
Change remote IP address and DNS entry with a PowerShell script 1 month ago
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. 🙂Lee Roy Anthony commented on
Change remote IP address and DNS entry with a PowerShell script 1 month ago
I meant ‘forcing the codes’. Sorry for the typo.
Lee Roy Anthony commented on
Change remote IP address and DNS entry with a PowerShell script 1 month ago
I meant ‘forcing the codes…’. Sorry for the typo.
Lee Roy Anthony commented on
Change remote IP address and DNS entry with a PowerShell script 1 month ago
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!
Fox system commented on
WSUS reporting with PowerShell 1 month, 1 week ago
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. ?
Raza commented on
Create a customized Windows 10 image using PowerShell and Hyper-V 1 month, 1 week ago
Hi Wolfgang
When i try to personalize things, it is asking for product key.- Load More