Microsoft CA, Automatic issue - certificate

Does anybody know if it's possible to issue several certificates from a CSV like this:
CN=TestCertificate1, DNS=testServer1
CN=TestCertificate2, DNS=testServer2
CN=TestCertificate3, DNS=testServer3
Using a given template and getting a pfx as output?
Thank you

This should be doable, although not by simply uploading a .CSV file and downloading the output. The easiest way would be to use some of the PKI Client Cmdlets in Windows PowerShell. These are PowerShell commands that let you interact with a Microsoft CA from a script or the command line.
The first step, would be to generate a certificate request using the DN information you find in the .CSV file. A great tutorial on generating the CSR can be found here. Once the certificates have been approved on the CA, you can export them using the relevant PKI Client Cmdlet, Export-PfxCertificate via your PowerShell script.
Hope this helps!

Related

How to enable edge extension using powershell script

Post installation of an application it creates a edge extension but by default it is turned off.
Does anyone have solution to enable it using powershell script?
I'm new to powershell to not sure how to and where to start with.
First, test without Powershell.
Add the ID under HKCU\SOFTWARE\Policies\Microsoft\Edge\ExtensionInstallForcelist
Check via edge://extensions
Only manage extensions via either HKCU or HKLM.
More information on Information about extensions.
When this works, you can write the PowerShell code to modify the registry accordingly.
With kind regards,
TheStingPilot

Warning/Error message when asking for file path with handle.exe in powershell

I am trying to get the file path assosciated with microsoft word and for this I use the following PowerShell script, I am also using this https://learn.microsoft.com/en-us/sysinternals/downloads/handle
.\handle.exe -p winword | Select-String File
But instead of getting the paths I am getting this message
Please be aware that, similar to other debug tools that capture “process state” information,
files saved by Sysinternals tools may include personally identifiable or other sensitive
information(such as usernames, passwords, paths to files accessed, and paths to registry
accessed).By using this software, you acknowledge that you are aware of this and take sole
responsibility for any personally identifiable or other sensitive information provided
Microsoft or any other party through your use of the software.
Can anyone please explain how to go around this, thanks.
The problem was that the user agreement was not accepted for the exe file, so I ran just .\handle.exe and it prompted to agree the user agreement after that .\handle.exe -p winword | Select-String File worked

I need a powershell script to use zmodem for file transfer in microsoft IIS.

I want to use powershell to do file transfer, but I have to use zmodem. Is there a powershell script for this? I know no better way to exchange data using php in a Windows/IIS environment.
use rs232xfer to communicate with modem, skip powershell since it has no pre-made zmodem script

run powershell script from anywhere

I am currently working on a powershell script. The objective of this script is to import data from a .csv file from which new users are created if that username does not already exist in the Active Directory.
My question is how can I make this script run from any location so all I have to do is type the name of the script and it will run. I have been able to do this in BASH but can't figure out how to do this in power shell. So far google has been little help.
If it makes any difference i'm using Windows Server 2008 R2
The basic idea is to create Powershell Function which will do the work (or will call other script placed in other location) and put this method to Profile.ps1 script (the script which is loaded everytime you start powershell) - Look at Windows PowerShell Profiles for further details.
The link above for Powershell Function from Tomas Panik is not there anymore so I want to add to the answer here.
Short version:
You can create your function by using Powershell Function. However, this will only last for that session only.
In order for you to use your function regularly, you need to generate/add your function to your own PowerShell profile. Quick tutorials are here and here. Tomas Panik's link to Windows PowerShell Profiles also has very good info.
Update: thanks Hussein Al-Mosawi for reporting the old broken link!

Decrypting encrypted 7zip archieve file using 7zip command-line utility

I have a text file myfile.txt which I encrypt using 7zip GUI Tool. So that it generates an encrypted archive myfile.7z
Now, my question is, how can I decrypt this file using 7za.exe command line tool and not the GUI tool. I need to add this functionality in my code to be able to decrypt files using 7zip command line exe, please tell me what is the command to decrypt this myfile.7z encrypted archive using 7zip command line tool?
well finally i figured it out. Using something like this would work: