by skufel | May 11, 2015 | Automation, Scripting, SysAdmin, Windows
Many times there is a need to store password in PowerShell script. Unfortunately to leave password in script is insecure solution and might cause an issue. So, what to do if there is a need to have password in a script and we don’t want to have it embedded in...
by skufel | Mar 25, 2015 | Automation, Scripting, Windows
If you want to replace string in multiple files name you can simply use PowerShell for that. Dir -Recurse | Rename-Item -NewName { $_.name -replace "file","name-of-file"...
by skufel | Mar 14, 2015 | Automation, Infrastructure, Linux, SysAdmin
I use SecureCRT quite often to access Linux systems as well as network devices. When going through one of the presentations on SecureCRT web page I found handy tip how to configure session logs to have it divided by date, time and session. Screenshot below...
by skufel | Oct 30, 2014 | Automation, Infrastructure, Scripting, SysAdmin, Windows
If there is a need to pass specific credentials to Get-WmiObject in order to gather information from remote machine, here is how you can do it: $LAdmin = "DOMAIN\Administrator" $LPassword = ConvertTo-SecureString "Password!" -AsPlainText -Force...
by skufel | Oct 21, 2014 | Automation, Infrastructure, Scripting, SysAdmin, System Center
During mass reainstallation/redeployment/migration of large number of PCs, always question about applications is raised. How to deploy/deliver applications once all machines are resintalled? If you have SCCM in the infrastructure, this might help a lot with...
by skufel | Dec 5, 2013 | Automation, Infrastructure, Scripting, Windows
Some handy wmic commands which might be helpful when automating OS deployment: wmic bios get serialnumber wmic computersystem get manufacturer wmic computersystem get model