• Thank you for writing this article.
    I wrote all my own Powershell code to install VMs, but on the free Hypervisor-only platform. IMO, it is pointless to host VMs on a GUI based server. The command line based server has far less bloat and better security.

  • If you’re creating complex PowerShell scripts like this, you should already be aware that setting the AllowTelemetry key in the registry, will have the same effect as using the Local Group Policy Editor to set one on of the 4 allowed levels of Data Reporting. You should also be aware that setting it to Zero is only possible on Windows Enterprise and if you choose to do it anyway…. for example, if you set this key to 0 on a Windows Pro copy…. the system will revert to the level of Diagnostic Data that Microsoft sees fit, and this effect will be invisible. You can verify what I’m telling you by simply visiting the relevant Group Policy, setting it to 4 then refresh Regedit (press F5) and watch as the AllowTelemetry key changes to 4. If you’re not on Enterprise then then 1 is the lowest setting you can use.

    Basically, if you don’t know what you’re doing by poking around in the registry, you may very well be enabling more Telemetry while you think you’re turning it off.

    Key: HKLMSOFTWAREPoliciesMicrosoftWindowsDataCollection”AllowTelemetry”

    Local Group Policy: Computer ConfigurationAdministrative TemplatesWindows ComponentsData Collection and Preview BuildsAllow Telemetry (it tells you that you can only set 0 if you’re running Enterprise.)

    *I’d never recommend that anybody run a script that automatically makes a bunch of changes to their Windows in the hopes of tuning it for privacy reasons. The best thing to do is do the research yourself and understand what it is that you’ll be changing.

  • thanks for sharing!
    i am looking to make a script to do a hot clone(booteable) of disk….its posible to achive that on windows?
    Lets imagine:

    i have a 256 SSD disk with the default partitions that windows create….and a second HDD partition (lets say…500gb)

    so idea will be create the same parttion structure in HDD and a extra partition to hold the image of the partitions of SSD…

    launch in powershell the image of the parttions and hold in the extra partitions of HDD and then recover each image in the correspondent copied partitions of HDD…

    have sense?

  • Hi, I installed Windows Server 2016 on my computer, and when I installed it, it asked me which Windows to select. I also selected Windows Server Dasta Center, and after installing Windows on my computer, it asks me I need the administrator password. I do not know, but I do not know what the password. Please help me, thank you

  • 1. Navigate to C:windowssystem32 and search for the Sysprep folder, go to properties and change the ownership of the folder to the local admin by changing the permissions in the Advance menu.
    2.  After you take the ownership of the folder you can open sysprepactionfiles and edit the Generalize.xml and remove the following entry from there:

    3. Save as  the Generalize.xml on any desired location and then rename the existing Generalize.xml to old and replace it with the new one.
    4. Run sysprep Generalize and see if that works for you.

  • Hi,

    Is there anyway to many different ad domain user on different client machines?
    in one step?

    Regards

  • I guess something has changed in PowerShell in the past three years, because despite following this guide to the letter it doesn’t work as described. Not sure why.

  • You said you would discuss changes in version 7 and 7.2, but I didn’t find that in the article.

  • Sometimes unexpected changes can have beneficial effects.

    I run a Server 2019 VM on my daily driver Win10 laptop, which allows me to use WSUS for my home domain by collecting updates where data is cheaper.

    I have been progressively increasing the VM’s RAM allocation to get better performance, but adding a third virtual processor improved things enormously, to the point where I could reduce its RAM by half a gigabyte.

    That might not seem a lot, but don’t forget that the VM is competing with the “normal” tasks on that laptop.

    I have to conclude that the extra “processor” allows the VM to shift its workload more easily, avoiding having to queue things up in memory awaiting the resource.

    The laptop does not seem to suffer much from allocating more CPU time to the VM.

  • Is it possible, or even advisable to clean up in the admx files?

    Like most environments, our domain has been upgraded over time, starting at win2012 DC’s with Win 7 clients.

    Now we’re on 2019 DC’s (soon to be upgraded) with win 10 client´s (the first few Win11 clients are popping up too).
    This all makes GPO management a bit of a hit & miss affair.

    Would a clean up be a good idea?

  • Hi Emanuel!

    Every answer I get is like a new window of knowledge! Thank you!

    I’ve actually used something similar to your 2nd suggestion. In fact, here’s my test code:

    Invoke-Command -VMName Win10VMTest004 -ScriptBlock {
    $InterfaceIndex = Get-NetAdapter | Select-Object InterfaceIndex
    $InterfaceAlias = Get-NetAdapter | Select-Object InterfaceAlias
    Write-Output $InterfaceAlias
    If ($InterfaceAlias -eq “Ethernet 2”)
    {
    $InterfaceIndex = $InterfaceIndex4Set
    Write-Output $InterfaceAlias, $InterfaceIndex4Set
    }}

    However, using the 1st write-output that I’ve placed to trace where the process flows through, I’ve found out that it doesn’t enter or satisfy the IF statement. It displayed this:

    InterfaceAlias PSComputerName RunspaceId
    ————– ————– ———-
    Ethernet 2 Win10VMTest004 ffd983d1-21bf-42af-b123-bb0ec402dd3f
    Ethernet Win10VMTest004 ffd983d1-21bf-42af-b123-bb0ec402dd3f

    I need to ‘catch’ Ethernet 2. Suspecting that the second value ‘Ethernet’ is overwriting the 1st value ‘Ethernet 2’, I’ve tested a code where the IF tries to catch ‘Ethernet’ only. To no avail.

    You’re right, YouTube videos will surely do a lot of help also.

    Thank you! Your replies are always very helpful and enlightening.

  • Hi Emanuel!

    This is great help. However, how do I get the value of InterfaceIndex only? If my guess is correct, the code you provided will dump all of what’s contained in Get-NetAdapter.

    Thank you!

  • Hi Emanuel!

    Invoke-Command is now my new best friend!

    In fact, I’ll also be using it for a code to extract the value of InterfaceIndex (thru Get-Netadapter). But how do I get the value/s of the property/ies (like InterfaceIndex and InterfaceAlias) of Get-Netadapter and use it/them, say move the value/s to a variable/s?

    Thank you!

  • Is there a way to get the value of InterfaceIndex and move it to a variable?

  • Excellent, works like a charm.
    This is the clean way to connect to a Hyper-V servert without a domain environment in a workgroup network.

    The other articles in the net are misleading, confusing, or just wrong. After 2 days of struggling I`ve foud your post and it was 2 minutes to make it work, Thank you!

  • Just tested and it works now…needed to give it roughly 24 hours for the AD name to make its way to the voice prompt search index.

  • Hi Jeff, thanks for the article.
    I am trying to add nicknames to the dial by name directory. For example, Leonardo goes by Lenny so when people call and say “Lenny”, the system doesn’t find him. I have added Lenny to the middle name, display name and other places but the system still doesn’t recognize a “Lenny”. The name Lenny even shows up in the TeamsUsersManage Users section. Any ideas?

  • 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