Showing category results for PowerShell

Jul 30, 2021
Post comments count3
Post likes count2

How to Update or Add a Registry Key Value with PowerShell

@DoctorDNS
@DoctorDNS

Q: I am having a problem trying to update the registry. I am using the New-ItemProperty cmdlet, but it fails if the registry key does not exist. I added the –Force parameter, but it still does not create the registry key. The error message says that it cannot find the path because it does not exist. Is there something I am not doing? I include my s...

PowerShellregistryprovider
Jun 21, 2021
Post comments count8
Post likes count0

How to Change the Start Page for the Edge Browser

@DoctorDNS
@DoctorDNS

Q: How can I change the Edge startup page? A: You can change the start page easily using PowerShell. Edge and It's Start Page I am basing this article on the latest incarnation of the Edge browser, aka Edge Chromium. The settings in this article seem to work fine on the latest versions of Windows 10 and Server 2022. Other browsers can have diffe...

PowerShellEdge
Jun 13, 2021
Post comments count4
Post likes count0

How to rename a NIC

@DoctorDNS
@DoctorDNS

Q: Is there a simple way to rename a NIC, especially inside a Hyper-V VM? A: You can change the name of any Windows NIC using PowerShell - whether the NIC is in a physical host or a Hyper-V VM. NICS and NIC names One thing that can quickly become confusing when using Hyper-V with multiple VMs and VM Switches is how fast the network adapters seem...

PowerShellnetworkNIC
May 24, 2021
Post comments count2
Post likes count5

How to send output to a file

@DoctorDNS
@DoctorDNS

Q: Is there an easy way to save my script output to a text file rather than displaying it on screen? A: Of course - there are multiple ways to do just that! PowerShell and Output One of PowerShell's great features is the way it automatically formats output. You type a command - PowerShell gives you the output it thinks you want. If the default o...

PowerShelloutput
May 7, 2021
Post comments count5
Post likes count0

How Do I Discover Changes to an AD Group’s Membership

@DoctorDNS
@DoctorDNS

Q: Is there an easy way to detect and changes to important the membership of AD Groups? A: Easy using PowerShell 7, WMI, and the CIM Cmdlets. WMI Windows Management Instrumentation (WMI) is an important component of the Windows operating system. WMI is an infrastructure of both management data and management operations on Windows-based computers...

WMIADWMI Eventing
May 1, 2021
Post comments count5
Post likes count0

Sending data to the Clipboard from PowerShell

Sean Kearney
Sean Kearney

Q: Hey I have a fun question! I remember reading a while back about using VBScript to paste to the clipboard. Are we able to do that with PowerShell? A: Why yes, yes we can! It is far often a much quicker solution if we start with PowerShell! Pasting content to the clipboard, the old VBScript method Before we show the quick and easy solution, le...

PowerShellClipboardVBScript
Apr 21, 2021
Post comments count6
Post likes count0

Borrowing a built-in PowerShell command to create a temporary folder

Sean Kearney
Sean Kearney

Q: Hey I have a question for you. It seems silly and I know I could probably put something together with Get-Random. But can you think of another way to create a temporary folder with a random name in PowerShell? Ideally, I'd like it to be in a user's own "Temporary Folder" is possible. A: We sure can! If Doctor Scripto was sitting here right now...

FunctionFun trickExisting Cmdlet
Apr 15, 2021
Post comments count7
Post likes count1

Is a User a Local Administrator?

@DoctorDNS
@DoctorDNS

Q: Some of the things we do in our logon scripts require the user to be a local administrator. How can the script tell if the user is a local administrator or not, using PowerShell 7. A: Easy using PowerShell 7 and the LocalAccounts module Local Users and Groups The simple answer is of course, easily. And since you ask, with PowerShell 7! But le...

securitylocal userslogon scripts
Apr 2, 2021
Post comments count0
Post likes count1

Testing the connection to computers in the Active Directory

@DoctorDNS
@DoctorDNS

Q: As an administrator, I often have to do a lot of reporting on the servers in my domain. Is there a simple way to test the connection to every server in my domain or every server or client host in a specific OU? A: Of course you can do this with PowerShell! You can use the Active Directory cmdlets and , although it is not as simple as one might ...

Active Directorynetworking
Mar 24, 2021
Post comments count2
Post likes count0

Can I Enable the Caps Lock Key?

@DoctorDNS
@DoctorDNS

Q: I have a script where users enter some information. This information needs to be entered in all capital letters, so my instructions say, “Please make sure the Caps Lock key is on before entering the information.” They don’t always do that, however. Is there a way to turn the Caps Lock key on and off using a script? A: I don't know how to run th...

Caps LockstringToUpper()