taking a power shell cmdlet and changing it into script by importing from file and applying to each name
In my other post I was helped out on using the command pwdlastset
https://social.technet.microsoft.com/Forums/windowsserver/en-US/ac4d4fb8-0780-4f0d-9e0e-9fec2ff87fbf/using-the-pwdlastset-attribute?forum=winserverpowershell
I decided I would then try to build on that.
1. create a CSV file and import
2. take each value as it comes in and change it.
I came up with the following but something odd is happening:
its asking for an identity. (I got the idea from another script that I had which creates accounts, see below) any idea what I is wrong in my thinking here?
--------------------------
PS C:\Windows\system32> # Import from CSV
Import-csv c:\scripts\Book1.csv | Foreach-Object { Set-ADUser -Replace @{pwdLastSet=0}}
cmdlet Set-ADUser at command pipeline position 1
Supply values for the following parameters:
Identity:
--------------------------
I got the idea from another script that I had which creates user accounts. it was similar type of item using the new_ADUser instead of the set-ADuser but the important thing I wanted was to create a for loop but was not sure how in power shell and
this seemed to use that.
-----------------------------
# Import from CSV
Import-csv c:\scripts\PSBulkAccountCreation.csv | ForEach-Object {
New-ADUser -Path "OU=users,DC=somename" -Name $_.Name -SamAccountName $_.SamAccountName -Description $_.Description -emailaddress $_.emailaddress -AccountPassword
(ConvertTo-Securestring -AsplainText $_.AccountPassword -Force) -Enable $true -ChangePasswordatlogon 0 -PasswordNeverExpires:$true
}
}
-----------------------------
September 10th, 2015 5:02pm
I found this which may be a clue I am looking into it now:
" Script block. You can use a script block to specify the operation. Within the script
block, use the $_ variable to represent the current object. The script block is the
value of the Process parameter. The script block can contain any Windows PowerShell
script."
wondering if I somehow need to create a variable to use. maybe $users
------------------------------------------------------------
PS C:\Windows\system32> get-help ForEach
NAME
ForEach-Object
SYNOPSIS
Performs an operation against each item in a collection of input objects.
SYNTAX
ForEach-Object [-Process] <ScriptBlock[]> [-Begin <ScriptBlock>] [-End <ScriptBlock>]
[-InputObject <PSObject>] [-RemainingScripts <ScriptBlock[]>] [-Confirm] [-WhatIf]
[<CommonParameters>]
ForEach-Object [-MemberName] <String> [-ArgumentList <Object[]>] [-InputObject
<PSObject>] [-Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
The ForEach-Object cmdlet performs an operation on each item in a collection of input
objects. The input objects can be piped to the cmdlet or specified by using the
InputObject parameter.
Beginning in Windows PowerShell 3.0, there are two different ways to construct a
ForEach-Object command.
Script block. You can use a script block to specify the operation. Within the script
block, use the $_ variable to represent the current object. The script block is the
value of the Process parameter. The script block can contain any Windows PowerShell
script.
For example, the following command gets the value of the ProcessName property of each
process on the computer.
Get-Process | ForEach-Object {$_.ProcessName}
Operation statement. You can also write a operation statement, which is much more like
natural language. You can use the operation statement to specify a property value or
call a method. Operation statements were introduced in Windows PowerShell 3.0.
For example, the following command also gets the value of the ProcessName property of
each process on the computer.
Get-Process | ForEach-Object ProcessName
When using the script block format, in addition to using the script block that
describes the operations that are performed on each input object, you can provide two
additional script blocks. The Begin script block, which is the value of the Begin
parameter, runs before the first input object is processed. The End script block,
which is the value of the End parameter, runs after the last input object is processed.
RELATED LINKS
Online Version:
http://go.microsoft.com/fwlink/p/?linkid=289582
REMARKS
To see the examples, type: "get-help ForEach-Object -examples".
For more information, type: "get-help ForEach-Object -detailed".
For technical information, type: "get-help ForEach-Object -full".
For online help, type: "get-help ForEach-Object -online"
PS C:\Windows\system32>
-
Edited by
wilder7bc
10 hours 34 minutes ago
September 10th, 2015 5:03pm
I tried to change it a bit but that seemed to give me a new error. I am pretty sure It has something to do with needing to go into a variable and then each variable be fed, but I may be trying to put simple understanding to something that has
a bit more complexity to it than what I am thinking with just a basic import, loop and set statement. =(
-------------------
PS C:\Windows\system32> Import-csv c:\scripts\Book1.csv | Foreach-Object { Set-ADUser -Replace $.Replace @{pwdLastSet=0}}
Set-ADUser : Cannot bind parameter 'Replace'. Cannot convert the "$.Replace" value of type
"System.String" to type "System.Collections.Hashtable".
At line:1 char:72
+ Import-csv c:\scripts\Book1.csv | Foreach-Object { Set-ADUser -Replace $.Replace ...
+
~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Set-ADUser], ParameterBindingException
+ FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.ActiveDirectory.Man
agement.Commands.SetADUser
-------------------
September 10th, 2015 5:12pm
I found the following article and I am working with it
http://blogs.technet.com/b/heyscriptingguy/archive/2011/12/22/use-powershell-to-read-a-csv-file-and-create-active-directory-user-accounts.aspx
I am coming up with something new like the following below but I have not tested or refined it yet. Hoping I am getting on the right track I like how he lays it out more like regular programming code.
$UserList=Import-csv c:\scripts\Book1.csv
Foreach-Object ($Person in $UserList) { Set-ADUser $Person -Replace @{pwdLastSet=0}}
==========edited======= nm it gave me error but it was finding names but trying to set one name = to the name after
------------------------------
$UserList=Import-csv c:\scripts\Book1.csv
Foreach-Object ($Person in $UserList) { Set-ADUser $Person -Replace @{pwdLastSet=0}}
PS C:\Windows\system32> $UserList=Import-csv c:\scripts\Book1.csv
Foreach ($Person in $UserList) { Set-ADUser $Person -Replace @{pwdLastSet=0}}
Set-ADUser : Cannot bind parameter 'Identity'. Cannot convert value
"@{firstname.lastname1=firstname.lastname2}" to type "Microsoft.ActiveDirectory.Management.ADUser".
Error: "Cannot convert the "@{firstname.lastname1=firstname.lastname2}" value of type
"System.Management.Automation.PSCustomObject" to type
"Microsoft.ActiveDirectory.Management.ADUser"."
At line:2 char:45
+ Foreach ($Person in $UserList) { Set-ADUser $Person -Replace @{pwdLastSet=0}}
+
~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Set-ADUser], ParameterBindingException
+ FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.ActiveDirectory.Man
agement.Commands.SetADUser
-----------------------------------
-
Edited by
wilder7bc
10 hours 1 minutes ago
September 10th, 2015 5:26pm
Well it turned out that my CSV file repeated the names every third name because from my excel file when I copied I grabbed the first three boxes then dragged down and was not paying attention. So my file was screwed up with to start. I have since fixed that.
I am starting off very simple now I created the following code which works. so I outputted like 50 names each on their own line. So that looks like my forEach is working atleast in doing that I will try to work from here into using the
command I want.
---------------
$UserList=Import-csv c:\scripts\Book1.csv
ForEach ($Person in $UserList) { Write-Output $Person}
---------------
September 10th, 2015 5:58pm
I don't seem to be able to figure this out. I tried the command again with a fixed csv file.
Unlike the print command that outputs each item in order this one gives me an error and it tries to set the firstname in the list = to the second name in the list.
I have an idea of whats going on here "I think", but not positive. I know with Hash Table that you have two values the first is the key and the second is the value.
could it be trying to set john.doe as the key and the value jane.smith? how its showing the error looks to me like its all inside the @{} which is the hash table. yet I think I need the hash table to use the pwdlastset attribute....
This is very frustrating.
------------------
$UserList=Import-csv c:\scripts\Book1.csv
ForEach ($Person in $UserList) { Set-ADUser $Person -Replace @{pwdlastSet=0}}
Set-ADUser : Cannot bind parameter 'Identity'. Cannot convert value
"@{john.doe=jane.smith}" to type "Microsoft.ActiveDirectory.Management.ADUser".
Error: "Cannot convert the "@{john.doe=jane.smith}" value of type
"System.Management.Automation.PSCustomObject" to type
"Microsoft.ActiveDirectory.Management.ADUser"."
At line:2 char:45
+ ForEach ($Person in $UserList) { Set-ADUser $Person -Replace @{pwdlastSet=0}}
+
~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Set-ADUser], ParameterBindingException
+ FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.ActiveDirectory.Man
agement.Commands.SetADUser
-----------------
September 10th, 2015 6:08pm
Import-Csv -Path C:\users\adm_hlabuser1\desktop\Users.csv | select -ExpandProperty identity | Set-Aduser -replace @{pwdlastset=0}
I have used my column header in the CSV file as identity & the object values reflect the samaccountname
The key point here is how pipeline works
The parameter IDENTITY accepts pipeline input ByValue, which in powershell world says, I will go first, and if I do not work then go by property name.
You need to EXPAND the property name here and take out the string output
Check out the below detailed example i gave for you
As with the example I am providing, with input from one of my lab environments.
I have two users whose samid's have been noted in the file.
User1 = std_hlabuser1
PwdLastSet = (Before I executed the above command)
PwdLastSet = (After I executed the above command)
User2 = std_hlabuser2
PwdLastSet = (Before I executed the above command)
PwdLastSet = (After I executed the above command)
September 10th, 2015 6:34pm
You can spend the rest of your life guessing and asking incremental questions or you can sit dowsn and learn PowerShell. Everryoneof your problems are due to not having learned how PowerShell works.
PowerShell is an object system (OOP). It cannot be easily guessed at until you learn how it works then you can use methhods to discover how things are built like "Get-Member".
You also fail to read all of the help for the CmdLet you are using.
"Identity" is required. It cannot be guessed from a CSV. You must always supply an Identity or a user object which has numerous forms of identity.
Set-Aduser -Identity <samaccountname> -Replace @{pwdLastSet=0}}
With that and the learning pages here you should be able to figure out how this works.
September 10th, 2015 6:34pm
OMG I get what your saying now so deleting all that stuff I wrote. My CSV was messed up and why I am getting the double name crap, or atleast I am pretty sure that's what you mean.
I have used CSV in the past just been awhile let me go back to messing with this.
-
Edited by
wilder7bc
8 hours 15 minutes ago
September 10th, 2015 7:14pm
I am thinking you might mean create a column header named samaccountname and then under that header have my CSV name list. which I think I did something similar in the past. that would go along with what
Soumyajyoti stated as well. I just didn't catch it at first as my brain is jumbled let me go play with my CSV sheet and add a column header like I have in the past.
September 10th, 2015 7:21pm
Ok below I posted the final product:
I just forgot about the CSV item because I don't work with the stuff until I work with it. I have been busy with my bachelor degree. I am finishing up my last class which is a basic programming class in python. However, I am excited about
applying programming concepts to my power shell which is why I was excited about the for each loop.
I did not use it because the select presented above was already supplied but I am going to see if I can get the for each loop to work with what I was reminded of with the CSV files.
I will start learning powershell formally by the way its just hard to work all day then go home study all night and to complete side projects as well. Power shell is a passion of mine its just not something I have had time to stay steady with until
I finish my bachelor. I take my python test sunday then all I have left is my technical writing class and my capstone and I will have finished my first bachelor.
then I will have a lot more time in the evenings to pursue current interest!
had to run three commands but when you think of how much time it saves (hours!), and that you can do this in like 10 seconds for thousands of users I think its pretty useful
- First run:
- Import-csv c:\scripts\Book1.csv | select -ExpandProperty samaccountname | Set-Aduser -replace @{pwdlastset=-0}
- Then run:
- Import-csv c:\scripts\Book1.csv | select -ExpandProperty samaccountname | Set-Aduser -replace @{pwdlastset=-1}
- And lastly run:
- Import-csv c:\scripts\Book1.csv | select -ExpandProperty samaccountname | Set-Aduser -PasswordNeverExpires $false
September 10th, 2015 7:51pm
Yes but you still do not understand the difference between a CSV and text file and how the pipeline.
Your file has a list of user names...
Without the added header:
Get-Content <yourfile> | Set-Aduser -replace @{pwdlastset=-0}
That is what
Soumyajyoti.Biswas was trying to show you but both he and you assumed you knew what a CSV file was.
September 10th, 2015 8:08pm
I found this which may be a clue I am looking into it now:
" Script block. You can use a script block to specify the operation. Within the script
block, use the $_ variable to represent the current object. The script block is the
value of the Process parameter. The script block can contain any Windows PowerShell
script."
wondering if I somehow need to create a variable to use. maybe $users
------------------------------------------------------------
PS C:\Windows\system32> get-help ForEach
NAME
ForEach-Object
SYNOPSIS
Performs an operation against each item in a collection of input objects.
SYNTAX
ForEach-Object [-Process] <ScriptBlock[]> [-Begin <ScriptBlock>] [-End <ScriptBlock>]
[-InputObject <PSObject>] [-RemainingScripts <ScriptBlock[]>] [-Confirm] [-WhatIf]
[<CommonParameters>]
ForEach-Object [-MemberName] <String> [-ArgumentList <Object[]>] [-InputObject
<PSObject>] [-Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
The ForEach-Object cmdlet performs an operation on each item in a collection of input
objects. The input objects can be piped to the cmdlet or specified by using the
InputObject parameter.
Beginning in Windows PowerShell 3.0, there are two different ways to construct a
ForEach-Object command.
Script block. You can use a script block to specify the operation. Within the script
block, use the $_ variable to represent the current object. The script block is the
value of the Process parameter. The script block can contain any Windows PowerShell
script.
For example, the following command gets the value of the ProcessName property of each
process on the computer.
Get-Process | ForEach-Object {$_.ProcessName}
Operation statement. You can also write a operation statement, which is much more like
natural language. You can use the operation statement to specify a property value or
call a method. Operation statements were introduced in Windows PowerShell 3.0.
For example, the following command also gets the value of the ProcessName property of
each process on the computer.
Get-Process | ForEach-Object ProcessName
When using the script block format, in addition to using the script block that
describes the operations that are performed on each input object, you can provide two
additional script blocks. The Begin script block, which is the value of the Begin
parameter, runs before the first input object is processed. The End script block,
which is the value of the End parameter, runs after the last input object is processed.
RELATED LINKS
Online Version:
http://go.microsoft.com/fwlink/p/?linkid=289582
REMARKS
To see the examples, type: "get-help ForEach-Object -examples".
For more information, type: "get-help ForEach-Object -detailed".
For technical information, type: "get-help ForEach-Object -full".
For online help, type: "get-help ForEach-Object -online"
PS C:\Windows\system32>
-
Edited by
wilder7bc
Thursday, September 10, 2015 9:04 PM
September 10th, 2015 9:01pm
I found the following article and I am working with it
http://blogs.technet.com/b/heyscriptingguy/archive/2011/12/22/use-powershell-to-read-a-csv-file-and-create-active-directory-user-accounts.aspx
I am coming up with something new like the following below but I have not tested or refined it yet. Hoping I am getting on the right track I like how he lays it out more like regular programming code.
$UserList=Import-csv c:\scripts\Book1.csv
Foreach-Object ($Person in $UserList) { Set-ADUser $Person -Replace @{pwdLastSet=0}}
==========edited======= nm it gave me error but it was finding names but trying to set one name = to the name after
------------------------------
$UserList=Import-csv c:\scripts\Book1.csv
Foreach-Object ($Person in $UserList) { Set-ADUser $Person -Replace @{pwdLastSet=0}}
PS C:\Windows\system32> $UserList=Import-csv c:\scripts\Book1.csv
Foreach ($Person in $UserList) { Set-ADUser $Person -Replace @{pwdLastSet=0}}
Set-ADUser : Cannot bind parameter 'Identity'. Cannot convert value
"@{firstname.lastname1=firstname.lastname2}" to type "Microsoft.ActiveDirectory.Management.ADUser".
Error: "Cannot convert the "@{firstname.lastname1=firstname.lastname2}" value of type
"System.Management.Automation.PSCustomObject" to type
"Microsoft.ActiveDirectory.Management.ADUser"."
At line:2 char:45
+ Foreach ($Person in $UserList) { Set-ADUser $Person -Replace @{pwdLastSet=0}}
+
~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Set-ADUser], ParameterBindingException
+ FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.ActiveDirectory.Man
agement.Commands.SetADUser
-----------------------------------
-
Edited by
wilder7bc
Thursday, September 10, 2015 9:37 PM
September 10th, 2015 9:24pm
OMG I get what your saying now so deleting all that stuff I wrote. My CSV was messed up and why I am getting the double name crap, or atleast I am pretty sure that's what you mean.
I have used CSV in the past just been awhile let me go back to messing with this.
-
Edited by
wilder7bc
Thursday, September 10, 2015 11:23 PM
September 10th, 2015 11:12pm
Hello wilder7bc,
As you are using your column name as SAMACCOUNTNAME
I used mine as IDENTITY. So, in your words, physically IDENTITY was my column name and all the samaccountnames were row values under it.
Again just to emphasize, in powershell world, column headers are called property values & rows are called objects. The whole thing is just a collection.
I could have shown you the text file way, but you wanted it from a CSV.
And as jrv says, study powershell. :)
Hope this helps
September 10th, 2015 11:47pm
Well I certainly have learned a few things from the post. I have forgotten more things than you can even imagine. That's that's how much I enjoy learning, and how many things I have learned, and yes as mentioned sadly forgotten =)
I would rather be underestimated in what I do and do not know and have things over explained than someone think I know more than I may and then under explain it. I feel the digs like other people do as well but the learning just has a priority for
me and holds more importance.
I have started on Power shell about 4-5 times now. the last time I hit it up the hardest but had to stop because of college, and it kind of went away. So your definitely right about needing to study it and study about 15 other things as well...
However, I will say this Power Shell is my favorite, and I get the most excited working with it.
I have the entire cbt nuggets Power Shell recorded from my CBT Nuggets subscription I just have never had time to watch it.
What do you think is the fastest and most powerful way to really take off in Power Shell?
I want to be able to approach power shell in a coding way and be able to right if and loops and arrays and connect things together. Like the above I had three different things but I bet with some work and logic you could right up a class with methods
and have it execute one bit then move to the next and execute it and then to the next. When I can sit down and do that with just the minimum amount of looking at syntax then I will be happy with where I am at.
I think I could do that in python with some work but not PowerShell at this time without someone helping me a lot.
Well thanks for sharing information, Its appreciated.
September 11th, 2015 1:05am
Yup thanks Soumyajyoti you post certainly finally got the forgotten piece of information to resurface in my head and it may have been a lot longer before it resurfaced if not for your post.
Well I think I have used the text file way in the past the difference is in how you call it correct?
I started using CSV though as that format was always easier when working with excel sheets and stuff, or at least that was my thoughts lol.
now that I look at it I mean it was obvious and I should have known as I have did that many times and read up on that. I don't know why I forgot it I just did and then when I was working on this my andrenlin was flowing and I was excited about using
a for each loop in power shell and for some reason I didn't remember it until you coaxed it out of me. not really a desired trait but I am what I am and sometimes my brain gets so focused and goes so fast that I miss the things that are obvious.
I can be like a force of nature when moving towards something sometimes I slow myself down as it can get a bit wilddddddddddd
September 11th, 2015 1:15am
Hello wilder7bc,
Thank you for your post.
Glad to be of help.
If you are trying yo make it into a single line, why not try a -passthru parameter ?
I will let you find out more about it :)
September 11th, 2015 3:10am
I am looking the -passthru parameter up this morning Soumyajyoti found this link which I am reading through
http://blogs.technet.com/b/heyscriptingguy/archive/2011/11/18/use-the-powershell-passthru-parameter-and-get-back-objects.aspx
Hopefully its something I can understand then transpose into something simple that I can understand sometimes the scripting guy loses me!
Ok I like to share and post information. I love teaching as well even though I am not the best communicator. So I am going to post a link here that references CSV files in case someone else looks at this in the future and is new or not sure on the CSV side.
Here is what was trying to be communicated to myself.
"The first record in a CSV file may be a header record containing column (field) names
There is no mechanism for automatically discerning if the first record is a header row, so in the general case, this will have to be provided by an outside process (such as prompting the user).
The header row is encoded just like any other CSV record in accordance with the rules above. A header row for the multi-line example above, might be:
Location, Notes, "Start Date", ... "
http://creativyst.com/Doc/Articles/CSV/CSV01.htm
September 11th, 2015 10:25am
A CSV file nearly always has a header.
A CSV file is a complex data object as text.
The description of a CSV file can be found here:
https://en.wikipedia.org/wiki/Comma-separated_values
PowerShell and all MS utilities and programs create SCV files with headers.
September 11th, 2015 11:35am
Hello wilder7bc,
Thank you for your post.
You have to learn how cmdlets & parameters work to understand the power of the parameter i asked you to check. :)
Till then, on to your next question. Headers are there to be used judiciously from a CSV file. That is what gives us the flexibility of parameter bindings. Now you can obviously change that too. I mean change the header names as you desire and form new headers.
I have given an example. It is powershell, and you have the power. ;)
In my example in the snippet, if you see, I used the cmdlet get-wmiobject to fetch the sizes of all the drives (logical) in my laptop. See I took the default output headers (properties/columns for your csv file). But as you can see the free space &
total disk sizes are 'ugly' (in bytes). So i corrected them in a language easy for me to understand (GigaBytes), and used custom header names. :)
Hope this helps.
If you find this helpful, you can mark the post as helpful too. :)
September 11th, 2015 12:27pm
testing adding a picture to forums so I can communicate with more tools in the future.
September 11th, 2015 12:42pm
Hello wilder7bc,
Glad to be of help.
Happy Scripting :)
September 11th, 2015 12:45pm
Ok I purchased the CBT Nuggets and I am going to do the entire Don Jones Power Shell series
If I don't learn all this stuff by the end of this series I will be fit to be tied. I will commit to doing 7 videos a week minimum.
Windows PowerShell v2-v3-v4 Ultimate Training
Level: Advanced Hours: 31 Videos: 90
1. Course Introduction and Lab Setup (8 min)
2. Windows PowerShell Orientation and Requirements (24 min)
3. Finding and Discovering Commands (23 min)
4. Interpreting Command Help (23 min)
5. Running Commands (26 min)
6. Working with PSProviders and PSDrives (17 min)
7. Variables, Strings, Hashtables, and Core Operators (24 min)
8. Regular Expression Basics (23 min)
9. Running External Commands: Tips and Tricks (11 min)
10. Learning the Pipeline: Exporting and Converting Data (23 min)
11. Understanding Objects in PowerShell (23 min)
12. Core Commands: Selecting, Sorting, Measuring, and More (27 min)
13. How the PowerShell Pipeline Works (35 min)
14. Formatting Command Output (19 min)
15. Comparison Operators and Filtering (17 min)
16. Advanced Operators (26 min)
17. Setting Default Values for Command Parameters (20 min)
18. Enumerating Objects in the Pipeline (16 min)
19. Soup to Nuts: Completing a New Task (19 min)
20. LAB A: PowerShell Core Review (27 min)
21. PowerShell Remoting Basics (45 min)
22. Persistent Remoting: PSSessions (14 min)
23. Implicit Remoting: Using Commands on Another Computer (22 min)
24. Advanced Remoting: Passing Data and Working with Output (27 min)
25. Advanced Remoting: Crossing Domain Boundaries (22 min)
26. Advanced Remoting: Custom Session Configurations (28 min)
27. Web Remoting: PowerShell Web Access (20 min)
28. LAB B: PowerShell Remoting Review (12 min)
29. WMI and CIM: WMI, Docs, and the Repository (23 min)
30. WMI and CIM: Using WMI to Commands Query Data (23 min)
31. WMI and CIM: Using CIM Commands to Query Data (25 min)
32. WMI and CIM: Filtering and WMI Query Language (20 min)
33. WMI and CIM: Associations (18 min)
34. WMI and CIM: Working with CIM Sessions (18 min)
35. WMI and CIM: Executing Instance Methods (22 min)
36. LAB C: WMI and CIM Review (11 min)
37. Background Job Basics: Local, WMI, and Remoting Jobs (19 min)
38. Scheduled Background Jobs (24 min)
39. LAB D: Jobs Review (10 min)
40. PowerShell Script Security (25 min)
41. Prompting for Input, Producing Output (17 min)
42. Creating Basic Parameterized Scripts (19 min)
43. PowerShell Scripting: Logical Constructs (22 min)
44. PowerShell Scripting: Looping Constructs (23 min)
45. PowerShell Scripting: Basic Functions, Filters, and Pipeline Functions (35 min)
46. PowerShell Scripting: Best Practices (17 min)
47. PowerShell Scripting: From Command to Script to Function to Module (14 min)
48. PowerShell Scripting: Scope (20 min)
49. PowerShell Scripting: Combining Data from Multiple Sources (16 min)
50. LAB E: PowerShell Scripting Review (13 min)
51. Advanced Functions: Adding Help (15 min)
52. Advanced Functions: Parameter Attributes (17 min)
53. Advanced Functions: Pipeline Input (16 min)
54. Advanced Functions: Parameter Sets (18 min)
55. LAB F: Advanced Functions Review (22 min)
56. Creating Private Utility Functions and Preference Variables (16 min)
57. Adding Error Capturing and Handling to a Function (20 min)
58. Advanced Error Handling (26 min)
59. Error Handling the Old Way: Trap (8 min)
60. Debugging Techniques (32 min)
61. Creating Custom Formatting Views (25 min)
62. Creating Custom Type Extensions (21 min)
63. Working with SQL Server (and other) Databases (40 min)
64. Working with XML Data Files (29 min)
65. Supporting WhatIf and Confirm in Functions (13 min)
66. Troubleshooting and Tracing the Pipeline (16 min)
67. Using Object Hierarchies for Complex Output (17 min)
68. Creating a Proxy Function (19 min)
69. LAB G: Advanced Scripting Review (16 min)
70. From the Field: Enhanced HTML Reporting (43 min)
71. From the Field: Trend Analysis Reporting (18 min)
72. From the Field: Scraping HTML Pages (9 min)
73. Introduction to PowerShell Workflow (36 min)
74. Desired State Configuration: The Basics (14 min)
75. Desired State Configuration: Configuration Scripts and Pull Servers (37 min)
76. Desired State Configuration: Writing Resources (25 min)
77. Controller Scripts: Automating Business Processes (10 min)
78. Controller Scripts: A Menu of Tools (9 min)
79. Creating a GUI Tool: The GUI (10 min)
80. Creating a GUI Tool: The Code (11 min)
81. Creating a GUI Tool: The Output (15 min)
82. Creating a GUI Tool: Using Data Tables (8 min)
83. LAB H: Automating a Business Process (7 min)
84. Globalizing a Function or Script (11 min)
85. Discovering and Using COM Objects (10 min)
86. Discovering and Using .NET Classes and Instances (14 min)
87. Using Type Accelerators (12 min)
88. The Big Gotchas in PowerShell (23 min)
89. Fun With Profiles (18 min)
90. Random Tips and Tricks (26 min
September 11th, 2015 1:16pm
Great :)
Good luck learning.
September 11th, 2015 1:22pm
This is not popcorn time at the movies. You must do every one of the examples and excercises until you fully understand the lesson before moving to the next lesson.
Only good study habits will work.
September 11th, 2015 3:32pm
Hi Jrv,
I like popcorn, and I really really like movies.
What are you trying to say here? "don't make me angry. You wouldn't like me when I'm
angry"
hah ;)
POPCORN + MOVIES = Goooooooood!
-
Edited by
wilder7bc
11 hours 3 minutes ago
September 11th, 2015 4:38pm
I meant exactly what I posted. Do all examples and exercises and do not move on until you completely understand the current lesson. Ask questions when you get stuck by first search the web then post her or other forum if that doesn't help.
Just watching videos like a movie will not teach you anything.
September 11th, 2015 4:47pm
JRV,
Only the young and stupid would do it any differently.
A. I am not stupid
B. I am young (lets not over analyze the broad statement here, its just a generality "lol")
C. Now that we have that out of the way and you know who you are dealing with a fellow professional in the field of IT that has a burning passion for learning but is much weaker in a specific area than yourself you can relax and know that your dealing with
a learnaholic and can then devote more time in assisting them knowing they don't take it for granted.
have a great weekend!
September 11th, 2015 6:28pm
You posted: "What do you think is the fastest and most powerful way to really take off in Power Shell? "
I answered: "Do all examples and exercises and do not move on until you completely understand the current lesson. Ask questions when you get stuck by first search the web then post her or other forum if that doesn't help."
So why are you being defensive. No one mentioned anything about "stupid" but you.
I have heard from dozens of you guys and girls how hard they work to learn PowerShell and then they ask a question from page one of the manual. I am just trying to help you focus as you seem to have been trying to learn this for some time.
September 11th, 2015 7:04pm
I have not been defensive until just now, as I have not been agitated until after you last post and then only due to the pattern of your post.
I cannot get my entire 4.3 pages of text to fit on here that I typed that laid out an organized break down step by step details of exactly where you was rude and how you was rude. I am not going to go into all of it again.
Point is you have been impolite throughout this post and what I consider disrespectful. A lot of it was grey areas but when the patterns add up they impact the whole.
So to keep it short.
Either apologize and say your sorry and say your piece and we can move on and both let it go, and who knows maybe be friends in the future.
Or you can not apologize, and you can go your own way. I don't need help from people that are not very nice, as there are many others that are nice.
Just for the record.
I am a 47 year old professional Server Administrator and Engineer who has 20 years in the IT industry.
I work for a global company who is on pretty much every content and I am a primary person responsible for taking care of that infrastructure in a small team of about 6 of the top admins.
I also have my own business on top of that which I work evenings and weekends which enables small and medium businesses to achieve Enterprise level IT support we build their network and servers infrastructure and whatever they might need.
On top of that I go to school full time and I part of the honor society picking up my second degree in network and server engineering. My first degree is in Engineering Physics.
I also am married and have 3 kids one of which just finished school and another which is just starting college.
I am military veteran who served in the US armed forces as well.
So I have been very busy and I don't have a ton of time to spend studying extra things at least not while in college. So I don't have any problem learning I just have not had enough time in the day for everything.
People are more than just names on the internet we are all somebody and in my opinion we all, including yourself, disserve respect as we are all humans.
September 11th, 2015 11:20pm
Hello wilder7bc,
Request you to calm down. Too many posts and a lot of misunderstanding has occurred.
I would request the same to jrv.
We all here are to learn. I am very new to this forum too.
@wilder7bc: I am also using the series by Don-Jones. He is really great. You should follow all his labs. It would do you great,
if you can do along with a couple of VM's. He will show you how to find and troubleshoot your own problems and I am sure after a couple of videos you will feel very confident.
Good luck learning. :)
September 12th, 2015 2:34am