Manage Local Administrator Rights Using Group Policy

If you imagine that your users or administrators have uncontrolled local administrator rights it’s a nightmare. They have (certainly) full control over their computer, and could do a lot of harm. So managing local administrator rights is definitely a must. Manage Local Administrator Rights The Active Directory Group Policies offer a great possibility to manage local groups on clients or servers. All the magic happens with “Restricted Groups”. Adding a group or users to a local group If you want to add a certain group to a built-in group add the group to the restricted groups under the “This group is a member of” sections: ...

October 14, 2017 · 2 min · 297 words · Nicola Suter

PowerShell Function Validate Object Properties Using ValidateScript

 Recently I was working on a PowerShell script with many custom functions. When I started to use PowerShell custom objects I wanted to be able to pass them to a function. So I faced the challenge of validating my object for all required properties and came up with this solution, using the ValidateScript block to test the object: Customizing the ValidateScript As you can see I use a ValidateScript for the parameter validation to test the object for the required properties. The properties can be specified in an array: $requiredProperties=@("Property1","Property2","Property3", "Property4") When we call the Function with an appropriate object: ...

October 12, 2017 · 2 min · 338 words · Nicola Suter

Managing printers with PowerShell

Managing printers with PowerShell instead of VBScript? Sometimes it’s necessary to add and remove specific printers to a computer. For example during a client deployment or when a user logs on. This post covers how to manage printers with PowerShell. The following PowerShell commands are supported with PowerShell version 4 and newer. Installing a local network printer Installing a local printer (without a printserver) consists of the following steps: Add the printer driver to your system’s driverstore Install the printer driver from the driverstore Add a printer port to communicate with the printer Last but not least add the printer Add the printer driver to the driverstore Before you can install the printer driver you need to import the printer driver to your system’s driverstore. ...

October 10, 2017 · 2 min · 407 words · Nicola Suter

Disable Java Auto Update During Installation

Disable Java Auto Update without registry modification? Recently i had to install Oracle Java on a Terminal server and was curious, if it’s possible to configure the package that the auto update feature is disabled without any registry configuration? Custom configuration On the Oracle website i found a great article about the possibility to pass a configuration file to the installer: Here’s the syntax to install Java silently with a custom configuration: ...

October 10, 2017 · 1 min · 144 words · Nicola Suter