Rename a computer with PowerShell

Rename-Computer

In this “how” tutorial I will explain how to rename a computer in PowerShell. Using PowerShell allows you to go more empty than going through the graphical interface which requires going through several configuration windows. Rename a computer with PowerShell In a PowerShell prompt use: Rename-Computer The PowerShell command to rename a computer is Rename-Computer. …

Read more



Create a folder in PowerShell

To create a folder in PowerShell, use the New-Item cmdlet indicating the location and name of the folder and set the itemType parameter with the value Directory to indicate that you want to create a folder.



RDS farm: delete a server not available in the deployment

In this tutorial, we will see how to remove a server from a deployment that is no longer available. When connecting to the service broker, the following message is displayed: The following deployment servers are not in the server pool1. SERVER-FQDN .Add them to the server pool This type of error occurs if the server …

Read more



PowerShell: run multiple parallel robocopy

I offer a script that will allow you to launch several Robocopy simultaneously, this use saves a lot of time when using robocopy on a folder with several subfolders. In order to function the source must contain several subfolders. The files at the root of the source are not copied. Adapt the script Line 30: …

Read more



Create an Active Directory environment in PowerShell

Introduction In this tutorial, we will see how to create an Active Directory environment using PowerShell, that is to say the creation of the first domain controller which includes: The Active Directory tutorial: installing and configuring a domain controller explains how to do it using the graphical interface. Prerequisites Ideally from a blank server, which …

Read more



Restart an RDS server member of a farm

This script allows you to reboot a server RDS member of a farm with a broker session by closing the still open sessions. Use : Change the two variables $ServerBroker and $ServerHost. Create a scheduled task by running the script on the remote desktop session host server. Using the script avoids ending up with xxxxx.BACKUP-Y …

Read more



Active Directory: Joining a Computer to a Domain at the Command Line

NETDOM JOIN

Introduction The Active Directory domain join of a computer can be done using either the GUI or using command line and PowerShell. In this tutorial, I will explain how to join a computer to a domain using the various command lines that are: NETDOM DJOIN for off-line joining Add-Computer in PowerShell It is also possible …

Read more



Jenkins: centralizing the management of scheduled tasks

Introduction Jenkins is a free open source software for continuous integration. It is normally used by development equipment to ensure non-regression of source code. In turn, it is possible to use Jenkins as a scheduler to centralize the administration of scheduled Windows and / or Linux tasks. I propose in this article to explain how …

Read more



MDT: Running a PowerShell Script During a Deployment

In this tutorial, I will explain how to run a PowerShell script (.ps1 file) during a deployment with MDT. Copy the ps1 1 file to the Scripts folder in the DeploymentShare folder. Open the properties of the task sequence then add a task of type Run Command Line 1. Move the task to the desired …

Read more