Just because you have to workaround using the switch to run 5.1 modules I will not go to 7.anything.
Ray replied to the topic Migrate from Windows Server 2012 to 2016 with user settings and data in
PowerShell Forum 3 years, 4 months ago
I’m going to just stick with the 3rd question. Why not skip PowerShell for this and just use the Storage Migration feature in Windows Admin Center. Skip a 2012 to 2016 Server and go straight to 2019 Server since 2019 has been out long enough to be a trusted server version.
This was a great article. As a Microsoft 365 administrator, I’ve been using Teams with our organization and especially my IT group for over a year.
The only thing that gave me the creepy crawlies was the put the computer in hibernation. That is the worst thing Microsoft ever came out with. Coming out of hibernation does not ensure that everything will connect properly again. Just shut down the computer.
I've written 2 PS scripts, one for our Dell Servers and one for our VM's that are extremely short and use an exported registry key for the different values of each type of server from 2 that I manually set up for the purpose of the scripts. The reason for two is that we use Dell OEM for hardware on the those physical servers and they have a specific setup for reporting to the OEM software.
My scripts are basic and go something like this:
- Import a csv of the servers
- foreach the servers
- verify SNMP isn't already installed
- Skip server if it is already installed or continue if it isn't
- upload the registry key
- install windows service SNMP
- import the registry key
- repeat loop until done
Just quick and simple.
Ray replied to the topic Powershell script to pull out inbox rules in
PowerShell Forum 4 years, 1 month ago
I know this has been around for a while with no answers, but without knowing what type of mail system you are using it’s hard to help. For Exchange you can use: Get-InboxRule to get a list. I will leave you with that to experiment if you ever come back to look at this post.
Ray replied to the topic Get information of windows 10 specifications in
PowerShell Forum 4 years, 2 months ago
Hi,
The Get-ComputerInfo cmdlet was introduced in Windows PowerShell 5.1. As mentioned earlier, you should check the version of PS being used on the computers you are trying to use the cmdlet on.
Ray posted a new activity comment 4 years, 6 months ago
I agree that this is a mess. I lost a lot of contacts while switching phones and had to go back to set it. Microsoft has a problem with understanding what should be default and what shouldn’t. After many poor decisions in this area they would speak to the general public end users or at least to the IT departments that have contact with those end users and understand what the end users really uses and needs.- I don’t think that Microsoft doesn’t have enough data to understand what’s going on. They just don’t care. This is my experience after countless discussions with them. Nadella has adopted the old Gates mantra “move fast and break things” which was also adopted by the Gates fan Zuckerberg. While this strategy made sense in the early days of IT it is now totally outdated.
- Maybe Microsoft team is busy in some important changes such as Clippy developement… https://arstechnica.com/gadgets/2019/03/clippy-briefly-resurrected-as-teams-add-on-brutally-taken-down-by-brand-police/
Ray liked Where-Object vs. the Where method: Array filtering in PowerShell. (So far, This post has 7 likes) 5 years ago
Hmm, you completely missed the point. Where is the alias of Where-Object, but Adam is showing the difference between Where-Object and Where() method. The Where() method is different and not an alias of Where-Object.
Ray commented on
camelCasing, PascalCasing, lowercase, and UPPERCASE in PowerShell 5 years, 2 months ago
While I capitalize my PowerShell code out of habit from coding in Pascal, Basic and C++, I don’t really feel the need to do it for clean code or for anyone else reading my code. As long as the code is formatted properly, a capital Get-Service or a get-service shouldn’t matter to anyone reading the code.
If I’m writing something down and dirty in a one liner or a same script to get something done I’m not going to worry about capitalization. It’s about getting the work done.
Ray posted a new activity comment 5 years, 2 months ago
I believe Jeff Hicks has a script on Github called Auto-Lab for one of his courses on PluralSight.
Thanks Ray, I will look into it!
I found this resource in GitHub, https://github.com/AutomatedLab/DscWorkshop.
This looks promising, thanks for the heads up!
There is no need to open and then save a document to make it understand PowerShell. Open Preferences and change the default language to PowerShell. Why not take the few seconds to make that change rather than open and immediately save? Open the document and start coding….much easier.
Ray joined the group
PowerShell 5 years, 7 months ago
Ray commented on How to add leading and ending zeroes to strings in PowerShell 5 years, 9 months ago
Thanks, this is a great addition to my arsenal. We have some data with leading zeros that this will save massive time.
Ray commented on Displaying, running, and stopping scheduled tasks with PowerShell 6 years, 2 months ago
I have found the first problem in that “State” is “Ready” instead of “Enabled” which is MS being non-standard in naming. Scheduledtaskstate is “Enabled” or “Disabled”.
Ray
Ray commented on Displaying, running, and stopping scheduled tasks with PowerShell 6 years, 2 months ago
Whether or not it shows that the switch is valid, it is not working correctly. I have scheduled tasks enabled. Tested it on a system that has 4 scheduled tasks that I set myself when the server was built. I also have all the default MS Windows tasks in one or the other state. All of my manually created tasks are enabled and run at defined times every day. They show successful and are confirmed successful by me verifying that the tasks copied and deleted the log files.
I’m running PS 4 or 5 on all my servers currently, and the one I tested on is using PS4 as shown below. It is above PS3 which is the version that includes this
Major Minor Build Revision
—– —– —– ——–
4 0 -1 -1Doesn’t work when state is -eq Enabled, but pulls all MS Windows tasks when Disabled is selected. It does not pull any tasks from manually created scheduled tasks. It also does not pull any tasks MS Windows tasks that are enabled. The only way I have found to show all tasks correctly is the method I have provided in my first comment.
Ray
Ray commented on Displaying, running, and stopping scheduled tasks with PowerShell 6 years, 3 months ago
Your command for getting the state doesn’t work, The name “state” is not a proper name, After exporting to a csv I was able to see that it should be scheduledtaskstate. The following line gave me clear output for just the name and whether it was enabled or not.
Get-ScheduledTask | ? scheduledtaskstate -eq Enabled | Select-Object Taskname, scheduledtaskstate
Ray became a registered member 6 years, 4 months ago