Code snippets : Passing credentials to Get-WmiObject in PowerShell


If there is a need to pass specific credentials to Get-WmiObject in order to gather information from remote machine, here is how you can do it:

$LAdmin = "DOMAIN\Administrator"
$LPassword = ConvertTo-SecureString "Password!" -AsPlainText -Force
$Credentials = New-Object -Typename System.Management.Automation.PSCredential -ArgumentList $LAdmin, $LPassword

Once $Credentials object is created you can easily use it to gather information from remote PC:

Get-WmiObject -ComputerName $computername -Class Win32_VideoController -Namespace "root\cimv2" -Credential $Credentials

How-To : Automate application mapping using SCCM 2012 Powershell


During mass reainstallation/redeployment/migration of large number of PCs, always question about applications is raised.

How to deploy/deliver applications once all machines are resintalled?

If you have SCCM in the infrastructure, this might help a lot with automation. All you need is mapping between computer name and applications (to be more specific collection ids) and PowerShell console on SCCM server.

Then you just need to prepare input files for the script below and you can automate application deployment on mass scale.



Apps : Cisco7PCF for Windows


Just released small app for Windows platform. This app allows to decrypt type 7 password from Cisco devices as well as passwords from Cisco VPN profiles (PCF files).

Password which can be recovered using this app:

  • wireless keys fro Cisco access points,
  • RADIUS/TACACS shared secrets
  • NTP authentication keys
  • Enable passwords (NOT enable secrets, which are stored using MD5)
  • enc_GroupPwd – VPN group password from PCF file
  • enc_UserPassword – VPN user password from PCF file

Application also allows to store password and/or send tchem via email after decryption.

You can find app in Windows Store:

Cisco Password Decryptor