Chocolatey: Windows Package Management

Posted by & filed under Software, Windows.

Chocolatey is similar to yum or apt-get for linux users, but for windows users. It allows the user to quickly install a variety of packages (apps) from the command line… as of this writing there are 1375 unique packages available.


chocolatey

Running Chocolatey is cake… heh heh heh. For example, to install Firefox:

c:\> cinst Firefox

 

Finished my first real .Net app today…

Posted by & filed under .Net, Programming, Windows.

I finished a sweet .net app today. It’s vb.net which is kinda gay I guess but it gets the job done and is a lot better than the VB I knew long ago. The app itself spawns a new process and runs a netsh command extracting/grepping out the info needed.

I’m headed to PRI tomorrow. Tired and should of already been sleeping. damn black ops.

Managing Wireless Network Adaptors with Powershell and WMI

Posted by & filed under Powershell, Programming, Projects, TNSC, Windows.

I have been researching how to create a script that will display network status as well as allow the users to reconnect to the wireless network if needed.

PS C:\Windows\system32> Get-WmiObject -Namespace root\wmi -list | Where-Object { $_.Name -match "MSNdis_80211" }

NameSpace: ROOT\wmi

Name Methods Properties
---- ------- ----------
MSNdis_80211_ReceiveAntennaSelected {} {Active, InstanceName, Ndis80211ReceiveAntennaSelected}
MSNdis_80211_RTSThreshold {} {Active, InstanceName, Ndis80211RTSThreshold}
MSNdis_80211_AddWEP {} {Active, InstanceName, KeyIndex, KeyLength...}
MSNdis_80211_ConfigurationInfo {} {ATIMWindow, BeaconPeriod, ConfigLength, DSConfig...}
MSNdis_80211_ReloadDefaults {} {Active, InstanceName, Ndis80211ReloadDefaults}
MSNdis_80211_BssIdListScan {} {Active, InstanceName, UnusedParameter}
MSNdis_80211_InfrastructureMode {} {Active, InstanceName, Ndis80211InfrastructureMode}
MSNdis_80211_ConfigurationFH {} {DwellTime, FHLength, HopPattern, HopSet}
MSNdis_80211_BaseServiceSetIdent... {} {Active, InstanceName, Ndis80211MacAddress}
MSNdis_80211_ReceivedSignalStrength {} {Active, InstanceName, Ndis80211ReceivedSignalStrength}
MSNdis_80211_NetworkType {} {Ndis80211NetworkType}
MSNdis_80211_PrivacyFilter {} {Active, InstanceName, Ndis80211PrivacyFilter}
MSNdis_80211_TransmitPowerLevel {} {Active, InstanceName, Ndis80211TransmitPowerLevel}
MSNdis_80211_NetworkInfrastructure {} {Ndis80211NetworkInfrastructure}
MSNdis_80211_WLanBssId {} {Ndis80211Configuration, Ndis80211InfrastructureMode, Ndis8...
MSNdis_80211_NetworkTypesSupported {} {Active, InstanceName, Ndis80211NetworkTypes, NumberOfItems}
MSNdis_80211_NetworkTypeInUse {} {Active, InstanceName, Ndis80211NetworkTypeInUse}
MSNdis_80211_RemoveWEP {} {Active, InstanceName, Ndis80211KeyIndex}
MSNdis_80211_NumberOfAntennas {} {Active, InstanceName, Ndis80211NumberOfAntennas}
MSNdis_80211_AuthenticationMode {} {Active, InstanceName, Ndis80211AuthenticationMode}
MSNdis_80211_FragmentationThreshold {} {Active, InstanceName, Ndis80211FragmentationThreshold}
MSNdis_80211_Statistics {} {ACKFailureCount, Active, FailedCount, FCSErrorCount...}
MSNdis_80211_BSSIList {} {Active, InstanceName, Ndis80211BSSIList, NumberOfItems}
MSNdis_80211_WEPStatus {} {Active, InstanceName, Ndis80211WEPStatus}
MSNdis_80211_PowerMode {} {Active, InstanceName, Ndis80211PowerMode}
MSNdis_80211_Configuration {} {Active, InstanceName, Ndis80211Config}
MSNdis_80211_ServiceSetIdentifier {} {Active, InstanceName, Ndis80211SsId}
MSNdis_80211_TransmitAntennaSele... {} {Active, InstanceName, Ndis80211TransmitAntennaSelected}
MSNdis_80211_Disassociate {} {Active, InstanceName, UnusedParameter}
MSNdis_80211_DataRates {} {Active, InstanceName, Ndis80211DataRate}
MSNdis_80211_DesiredDataRates {} {Active, InstanceName, Ndis80211DesiredRate}
MSNdis_80211_ReceivedSignalStren... {} {Active, InstanceName, Ndis80211ReceivedSignalStrengthTrigger}

And also this snippet which will display the network adapters labeled as wireless:

PS C:\Windows\system32> Get-WmiObject -Class Win32_NetworkAdapter | Where-Object {$_.Name -like "*Wireless*"}

ServiceName :
MACAddress :
AdapterType :
DeviceID : 14
Name : Linksys Wireless-G USB Network Adapter
NetworkAddresses :
Speed :

Sources: www.powershellcommunity.org/Forums/tabid…
blogs.technet.com/b/heyscriptingguy/arch…

Wireless Network Scanner in Powershell: defaultset.blogspot.com/2010/04/powershe…

Configuring Wireless in Windows thru the Command Line

Posted by & filed under Networking, WiFi, Windows.

So using the netsh wlan command allows us to manipulate the various properties of a wireless connection. Other potentially cool stuff:

  • netsh wlan set tra yes – Enables wireless debug traces in %WINDIR%\tracing\wireless
  • netsh wlan
  • Creating/moving wireless profiles quickly
  • There is more, but this is prolly what I need to use when I write a app for a client to view wireless connection status.

    Source: www.windowsnetworking.com/articles_tutor…

Fixing MS FTP Service from needing the domain prefix for user logins

Posted by & filed under Windows.

The MS FTP server by default requires a domain name prefixed on the username. We don’t want this for our FTP users:

1. Change to the %Systemroot%\Inetpub\Adminscripts directory.
2. Type the following:
Adsutil Set MSFTPSVC/DefaultLogonDomain “Domain Name”
Make sure when you type in the Domain Name that it is enclosed in quotation marks.
3. Stop and restart the FTP Service.

This applies to IIS 4 thru IIS7. FOr IIS7 I copied the adsutil.vbs form the inetpub/adminscripts folder on a IIS6 box.