Day2 2
Day2 2
Directory: C:\Windows\system32
PS C:\Windows\system32> mydir
Directory: C:\Windows\system32
Id : 8804
Handles : 989
CPU : 47.0343015
Name : chrome
Id : 2356
Handles : 512
CPU : 13.3068853
Name : ClearPassOnGuard
Id : 6176
Handles : 534
CPU : 25.4125629
Name : ClearPassOnGuard
Id : 632
Handles : 1058
CPU : 8.6736556
Name : csrss
Id : 712
Handles : 1130
CPU : 165.4546606
Name : csrss
Id : 4900
Handles : 1459
CPU : 1012.5244905
Name : excel
Id : 5364
Handles : 1703
CPU : 410.1890294
Name : explorer
Id : 2212
Handles : 513
CPU : 90.3869794
Name : FireSvc
Id : 6428
Handles : 776
CPU : 17.8465144
Name : GROOVE
Id : 776
Handles : 1194
CPU : 134.3480612
Name : lsass
Id : 5928
Handles : 5089
CPU : 1004.7244405
Name : lync
Id : 3680
Handles : 623
CPU : 600.4790492
Name : mcshield
Id : 5868
Handles : 533
CPU : 37.8302425
Name : notes2
Id : 1824
Handles : 3696
CPU : 129.1064276
Name : officeclicktorun
Id : 7316
Handles : 9607
CPU : 1240.6915531
Name : outlook
Id : 7376
Handles : 1209
CPU : 90.7301816
Name : SearchIndexer
Id : 256
Handles : 944
CPU : 449.4076808
Name : svchost
Id : 424
Handles : 535
CPU : 13.1976846
Name : svchost
Id : 880
Handles : 565
CPU : 20.7013327
Name : svchost
Id : 1060
Handles : 1866
CPU : 99.2010359
Name : svchost
Id : 1400
Handles : 562
CPU : 6.8016436
Name : svchost
Id : 1572
Handles : 628
CPU : 42.6350733
Name : svchost
Id : 5668
Handles : 547
CPU : 1374.2596093
Name : SynTPEnh
Id : 4
Handles : 768
CPU :
Name : System
Id : 6896
Handles : 1189
CPU : 10.9044699
Name : ucmapi
Id : 7216
Handles : 842
CPU : 23.3221495
Name : winword
Id : 1228
Handles : 523
CPU : 63.4144065
Name : wmplayer
chrome ClearPassOnGuard
ClearPassOnGuard csrss
csrss excel
explorer FireSvc
GROOVE lsass
lync mcshield
notes2 officeclicktorun
outlook powershell
SearchIndexer svchost
svchost svchost
svchost svchost
svchost SynTPEnh
System ucmapi
winword wmplayer
class Process
{
Id = 8804
Handles = 998
CPU = 49.7487189
Name = chrome
}
class Process
{
Id = 2356
Handles = 512
CPU = 14.1648908
Name = ClearPassOnGuard
}
class Process
{
Id = 6176
Handles = 534
CPU = 26.5045699
Name = ClearPassOnGuard
}
class Process
{
Id = 632
Handles = 1059
CPU = 8.6736556
Name = csrss
}
class Process
{
Id = 712
Handles = 1153
CPU = 166.0318643
Name = csrss
}
class Process
{
Id = 4900
Handles = 1459
CPU = 1012.5868909
Name = excel
}
class Process
{
Id = 5364
Handles = 1725
CPU = 411.4994378
Name = explorer
}
class Process
{
Id = 2212
Handles = 515
CPU = 90.4961801
Name = FireSvc
}
class Process
{
Id = 6428
Handles = 778
CPU = 17.8777146
Name = GROOVE
}
class Process
{
Id = 776
Handles = 1207
CPU = 134.5040622
Name = lsass
}
class Process
{
Id = 5928
Handles = 5129
CPU = 1005.1300431
Name = lync
}
class Process
{
Id = 3680
Handles = 623
CPU = 600.8690517
Name = mcshield
}
class Process
{
Id = 5868
Handles = 532
CPU = 37.9706434
Name = notes2
}
class Process
{
Id = 1824
Handles = 3698
CPU = 129.1220277
Name = officeclicktorun
}
class Process
{
Id = 7316
Handles = 9596
CPU = 1244.9347803
Name = outlook
}
class Process
{
Id = 8620
Handles = 542
CPU = 16.224104
Name = powershell
}
class Process
{
Id = 7376
Handles = 1205
CPU = 90.7613818
Name = SearchIndexer
}
class Process
{
Id = 256
Handles = 945
CPU = 451.6384951
Name = svchost
}
class Process
{
Id = 424
Handles = 534
CPU = 13.2912852
Name = svchost
}
class Process
{
Id = 880
Handles = 566
CPU = 20.7637331
Name = svchost
}
class Process
{
Id = 1060
Handles = 1864
CPU = 99.9186405
Name = svchost
}
class Process
{
Id = 1400
Handles = 562
CPU = 6.8016436
Name = svchost
}
class Process
{
Id = 1572
Handles = 627
CPU = 42.7286739
Name = svchost
}
class Process
{
Id = 5668
Handles = 547
CPU = 1384.040872
Name = SynTPEnh
}
class Process
{
Id = 4
Handles = 768
CPU =
Name = System
}
class Process
{
Id = 6896
Handles = 1188
CPU = 10.92007
Name = ucmapi
}
class Process
{
Id = 7216
Handles = 842
CPU = 23.3533497
Name = winword
}
class Process
{
Id = 1228
Handles = 523
CPU = 63.4456067
Name = wmplayer
}
PS C:\Windows\system32> $home
C:\Users\pkumar200
PS C:\Windows\system32> $PSHOME
C:\Windows\System32\WindowsPowerShell\v1.0
PS C:\Windows\system32> $PROFILE
C:\Users\pkumar200\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
PS C:\Windows\system32> $a = 5
PS C:\Windows\system32> $a.GetType()
PS C:\Windows\system32> $b = india
The term 'india' is not recognized as the name of a cmdlet, function, script file,
or operable program. Check the spell
ing of the name, or if a path was included, verify that the path is correct and try
again.
At line:1 char:11
+ $b = india <<<<
+ CategoryInfo : ObjectNotFound: (india:String) [],
CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:\Windows\system32> $b = "india"
PS C:\Windows\system32> $b.GetType()
PS C:\Windows\system32> $c = 'ram'
PS C:\Windows\system32> $c.GetType()
Windows IP Configuration
Windows IP Configuration
D:\NGDATASUNNYTIKOO\Reports\Intrenetaddress.txt:700:[email protected]
D:\powershellcsctraining\day1_2.txt:2241:-a--- 7/14/2009 7:09 AM
71168 lpremove.exe
D:\lotus insallation\lotus_notes852FP4_win.exe:228031:�#�#VcK����#���r��'���KC�#FW�
ףgw���3��Y��#�;�HdfC�#:�"p�b�F#�#1%
J�cN�Iq N## �ܖC�#�#b�#�R͈m7���A ��ZH��@� �ڊ#z&��b#?w!�S #�Al �#b�#鋘
҅ C�S#�zA�,�Ba���F##��#�%2�<�x1��U���h+��,
�H��
��|LRr�#�p����1]E
D:\lotus insallation\
lotus_notes852FP4_win.exe:377176:ȉVB#��+М��=hi:`3h#�PN�#�PO�#��#�##��� �#2�\
#=�_#��##/#,sa��s�K��
]��_���NC#) �̦ W��#n#�C�na�#!#֪ � � � � � 8o9]�z#�Uqi�e��##�
����#��r�q�����Je#Ni�]M��6:q#����-�`D��ݵP����$�#X�HDFC�����օ�Z��t
##x�#�L��u�ݒ.���ޯ��)X#߾r����;D���TLՔP�#!
t�k��+�#7�a#��oO.������#�#�S�$����2�f�.����Y�g-�%��#
�UM#5!lk��#�VY�#bL#I i#
#�R�����h����
�#ߒ�T*���"��Ì#u��|���אan~2���#�zO#
J�kAC���HS#C#��"��9##w�E#Ro##�����#�}#�j#�lb�k`&�*B��9 ��
ډ #=^#�Y���x�v
##�����Q��ƞTj$���7&a����l�h$a�v-�#)�6�#j�w�#�^27E�
PS C:\Windows\system32>
PS C:\Windows\system32> cls
PS C:\Windows\system32> $ a = 1,2,3,4,5
The term '$' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling
of the name, or if a path was included, verify that the path is correct and try
again.
At line:1 char:2
+ $ <<<< a = 1,2,3,4,5
+ CategoryInfo : ObjectNotFound: ($:String) [],
CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:\Windows\system32> $a = 1,2,3,4,5
PS C:\Windows\system32> $a.GetType()
PS C:\Windows\system32> $b=1...5
PS C:\Windows\system32> $b.getype()
Method invocation failed because [System.Object[]] doesn't contain a method named
'getype'.
At line:1 char:10
+ $b.getype <<<< ()
+ CategoryInfo : InvalidOperation: (getype:String) [],
RuntimeException
+ FullyQualifiedErrorId : MethodNotFound
PS C:\Windows\system32> $b = 1...5
PS C:\Windows\system32> $b
1
0
PS C:\Windows\system32> $b.GetType()
PS C:\Windows\system32> $a
1
2
3
4
5
PS C:\Windows\system32> $b
1
0
PS C:\Windows\system32> $b=1..5
PS C:\Windows\system32> $b
1
2
3
4
5
PS C:\Windows\system32> $server = 'pc1','pc2','pc3'
PS C:\Windows\system32> $server
pc1
pc2
pc3
PS C:\Windows\system32> $var1 = 1,'pc1'
PS C:\Windows\system32> $var1
1
pc1
PS C:\Windows\system32> $var2 = 2, "pc2"
PS C:\Windows\system32> $var2
2
pc2
PS C:\Windows\system32> $ipc.GetType()
PS C:\Windows\system32>
PS C:\Windows\system32>
PS C:\Windows\system32>
PS C:\Windows\system32> cls
PS C:\Windows\system32> $list = @{Name = "PC01"; IP="10.10.10.10",User="Tobias"}
Missing expression after ','.
At line:1 char:43
+ $list = @{Name = "PC01"; IP="10.10.10.10", <<<< User="Tobias"}
+ CategoryInfo : ParserError: (,:String) [],
ParentContainsErrorRecordException
+ FullyQualifiedErrorId : MissingExpressionAfterToken
Name Value
---- -----
Name PC01
IP 10.10.10.10
User Tobias
Name Value
---- -----
Name ram
Marks 20
The term 'else' is not recognized as the name of a cmdlet, function, script file,
or operable program. Check the spelli
ng of the name, or if a path was included, verify that the path is correct and try
again.
At line:1 char:153
+ $temp = read-host = "Enter temprature";if ($temp -GT 20 ) {write-host = "Too
HOT..."};elseif ($temp -eq 20 ) {write-h
ost = "Average Temprature..."};else <<<< {write-host = "Too COLD..."}
+ CategoryInfo : ObjectNotFound: (else:String) [],
CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
The term 'else' is not recognized as the name of a cmdlet, function, script file,
or operable program. Check the spelli
ng of the name, or if a path was included, verify that the path is correct and try
again.
At line:1 char:155
+ $temp = read-host = "Enter temprature";if ($temp -GT 20 ) {write-host = "Too
HOT..."}; elseif ($temp -eq 20 ) {write-
host = "Average Temprature..."}; else <<<< {write-host = "Too COLD..."}
+ CategoryInfo : ObjectNotFound: (else:String) [],
CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
TypeName: System.String
PS C:\Windows\system32> cls
PS C:\Windows\system32> help Get-ChildItem -examples
PS C:\Windows\system32>
PS C:\Windows\system32>
PS C:\Windows\system32>
PS C:\Windows\system32>
PS C:\Windows\system32>
PS C:\Windows\system32>
PS C:\Windows\system32>
PS C:\Windows\system32>
PS C:\Windows\system32>
PS C:\Windows\system32>
PS C:\Windows\system32>
PS C:\Windows\system32>
PS C:\Windows\system32>
PS C:\Windows\system32>
PS C:\Windows\system32>
PS C:\Windows\system32>
PS C:\Windows\system32>
PS C:\Windows\system32>
PS C:\Windows\system32>
PS C:\Windows\system32> cls
PS C:\Windows\system32> help *size*
PS C:\Windows\system32>
PS C:\Windows\system32>
PS C:\Windows\system32>
PS C:\Windows\system32>
PS C:\Windows\system32>
PS C:\Windows\system32> cls'
>>
>> cls
>> exit
>> q
>> exit
>> dir
>> cls
>> cls
>>