• 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.

  • This is not working. I copy cmd.exe over osk.exe, sethc.exe, UtilMan.exe. Then I restart the computer and get to the Login screen — and MS Defender has restored the files already. Rebooting again into Safe Mode is pointless: it is too late. (And yes, I did try it!)
    Maybe MS has moved the Defender check earlier in the boot process, but you need to disable MS Defender BEFORE performing the cmd.exe copy and rebooting. Is that possible? Unless there is a way of booting into Safe Mode /without/ visiting the login screen first…

  • 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

  • Hi Leos,
    exceptional deep diving in a complex topic. I lost 4 days with different success, but now it is all crystal clear. Great work well done!

    It helped me, to add my 2016 core Server IP and Bios name into the hosts file (C:WindowsSystem32driversetc) because addressing with an IP causes further problems.

  • 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.

  • What about Linux GUI applications? How do those appear in WSL 2?

  • Nice post, thank you!

    I want to dynamically create an Azure Container Group with multiple instances.
    How to create an array of containers($containers) in Powershell syntax? I tried ArrayList, but with no luck:

    New-AzContainerGroup -Name $MyContainerGroup -ResourceGroupName $MyResourceGroup -Location $Location -Container $containers -ImageRegistryCredential $imageRegistryCredential -RestartPolicy Never

    Thanks!

  • 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!

  • How amazing that this 2018 article is still relevant. As we increasingly understand, IPv6 was “a 1990’s solution to a 1980’s problem” (Geoff Huston, July 2020), which is exactly what Mario describes above.

    RE: IPv6 “prevented the gradual evolution of IPv4”
    Yeah, you hit the nail on the head!
    Eight years after reading this insightful article, I and my small research team at Peking University have managed to propose something to effectively extend the life span of IPv4, shamelessly termed “A Long Term Evolution Approach” of IPv4.

    In case you guys are interested in taking a look at the full paper, the download link is here:
    https://ipswen.net/Research/IFIP-Networking-2022-Paper-41_download.pdf

    FYI, here’s a little discussion on Twitter:

    P.S. ‘ the “Internet Engineering Task Force” had no clue at all…’
    Good point. Here’s another quote from Geoff Huston
    ![](https://www.potaroo.net/ispcol/2022-04/hopbyhop.html):
    “Many years ago, the IETF tried to distinguish itself from other technology standards bodies… It seems to me that the ensuing years have eroded these IETF aspirations. It appears that the IETF has decided that volume is far easier to achieve than quality. These days, what the IETF is generating as RFCs is pretty much what the IETF accused the OSI folk of producing back then: Nothing more than voluminous paperware about vapourware!”

  • IPv6 is reminiscent of an earlier era. When every PC used a modem, dedicated IP, BGP routes, e-mail. When programs required open ports. When Novell NetWare auto-configured addresses, no DHCP. Such things already existed.

    Computing evolved into the cloud. There could be hundreds of sites running over the same IP.

    Maybe the world went IPvAgnostic. Just type the URL into your phone or PC. The ISP may have v6, v4, NAT444, NAT64, /128, /64. Today a home user is not heard by the ISP. These long ago became cheap.

  • 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. ?

  • Very useful!
    I am creating a script to generate the expiring certificates and email them to our it department.
    I am creating a new user for this however, I have not figured out how to set the user up to run this script without making them a domain administrator.
    Any suggestions?

  • Hi Wolfgang
    When i try to personalize things, it is asking for product key.

  • Hi Emanuel!

    I finally got it!

    I just had to use Select-Object’s limiter command!

    PS C:Windowssystem32> Invoke-Command -VMName Win10VMTest004 -ScriptBlock {
    $InterfaceAlias2 = Get-NetAdapter | Select-Object -First 1 -ExpandProperty InterfaceAlias
    $InterfaceIndex2 = Get-NetAdapter | Select-Object -First 1 -ExpandProperty InterfaceIndex
    If ($InterfaceAlias2 -eq “Ethernet 2”)
    {
    $InterfaceIndex4Set = $InterfaceIndex2
    Write-Output $InterfaceIndex4Set, $InterfaceAlias2
    }}
    cmdlet Invoke-Command at command pipeline position 1
    Supply values for the following parameters:
    7
    Ethernet 2

    This solution I got just from browsing backwards to the basics!

    Thank you!!!

  • Hi Emanuel!

    You’re right. 🙂

    These codes are meant to simulate if I’ll be able to get the value of InterfaceIndex once I encounter a value of ‘Ethernet 2’ in InterfaceAlias. I’ve made $InterfaceIndex4Set just so I can ‘see’ what’s inside it, after the movement of whatever is inside of InterfaceIndex. However, the obvious obstacle for me is that InterfaceIndex keeps on giving out 2 values, which is ‘7’ and ‘4’. I only need the 1st value of ‘7’ to appear once the IF statement gets satisfied with an InterfaceAlias value of ‘Ethernet 2’.

    What I want to do is to get all InterfaceAlias ‘Ethernet 2’ (and nothing else) and then use it’s corresponding InterfaceIndex, which should also have one value only. But I always get 2 values.

    Thank you!

  • No details about the permissions the program requires to accomplish this magic?
    Does this work WITHOUT giving the application domain admin access?

  • Load More
© 4sysops 2006 - 2022

CONTACT US

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

Sending

Log in with your credentials

or    

Forgot your details?

Create Account