0
ほとんどのテストで検証スクリプトを作成し、ツールの助けを借りてスクリプトを各マシンでローカルに実行しました。しかし、以下のスクリプトのみを実行すると、呼び出されるドメインのユーザー名とパスワードが正常に生成されます。Powershellスクリプトに必要なドメインユーザー名とパスワードを呼び出す
は、誰も私には、スクリプトの下に起動するためにユーザ名とパスワードを追加することを助けることができます(例:ユーザ名:OIM \テスト、パスワード:123 @テスト)
if (($ImageName -like "*devel*") -or ($ImageName -like "*hosted*"))
{
#$ADE1 = Invoke-Expression ('C:\ade\bin\ade.exe | select-string -pattern "begintrans"') | out-string ; $ADE = $ADE1.trim().split("")[1]
Invoke-Expression ('C:\ade\bin\ade.exe | select-string -pattern "begintrans"') > C:\Temp\ade_check.txt
$ADE1 = Get-Content C:\Temp\ade_check.txt | Select-String "begintrans" | out-string ; $ADE = $ADE1.trim().split(" ")[1]
if ($ADE -eq "begintrans")
{
$ADE = "ADE Installation Success"
Add-Content $report "<tr>"
Add-Content $report "<td bgcolor= 'White' height='30' align=center><B>17</B></td>"
Add-Content $report "<td bgcolor= 'White' height='30' align=left><B>ADE</B></td>"
Add-Content $report "<td bgcolor= 'Aquamarine' height='30' align=left><B>$ADE</B></td>"
Add-Content $report "</tr>"
echo "ADE = ADE Installation Success"
}
if ($ADE -eq $null){
$ADE = "ADE Installation Failed"
Add-Content $report "<tr>"
Add-Content $report "<td bgcolor= 'White' height='30' align=center><B>17</B></td>"
Add-Content $report "<td bgcolor= 'White' height='30' align=left><B>ADE</B></td>"
Add-Content $report "<td bgcolor= 'red' height='30' align=left><B>$ADE</B></td>"
Add-Content $report "</tr>"
echo "ADE = ADE Installation Failed"
}
}
else
{
if (($ImageName -like "*simple*") -or ($ImageName -like "*BareOS*")){
$ADE = "BareOS, ADE Not Installed"
Add-Content $report "<tr>"
Add-Content $report "<td bgcolor= 'White' height='30' align=center><B>17</B></td>"
Add-Content $report "<td bgcolor= 'White' height='30' align=left><B>ADE</B></td>"
Add-Content $report "<td bgcolor= 'Yellow' height='30' align=left><B>$ADE</B></td>"
Add-Content $report "</tr>"
echo "ADE = BareOS, ADE Not Installed"
}
}
ありがとうございました。それは完璧に動作します – SNair
@SNair、あなたは答えとして私の答えをマークすることがありますので、それは同様のソリューションを探している人を助けるでしょう。 :-) –