Security is something that every administrator should take seriously. Clear text passwords in (PowerShell) scripts is not something that is best practice and should be avoided or handled differently. In this post I am going to encrypt a password (not a username) using 128-bit AES encryption but the first step is to create a key so […]
Gmail allows the use of SMTP, we can use SMTP for sending e-mail notifications from within PowerShell. The first step is to register an e-mail address at Gmail. This is a very straight forward step so this will not be included in this blog post. So, when you have registered with Gmail we can add […]
When building a new (hosted) desktop the question about what profile type to use regularly pops up. The chosen profile type has impact on logon times, performance and manageability. The use of a UEV or UEM tool for profile virtualization is used in most environments now a days so the choice between a Local and […]
Running a PowerShell script as scheduled task is not as easy as entering PowerShell.exe *script name.ps1*. I have been struggling with it for quite some time. Here is a command line to get it up and running: 1) Set the execution policy so script are allowed to run, open PowerShell and enter: Set-executionpolicy -scope currentuser […]
When you use tools like Altiris or SCCM and you want to run scripts against Windows Server 2008, you need to disable a couple of things not to run into the Windows Installer scrolling window. The next GPO setting disables all the stuff that blocks these features: [Hanging Windows Installer Coordinator] A fix is available […]
Today I was struggling to get a Command Prompt box, sent by Altiris, to run a PowerShell command with a space in it. Finally I got it fixed. The command is: 1) powershell.exe -command “& New-Item -path Registry::’HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Terminal Server\TSAppSrv’” 2) powershell.exe -command “& New-ItemProperty Registry::’HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Terminal Server\TSAppSrv’ -Name “TSMSI” -Value 0 -PropertyType “DWord”” […]
Here is an example how to set the static IP address if the name is known: if /i %computername% EQU SERVER “”netsh interface ipv4 set address “Local Area Connection” static 18.104.22.168 255.255.254.0 22.214.171.124 Can’t get the solution to work? Contact me and let me do the trick.
To join a domain in Windows 2008 the syntax is a bit changed from Windows 2003. The correct syntax is: netdom.exe join %COMPUTERNAME% /domain:DOMAINNAME /userD:administrator /passwordD:* Can’t get the solution to work? Contact me and let me do the trick.
In Windows 2008 and in Windows 7 the wait command is replaced by the Timeout command; For a timeout / wait of 10 seconds the command is: timeout /T 10 This works in PowerShell and also in Command Prompt. Can’t get the solution to work? Contact me and let me do the trick. […]