Geeks With Blogs



Lance Robinson

Create Your Badge

Lance Robinson is a software engineer in Durham, Chapel Hill, Raleigh, and surrounding areas. More about Lance.


Lance's TextBox » About Me » My Resume »Twitter cmdlet There are 8 entries for the tag cmdlet
PowerShell cmdlet for SNMP (part 2: sysUpTime)
Brandon updated his get-uptime script to output a custom object. Brandon's script works with the LastBootUpTime property returned from WMI Win32_OperatingSytem. I already talked briefly about the get-snmp, set-snmp, get-trap, and send-trap cmdlets that are included in NetCmdlets. Here's how you can use get-snmp to get the sysUpTime from any SNMP-enabled device. Note: sysUpTime is defined as the time since the last re-initialization (ie, boot) of the device, in 100ths of a second. get-snmp -agent ......

Posted On Tuesday, February 27, 2007 3:26 PM

Using PSCredentials without a prompt
You cannot use get-credential without some type of prompt (although you can do it without the pop-up dialog), however you can save your securestring password to a file, reload it for later, and manually create a credential without a prompt. Of course the problem with this is that your password will be exposed to anyone with access to the file, so do this at your own risk. First, choose your password and write it to a file: PS C:\> read-host -assecurestring | convertfrom-securestring | out-file ......

Posted On Friday, February 16, 2007 1:21 PM

Change Active Directory password with NetCmdlets
Here's how you can change your active directory (or other ldap server) password with the set-ldap cmdlet in /n software NetCmdlets. Also, recently I also showed how to this using the IP*Works! SSL LdapS dev component. PS C:\> set-ldap -server myserver -binddn Domain\Administrator -password admin -dn "cn=BillyBob,ou=Employees,d... -newpassword mynewpassword -ssl implicit Update: the -password parameter is now a secure string. There is also a -credential parameter. So the cmd to change the ......

Posted On Wednesday, December 27, 2006 1:33 PM

NetCmdlets support PSCredentials
Previously with NetCmdlets, authentication details were only accepted using plain text parameters. This is still supported, but now these cmdlets support PSCredentials through a new -credentials parameter. This works for almost all of the cmdlets included in NetCmdlets, like FTP, LDAP, HTTP, SMTP, Rexec, RSS, IM, SMS, SSH, etc. Here's an example with get-ldap. Before, you had to bind to the directory server using plain text parameters, like this: PS C:\> get-ldap -server testboy -binddn mydomain\admin ......

Posted On Wednesday, December 27, 2006 1:27 PM

NetCmdlets Part 3: PowerShell and Active Directory using /n software's LDAP cmdlet
MOW's "PowerShelled" blog is another awesome PowerShell resource. Of particular interest to me was MOWs series on PowerShell and Active Directory. He used the .Net System.DirectoryServices classes to do all the work. here is how you can use /n software's LDAP cmdlet to manage directory servers like AD. The LDAP cmdlet supports plain connections as well as secure SSL connections. The LDAP cmdlet will work with any directory server, including AD, ADAM, OpenLDAP, Novell, etc. The LDAP cmdlet uses its ......

Posted On Wednesday, December 27, 2006 1:25 PM

NetCmdlets Part 2: PowerShell cmdlet for SNMP (network management)
The SNMP PowerShell cmdlets that come with /n software NetCmdlets support SNMP v1, v2c, and v3, SNMPv3 auth/priv, MIB loading, etc. Here are some examples of using the Get-SNMP, Set-SNMP, Send-Trap, and Get-Trap cmdlets. Find SNMP enabled machines (agents) on your network:PS C:\> get-snmp -agent -oid sysName.0 Find processes running on a remote snmp-enabled machine:PS C:\> get-snmp -agent myagent -oid hrSWRunName -walk $true Send an SNMP trap to a remote manager:PS C:\> send-trap ......

Posted On Thursday, November 9, 2006 12:10 PM

NetCmdlets Part 1: PowerShell cmdlet for FTP (plus FTPS and SFTP)
Some examples of using NetCmdlets in PowerShell. The FTP NetCmdlet supports plain and secure (both SSL and SSH) FTP connections right from the PowerShell console. List files on a remote server: PS C:\> get-ftp -server myserver -user lancer -password mypass The same, but using SSL (auth-tls): PS C:\> get-ftp -server myserver -user lancer -password mypass -ssl explicit And again, but using SSH 2.0: PS C:\> get-ftp -server myserver -user lancer -password mypass -ssh Find the files on a remote ......

Posted On Thursday, November 9, 2006 11:37 AM

Powershell scripting contest
Windows PowerShell Scripting Sweepstakes. I think its kinda funny, though, that the first prize teaser in the description of the contest is two "all-expenses paid trips to Redmond, WA to meet the Windows PowerShell team". You know I'm sure I would enjoy meeting you all and everything...but I'd rather just have the Xbox. Unless I can get the xbox AND the trip to Redmond. :) Submit your entry scripts in one (or all) of 12 categories: Active Directory SQL Databases IIS 6.0/7.0 Networking Partner Category: ......

Posted On Monday, November 6, 2006 1:41 PM

Copyright © Lance Robinson | Powered by: