Advertisement
Guest User

Untitled

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