your home for end-user virtualization!

Powershell

Using Cisco UCS PowerTool to gather Model, Serial Number, Chassis and Blade Location

I’m finishing up a UCS deployment for a customer, one of the things I needed to gather was the Serial Number, Model, Chassis Number and Blade Location. Since I’ve been playing with Cisco’s PowerShell component called PowerTool; I figured I would use it. Here is the one-liner that I came up with: get-ucsblade | select […]

Tags: , , , , , , , , ,

Posted in Cisco, Cisco UCS, Cloud, Powershell, PowerTool | No Comments »

Configure Syslog on ESXi using PowerShell and PowerCLI

Using powershell, I was able to configure all the hosts in my vCenter instance First, I needed to configure the syslog host get-vmhost| Set-VMHostAdvancedConfiguration -NameValue @{‘Config.HostAgent.log.level’=’info’;’Vpx.Vpxa.config.log.level’=’info’;’Syslog.global.logHost’=’udp://IPADDDR:514′} I then needed to open the appropriate firewall ports for the traffic to get through get-vmhost| Get-VMHostFirewallException |?{$_.Name -eq ‘syslog’} | Set-VMHostFirewallException -Enabled:$true On the C220 M3’s, we had […]

Tags: , , ,

Posted in PowerCLI, Powershell, vmware | 1 Comment »

List stale Active Directory computer accounts using Windows PowerShell

I was trying to identify computer accounts that had not logged in within the last 6 months. To do that, I used the get-adcomputer PowerShell cmd-let. get-adcomputer -properties lastLogonDate -filter * | where { $_.lastLogonDate -lt (get-date).addmonths(-6) } | FT Name,LastLogonDate > c:\test.txt

Tags: ,

Posted in Active Directory, Microsoft, Powershell | No Comments »

List Active Directory users that have never logged in including built-in users using PowerShell

I was trying to find a way to identify what the unused user accounts were in my AD environment. I started playing with PowerShell’s get-aduser cmd-let. The working script that I came up with is below. get-aduser -f {-not ( lastlogontimestamp -like “*”) -and (enabled -eq $true)} | select name

Tags: ,

Posted in Active Directory, Microsoft, Powershell | No Comments »

Search

Categories