PowerShell Arrays

Hello Blog!

Today I’m gonna explain Powershell arrays, which is the most important part of the scripting and coding in Powershell, also having arrays in your code could help you much and ease your coding progress.

Powershell arrays provides a structured data which is combined into an array and stores a fixed-size sequential collection of elements of the any type.

In order to assign an Array, you must create a variable to include the arrays data in it, and you can specify the type of array the variable can reference. Here is the syntax for declaring an array variable.

Syntax:

$C = 16,2,5,1,60,3
$R = 1..6
Continue Reading

PowerShell Club Moderator/Administrator Applications are now open!

Hello Everyone!

I as told before that I am working on a website called PowerShell Club, which is about Powershell scripting, learning and sharing the experience there.

Now we are looking for talented and responsible experts who believe in themselves as an Administrator and can manage our forums!

You can send your applications to [email protected] mail address and I’ll get back to you if It meets the requirements.

Thank you

Continue Reading

Check My PowerShell Scripts in TechNet Gallery

Hi Blog!

Hope everyone is fine.

I’ve working with powershell about 5 years. I was decided to share my works through TechNet and hope that can be helpful for everyone.

Here is the links for Download Scripts.

https://gallery.technet.microsoft.com/Automatic-FSMO-Role-5a8a0599?redir=0

https://gallery.technet.microsoft.com/WINRM-Remote-Management-6b963d2a?redir=0

https://gallery.technet.microsoft.com/SAN-SelfSigned-Certificate-ca94536a?redir=0

https://gallery.technet.microsoft.com/Deleted-Object-Restore-in-7c3358ac?redir=0

https://gallery.technet.microsoft.com/Duplicate-User-Creation-7a4d2155?redir=0

https://gallery.technet.microsoft.com/PowerShell-Get-SQLServer-beb853c2?redir=0

 

Also check my new blog: https://Powershellclub.com

Enjoy 🙂

 

Continue Reading

Certificate (password-less) based authentication in WinRM

This week the WinRM ruby gem version 1.8.0 released adding support for certificate authentication. Many thanks to the contributions of @jfhutchi and @elpetak that make this possible. As I set out to test this feature, I explored how certificate authentication works in winrm using native windows tools like powershell remoting. My primary takeaway was that it was not at all straightforward to setup. If you have worked with similar authentication setups on linux using SSH commands, be prepared for more friction. Most of this is simply due to the lack of documentation and google results (well now there is one more). Regardless, I still think that once setup, authentication via certificates is a very good thing and many are not aware that this is available in WinRM.

This post will walk through how to configure certificate authentication, enumerate some of the “gotchas” and pitfalls one may encounter along the way and then explain how to use certificate authentication using Powershell Remoting as well as via the WinRM ruby gem which opens up the possibility of authenticating from a linux client to a Windows WinRM endpoint.

 

Continue Reading