Vbs : delete all files with the same extension in a folder
The next two lines of code allow you to delete all files with a particular extension in a folder. The example below will delete all of the .log files from the C:\Windows folder.
The next two lines of code allow you to delete all files with a particular extension in a folder. The example below will delete all of the .log files from the C:\Windows folder.
The script allows you to delete all network printers on a workstation / server. ‘ ‘ RDR REMOVE NETWORK PRINTER ‘ ‘ ‘ Dim strComputer strComputer = “.” Set objWMIService = GetObject(“winmgmts:\\” & strComputer & “\root\cimv2”) Set colInstalledPrinters = objWMIService.ExecQuery (“Select * from Win32_Printer”) Set WshNetwork = WScript.CreateObject(“WScript.Network”) ‘msgbox “open script” ‘ Boucle sur les …
The following script migrates from print server A to server B with the following actions: Map printers to the new server Removal of the workstation printers that are mapped to the old server only if they are present on the new one Changing the default printer if it is a printer from the old server. …
The following script installs the FOG agent on fixed workstations at startup. The script must be placed in a group policy (GPO), which executes the script when the computer starts. Edit lines 8 and 9 by replacing fqdn with the URL to access the FOG server.
The following VBS script displays an alert to users at login that the password is soon to expire. The script Customizing the script line 2 : QtDiasAviso = 7 Number of days the message begins to appear line 3 : RedirectRdWeb = true True : opens the page defined in the UrlRDWEB variable when the …
When setting up an Active Directory, one of the things you want to set up automatically is the mapping of printers to users. Prerequisite: Have a server with the Print Service role (optional). It is possible to share a printer from the control panel. Have one or more shared printers. As for the mapping of …
Context : Temporary profile error on logon For multiple and often unknown reasons, users are connected to their session on a temporary profile. The user does not find his settings including the Outlook profile. All that is stored in the folder C:\Users\TEMP is not saved when they log off. If you apply a folder redirection …
The function below is used to check if a user is part of an AD group. The function returns True or False. PS: pour fonctionner la fonction IsMember à besoin de la fonction EnvString(variable) Use :
When setting up an Active Directory, one of the first things you want to set up is automatic mapping of network drives to different users. As a reminder, a network drive is a share presented to a workstation / user in the form of a letter like a hard disk / USB stick …. In …