Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

SFB project experience-32-batch import PFX certificates for n servers-practical combat (illustration)

2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

# param ([string] $importfile = $(Read-Host-prompt "Please enter a file name"))

# $importedComputers = Import-CSV $importfile

$importedComputers = Import-CSV.\ ComputerNames.csv

Foreach ($importedComputer in $importedComputers)

{

Enter-PSSession-ComputerName $importedComputer.nComputerName

$pfxpath ='C:\ Cert\ iMurray Cloud.com.pfx'

$password01 ='1'

Add-Type-AssemblyName System.Security

$cred01 = ConvertTo-SecureString "1"-AsPlainText-Force

$Username = 'i-x-Cloud\ administrator'

$Password = 'Aa123456'

$pass = ConvertTo-SecureString-AsPlainText $Password-Force

$Cred = New-Object System.Management.Automation.PSCredential-ArgumentList $Username,$pass

Invoke-Command-ComputerName $importedComputer.nComputerName-ScriptBlock {Import-PfxCertificate-Exportable-FilePath'C:\ Cert\ iMurxMuCloud.com.pfx' Cert:\ LocalMachine\ my-Password (ConvertTo-SecureString-String'1'-AsPlainText-Force)}-credential $Cred

}

121-OWAS01.i-x-Cloud.com

122-OWAS02.i-x-Cloud.com

131-mail01.i-x-Cloud.com

132-mail02.i-x-Cloud.com

151-SFBFE01.i-x-Cloud.com

152-SFBFE02.i-x-Cloud.com

153-SFBFE03.i-x-Cloud.com

161-SFBPC01.i-x-Cloud.com

Delete the certificate in the MMC in the above server.

Bulk import certificates.

171-SFBEdge01.i-x-Cloud.com / / Local Import

254-TMG01.i-x-Cloud.com / / Local Import

Import-PfxCertificate-FilePath'C:\ Cert\ iMurxMurCloud.com.pfx' Cert:\ LocalMachine\ my-Password (ConvertTo-SecureString-String'1'-AsPlainText-Force)

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report