Advertisement
Guest User

new

a guest
Oct 22nd, 2018
374
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $ENV:Path = $ENV:Path+";C:\Program Files (x86)\Putty"
  2. $UNIX_USERNAME = Read-Host "Enter Unix Username"
  3. $CONTROLLER_USERNAME = Read-Host "Enter Controller Username"
  4. $UNIX_PASSWORD = Read-Host "Enter Unix Password" -AsSecureString
  5. $CONTROLLER_PASSWORD = Read-Host "Enter Controller Password" -AsSecureString
  6. Function IP-Ping {
  7.     Param ([Parameter(Mandatory=$true)][string]$hostname)
  8.     cmd /c start ping $hostname -t
  9. }
  10. Set-Alias sa Set-Alias
  11. sa p IP-Ping
  12. Function Reg-Login{
  13.     Param ([Parameter(Mandatory=$true)][string]$store,[Parameter(Mandatory=$true)][string]$reg)
  14.     $hostname= -join ("s0",$store,"reg",$reg)
  15.     putty_6_3.exe -ssh $hostname -l $UNIX_USERNAME -pw ( [System.Runtime.InteropServices.Marshal]::PtrToStringAuto([System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($UNIX_PASSWORD)) )
  16. }
  17. Function Reg-Ping{
  18.     Param ([Parameter(Mandatory=$true)][string]$store,[Parameter(Mandatory=$true)][string]$reg)
  19.     $hostname= -join ("s0",$store,"reg",$reg)
  20.     p $hostname
  21. }
  22. Function EuISS-Login{
  23.     Param ([Parameter(Mandatory=$true)][string]$store)
  24.     $hostname=  -join ("s0",$store,"isp1")
  25.     putty_6_3.exe -ssh $hostname -l root -pw 1ss2010! -P 2222
  26. }
  27. Function Ctr-Login{
  28.     Param ([Parameter(Mandatory=$true)][string]$store)
  29.     $hostname= -join ("s0",$store,"ctr1")
  30.     putty_6_3.exe -ssh $hostname -l $CONTROLLER_USERNAME -pw ( [System.Runtime.InteropServices.Marshal]::PtrToStringAuto([System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($CONTROLLER_PASSWORD)) ) -P 2222
  31. }
  32. Function Ctr-Ping{
  33.     Param ([Parameter(Mandatory=$true)][string]$store)
  34.     $hostname= -join ("s0",$store,"ctr1")
  35.     p $hostname
  36. }
  37. Function ISS-Login{
  38.     Param ([Parameter(Mandatory=$true)][string]$store)
  39.     $hostname= -join ("s0",$store,"isp1")
  40.     putty_6_3.exe -ssh $hostname -l $UNIX_USERNAME -pw ( [System.Runtime.InteropServices.Marshal]::PtrToStringAuto([System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($UNIX_PASSWORD)) )
  41. }
  42. Function ISS-Ping{
  43.     Param ([Parameter(Mandatory=$true)][string]$store)
  44.     $hostname= -join ("s0",$store,"isp1")
  45.     p $hostname
  46. }
  47. Function ISS-Drac{
  48.     Param ([Parameter(Mandatory=$true)][string]$store)
  49.     $url= -join("s0",$store,"isp1-drac/")
  50.     Start-Process chrome $url
  51. }
  52. Function Sw-Login{
  53.     Param ([Parameter(Mandatory=$true)][string]$store,[Parameter(Mandatory=$true)][string]$sw)
  54.     $hostname= -join ("s0",$store,"sw0",$sw)
  55.     putty_6_3.exe -ssh $hostname -l $UNIX_USERNAME
  56. }
  57. Function Rtr-Ping{
  58.     Param ([Parameter(Mandatory=$true)][string]$store)
  59.     $hostname= -join ("s0",$store,"rtr1")
  60.     p $hostname
  61. }
  62. Function Rtr-Login{
  63.     Param ([Parameter(Mandatory=$true)][string]$store)
  64.     $hostname= -join ("s0",$store,"rtr1")
  65.     putty_6_3.exe -ssh $hostname -l $UNIX_USERNAME
  66. }
  67. Function Clk-Login{
  68.     Param ([Parameter(Mandatory=$true)][string]$store)
  69.     $hostname=  -join ("s0",$store,"clk1")
  70.     putty_6_3.exe -ssh $hostname -l $UNIX_USERNAME -pw ( [System.Runtime.InteropServices.Marshal]::PtrToStringAuto([System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($UNIX_PASSWORD)) )
  71. }
  72. Function iPod-Search{
  73.     Param ([Parameter(Mandatory=$true)][string]$sn)
  74.     $url= -join("https://gapstorescn.awmdm.com/AirWatch/#/AirWatch/Device/List/Search?searchText=",$sn)
  75.     Start-Process chrome $url
  76. }
  77. Function IntForce-Close{
  78.     Start-Process chrome http://sslbox.gap.com:8080/job/intl-register-force-close/build?delay=0sec
  79. }
  80. Function AP-Ping{
  81.     Param ([Parameter(Mandatory=$true)][string]$store,[Parameter(Mandatory=$true)][string]$ap)
  82.     $hostname= -join ("s0",$store,"ap0",$ap)
  83.     p $hostname
  84. }
  85. sa cl Ctr-Login
  86. sa cop Ctr-Ping
  87. sa ip ISS-Ping
  88. sa id ISS-Drac
  89. sa il ISS-Login
  90. sa is iPod-Search
  91. sa rtp Rtr-Ping
  92. sa rep Reg-Ping
  93. sa rl Reg-Login
  94. sa rtl Rtr-Login
  95. sa ap AP-Ping
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement