-
-
Remotely and Silently Install A Windows MSI Via PowerShell
One of the easiest things to do in OS X is to remotely run an installation package using the installer command. You can do some similar tasks in Windows, although the commands aren’t quite as cut and dry. The Start-Process command can be used to kick off an executable. Here, we will kick off the msiexec.exe and feed it an argument, which is the msi file to install silently. We’ll then wait for it to complete: {Start-Process -FilePath "msiexec.exe" -ArgumentList "/i TEST.msi /qb" -Wait -Passthru}
-
Unlock Locked Active Directory Accounts Using PowerShell
You can use the Unlock-ADAccount PowerShell commandlet to unlock an Active Directory account. This can be helpful, for example, as a Self Service option in a Casper server. To do so, run the Unlock-ADAccount commandlet followed by the -Identity option and then the SamAccountName: Unlock-ADAccount -Identity CharlesEdge
-
Disable Active Directory Accounts Using PowerShell
You can disable an Active Directory account using the Disable-ADAccount PowerShell commandlet. To do so, use the -Identity option along with the SAMAccountName of the account to disable. Here, we’ll use the SAMAccountName of CharlesEdge: Disable-ADAccount -Identity CharlesEdge The account can then be re-enabled using the Enable-ADAccount commandlet using the same command structure: Enable-ADAccount -Identity "CharlesEdge"
-
Get Hyperion Enterprise to Run on Windows 2008 64 bit
Hyperion Enterprise is still a 32-bit app. So to get it to run in IIS, you’ll need to make sure that 32 bit apps can run in those containers. To enable 32-bit apps in IIS, run the following command (assuming that IIS is installed in the default location and that your Windows directory is C:\Windows: C:\Windows\system32\inetsrv\appcmd set config - section:applicationPools - applicationPoolDefaults.enable32BitAppOnWin64:true If you need to undo this for any reason, simply run the following from a Windows command prompt: C:\Windows\system32\inetsrv\appcmd set config - section:applicationPools - applicationPoolDefaults.enable32BitAppOnWin64:true Note: You’ll obviously need to be an admin (or elevate your privileges) to run these commands.
-
Package Manager Like apt-get For Windows 10
In Windows 10, Microsoft has finally baked a package manager called OneGet into Windows. It works similarly to apt-get and other package managers that have been around for decades in the Linux world; just works in PowerShell, rather than bash. So let’s take a quick peak. First, import it as a module from a PowerShell prompt: Import-Module -Name OneGet Next, use Get-Command to see the options for the OneGet Module: Get-Command -Module OneGet This will show you the following options: Find-Package Get-Package Get-PackageProvider Get-PackageSource Install-Package Register-PackageSource Save-Package Set-PackageSource Uninstall-Package Unregister-PackageSource Next, look at the repositories of package sources you have: Get-PackageSource You can then add a repo to look at,…
-
Kill Windows Processes In Windows 8
You can gracefully stop Windows processes using the Stop-Process command let. For example, to stop Chrome: Stop-Process -Name Chrome Or to stop it by ID. To locate the ID of a process, use get-process: get-process Chrome You can then use the -ID operator to stop the process: Stop-Process -ID 6969 Kill is a command that all Mac and Unix admins know. It’s similar to Stop-Process, except it’s anything but graceful. And you use the -processname option to stop a process: kill -processname calc
-
Enable AutoAdminLogon For Windows Deployments
There are 3 registry keys that admins in the Windows world use to enable automatic logins, often required for deployments that require a logged in user to setup user environments, such as configuring app deployments as part of a mass deployment. The required keys in the registry are:
-
Get The Current Logged In User From The Windows Command Line
You can get the currently logged in user from a powershell script by using $env:username. But most deployment scripts use elevated privileges. Therefore, you need to be a tad bit craftier.
-
Yosemite Server SMB and Windows
A few people have hit me up about issues getting Windows machines to play nice with the SMB built into Yosemite Server and Windows. Basically, the authentication dialog keeps coming up even when a Mac can connect. So there are two potential issues that you might run into here. The first is that the authentication method is not supported. Here, you want to enable only the one(s) required. NTLMv2 should be enabled by default, so try ntlm: sudo serveradmin settings smb:ntlm auth = "yes" If that doesn’t work (older and by older I mean old as hell versions of Windows), try Lanman: sudo serveradmin settings smb:lanman auth = “yes" The second…