Showing posts with label Cisco. Show all posts
Showing posts with label Cisco. Show all posts

Tuesday, March 3, 2015

Cisco Any Connect VPN Client Install/Uinstall Error


I recently had issues with my Cisco Any Connect VPN client stop working on a MacBook Pro 13" Retina. I downloaded the client and tried to install again. I kept getting error message "AnyConnect secure mobility client cannot be installed on this disk. Version 3.1.xxxx of the Cisco AnyConnect secure mobility client is already installed". I decided to uninstall and reinstall a fresh copy. I continued to get the same error. I Clean My Mac 2 to uninstall the client to make sure nothing was left behind. The message still was promoted as I tried to reinstall. I found a few articles with different things to try. First thing is to make sure you have root user enabled. You can do this by following the directions below. 
  • From the Apple menu choose System Preferences.
  • From the View menu choose Users & Groups.
  • Click the lock and authenticate as an administrator account.
  • Click Login Options.
  • Click the "Edit..." or "Join..." button at the bottom right.
  • Click the "Open Directory Utility..." button.
  • Click the lock in the Directory Utility window.
  • Enter an administrator account name and password, then click OK.
  • Choose Enable Root User from the Edit menu.
  • Enter the root password you wish to use in both the Password and Verify fields, then click OK.
I had issues with the above directions having parts being greyed out. I used this alternative option.
  • From Terminal when logged in as an admin user. 
    • dsenableroot to enable, 
    • dsenableroot -d to disable
Now you are ready to use terminal to uninstall the client successfully to reinstall.
  • Open Terminal and do the following:
    • su (be careful when giving yourself root, of course)
    • cd /opt/cisco/anyconnect/bin
    • ls (to see if there's a vpn_uninstall.sh file)
  • If there is, then run the following command:
    • sh vpn_uninstall.sh
  • You'll get this confirmation message in the Terminal:
    • Successfully removed Cisco AnyConnect Secure Mobility Client from the system.
Now go back to your .dmg or vpn.pkg file (whatever your source for installing is).  Now when you get to the Destination part, you should get no error and you can proceed with the installation.

Monday, May 19, 2014

My Most Used CLI/Powershell Commands by Product

My Most Used CLI/Powershell Commands by Product
 I use CLI for almost all of my management and problem solving. This ranges from Cisco, Aruba Networks, Microsoft and Apple products. Below is a comprehensive list of my most uses and favorite commands and what they are used for.



 Command Line/PowerShell


Turn off UAC
C:\Windows\System32\cmd.exe /k %windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f


Enable File and Print Sharing

set service type= fielandprint mode= enable



Remove Inheritance using iCacls

icacls \Users Group\user or users* /inheritance:r(OI)(CI)(NP)(IO)

 
WIM Commands
  f:\winpex86>

dism /mount-wim /wimfile:f:\winpex86\winpe.wim /index:1 /mountdir:f:\winpex86\mount

dism /image:f:\winpex86\mount /add-driver /driver:f:\drivers\desktop /recurse

dism /unmount-wim /mountdir:f:\winpex86\mount /commit
Extraction Command

f:\Drivers\Laptop>expand ThinkPad_T520_W7x86.cab -f:*f:\drivers\laptop



IMAGEX Commands

Imagex /capture d: d:\name.wim "name" /compress none



SYSPREP Commands

C:\Windows\system32\sysprep>
sysprep /generalize /oobe /shutdown /unattend:"unattended.xml" 




This script will turn on remote registry


sc \\computername start remoteregistry

Task Scheduler Fix for Sophos Errors

net stop "task scheduler"
net stop "Sophos Agent"
del "%allusersprofile%\Application Data\Microsoft\Crypto\rsa\S-1-5-18\*.*" /AS /Q
del "%allusersprofile%\Application Data\sophos\remote management system\3\agent\adapterstorage\sav\*.*" /Q
schtasks /delete /tn "New scheduled scan"
net start "task scheduler"
net start "Sophos Agent"
 





Aruba AP (Access Point) Commands

 Clear out OS and Configuration
 -printenv
-purgeenv
-clear os
-save



Cisco Switch Commands

Set Enable Secret: enable secret "password"

To find switch neighbors: show cdp neighborh

To show VLANs: show vlan brief

To show VTP status: show vtp status

Static Port Mode Configuration
Switch#config t
Switch(config)#interface fastEthernet0/15
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 10
Switch(config-if)#end

Default Switch Port configuration: default interface GigabitEthernet 1/0/1

Show Mac Address port on table: sh mac add dy | i (last 4 of Mac)


Power controller reports power Imax error on 3750 Switches.
Switch(config)# int x/y
 Switch(config-if)# power inline port 2x-mode
 Switch(config-if)# shut
 Switch(config-if)# no shut  

 Exchange 2010 Commands

Export specific Mailbox from Exchange
New-MailboxExportRequest -Mailbox DiscoverySearchMailbox{D919BA05-46A6-415f-80AD-7E09334BB852} -FilePath "\\clsex01\PST\DiscoveryMailbox.pst"

New-ManagementRoleAssignment -Role "Mailbox Import Export" -User "nameofuser"

Search all Mailboxes for specific email/messages
 
Get-Mailbox | Search-Mailbox -SearchQuery 'user@gmail.com' -TargetMailbox "Discovery Search Mailbox" -TargetFolder "AllMailboxes-user" -LogLevel Full