0

Revert PicoM2 from UniFi to AirOS

by Jim Bouse 15. May 2012 13:46

A person posted this tool on the UBNT.com forums.

The original host is/was http://www.voyagerwireless.com/ubnt/UniFi2AirOS.bin.  I have uploaded it here to make sure it is available when I need it.

UniFi2AirOS.bin (6.78 mb)

Tags:

0

Find Who Has Locked ArcSDE Database

by Jim Bouse 4. May 2012 14:54
select start_time, owner, nodename from SDE_process_information where sde_id in (
select sde_id from SDE_table_locks where registration_id = (
select registration_id from SDE_table_registry where table_name = 'Streets'
)
);

Tags:

0

Multiple SSID with UBNT AP's

by Jim Bouse 28. March 2012 14:00

Tags:

0

Reset UBNT Device to Default via SSH

by Jim Bouse 28. March 2012 11:28

NOTICE! This resets it to default (factory).  If you want to just reboot, use "reboot".

cp /usr/etc/system.cfg /tmp/system.cfg; save; reboot

Tags:

Ubiquiti

0

Mikrotik Simple Queue Script

by Jim Bouse 24. February 2012 11:48

I needed to be able to create simple queues for the /27 I got from my upstream provider.  I wanted to do this with a script instead of typing by hand and perhaps creating a typo.

  • /queue simple add name="Purchased Bandwith" max-limit=10M/10M
  • :for x from=130 to=158 do={/queue simple add name="216.xxx.70.$x" target-addresses="216.xxx.70.$x" parent="Purchased Bandwith" max-limit=384k/1M }

Tags:

Mikrotik

0

PowerShell - Add and Remove Users from Active Directory Group

by Jim 28. November 2011 13:17

I had a need to routinely update the members of a security group in Active Directory.  The users in an OU were to be added/removed from the security group on a scheduled basis.

  1. Import-Module ActiveDirectory
  2. Get-ADGroupMember -Identity "Some Security Group" | ForEach-Object { $Member = $_.SamAccountName; Remove-AdGroupMember -Identity "Some Security Group" -Members $Member -Confirm:$false }
  3. Get-User -OrganizationalUnit "Some OU" | ForEach-Object { Add-ADGroupMember -Identity "Some Security Group" -Members $_.SamAccountName }

This could be written into a powershell script file to be run on a schedule.

Tags: ,

PowerShell

0

PowerShell - Disable user access to mailbox while still alllowing mailbox to function.

by Jim Bouse 9. November 2011 15:47

After I migrated my hundreds of users, I had some that were refusing to quit using the old webmail address.  We were retiring the URL and therefore we couldn't just stick it on the new OWA server.  To fix this, I disabled ActiveSync (for phones), OWA, and MAPI (for Outlook).

The code is as follows:

Get-Mailbox -OrganizationalUnit "Some OU" -DomainController "Some DC" | Set-CASMailbox -OWAEnable:$false -ActiveSyncEnabled:$false -MAPIEnabled:$false

A few days after this change, a couple of the stragglers relunctantly started using the new OWA.... and liked it. 

Tags: , , , ,

PowerShell

0

PowerShell - Import all .PST files in directory

by Jim 18. October 2011 18:56

Thie script below will impor all the .PST in a directory.  NOTE: You MUST have the .PST name match the alias in the domain.

Get-ChildItem \\server\share\*.pst | foreach { $user = $_.BaseName; New-MailboxImportRequest -Mailbox $user -FilePath \\server\share\$user.pst -BadItemLimit 50 }

Tags:

0

PowerShell - Create AD Groups then Populate Them from CSV

by Jim 16. October 2011 17:57

In my previous post, I explained how to export a .CSV for each group in an OU.  This gives you a .CSV for each group which is named the same as the group name.

  • Some Group 1.csv
  • Some Group 2.csv
  • Some Group 3.csv
  • Some Group N.csv

Now, I need to create those Groups in a new AD.  Here is the script that I used:

Get-ChildItem | foreach { echo $_.Basename } | ForEach-Object { dsadd group -scope u "cn=$_,OU=Groups,OU=Some OU,DC=SubDomain,DC=Domain,DC=TLD" }

This script calls the program DSADD and passes it the correct name (minus the .csv) which is then used to create the Groups.

Next, we run a similar script that walks through those same .CSV's and adds the users to the group with the same name as the .CSV.

Get-ChildItem | foreach { $GN = $_.BaseName; Import-Csv $_ } | foreach { Add-ADGroupMember -Identity $GN -Members $_.SamAccountName }

This works wonderfully well if the column titled SamAccountName has the correct usernames in it.

Tags: , , , ,

PowerShell

0

PowerShell - Export Group Members to CSV

by Jim Bouse 16. October 2011 16:52

This script will export a .CSV for each group in an OU.  The CSV will be named the same as the group name.

Use this code on an Exchange Server:

Get-Group -OrganizationalUnit "Some OU" | ForEach-Object { Get-Group -Identity $_.Name | ForEach { $_.Members } | Get-User | Export-Csv ($_.Name + '.csv') }

 

Use this code on an machine with Import-Module ActiveDirectory loaded:

Get-ADGroup -OrganizationalUnit "Some OU" | ForEach-Object { Get-ADGroup -Identity $_.Name | ForEach { $_.Members } | Get-ADUser | Export-Csv ($_.Name + '.csv') }

* Greg Martin suggested I clear this up...  Thanks!

Tags: , , , , ,

PowerShell

Powered by BlogEngine.NET 2.5.0.6
Original Design by Laptop Geek, Adapted by onesoft