Jump to content


radish

Established Members
  • Posts

    79
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by radish

  1. $a = "C:\Program Files (x86)\Google\Chrome\Application\80.0.3987.149\Installer\setup.exe --uninstall --system-level --verbose-logging" $a -replace '([^\\]*)$' Suppose my condition is like this How do I extract the desired folder name $b = $a -replace '([^\\]*)$' $b = google or $b =chrome or $b = Application
  2. I have a copy item copy script running the output log under windows platform to _SMSTSLogPath. The output log cannot be set successfully. I tried to fail. What should I do? $start = Get-Date Function Import-SMSTSENV{ $tsenv = New-Object -COMObject Microsoft.SMS.TSEnvironment $TSEnv.Value("_SMSTSLogPath") # Create an object to access the task sequence environment #$tsenv = New-Object -ComObject Microsoft.SMS.TSEnvironment # Query the environment to get an existing variable # Set a variable for the task sequence log path $LogPath = $tsenv.Value("_SMSTSLogPath") } #创建日志文件名称 $detetetime = (get-date -format "yyyy年MM月dd日HH时MM分ss秒") $applicationlog = "$detetetime" + "HD Tune Pro v5.70 v2 免注册汉化版单文件.log" $applicationlog #启动powershell控制台日志记录 Start-transcript -path $LogPath\"$applicationlog" #Start-transcript -path $env:temp\"$applicationlog" #<# #> #当前目录 #$scriptPath = split-path -parent $MyInvocation.MyCommand.Definition #获取脚本运行所在目录 $executingScriptDirectory = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent #判断操作系统32位以及64位的Program Files目录Program Files (x86),并根据操作系统位数输出目录 $application = (${env:ProgramFiles(x86)}, ${env:ProgramFiles} -ne $null)[0] #变量赋值自定义文件夹如:在"Program Files 或 (Program Files x86)" 路径里创建一个 "HD Tune Pro v5.70 v2 免注册汉化版单文件" 文件夹 $application2 = "HD Tune Pro v5.70 v2 免注册汉化版单文件" #变量赋值自定义快捷方式桌面快捷方式名称如:HDTunePro_Win8_10 $lnkshortcutname = "HDTunePro_Win8_10" #变量赋值自定义原始程序名称如:HDTunePro_Win8_10.exe $lnkshortcutname2 = "HDTunePro_Win8_10.exe" #变量赋值自定义文件夹路径如:C:\Program Files\HD Tune Pro v5.70 v2 免注册汉化版单文件 $newapplication = "$application\$application2" #变量赋值自定义快捷方式桌面路径如:C:\Program Files\HD Tune Pro v5.70 v2\HDTunePro_Win8_10.exe $lnknewapplication = "$application\$application2\$lnkshortcutname2" #判断文件夹名是否存在并创建文件夹 if(-not (Test-Path $newapplication)){ mkdir "$newapplication" | Out-file $env:temp"\"'$applicationlog' } #判断powershell运行x86 x64版本 $newPSVersion = if ([IntPtr]::Size -eq 8){ 'x64' } else { 'x86' } #查询时间 $datetime = get-date -format "yyyy年MM月dd日HH:MM:ss" #当前区域语言 $LANG = (Get-Culture).Name #查询操作系统名称以及位数 $ws = (Get-WmiObject Win32_OperatingSystem).osarchitecture $OS = (Get-WmiObject -Class Win32_OperatingSystem).Caption #查询IP相关信息 $wmi = Get-WmiObject win32_networkadapterconfiguration -filter "ipenabled = 'true'" $ipwgdef = $wmi.DefaultIPGateway $ipdizhi = (ipconfig|select-string "IPv4"|out-string).Split(":")[-1].trim() -replace(" |`t|\r|\`n ,``") $ipyanma = (ipconfig|select-string "子网掩码"|out-string).Split(":")[-1].trim() -replace(" |`t|\r|\`n ,``") #$ARCHITECTURE = $env:PROCESSOR_ARCHITECTURE #获取PS脚本文件名 $ScriptName = $MyInvocation.MyCommand.Name #系统信息输出显示powershell窗口 Write-Output "" Write-Output "$ScriptName - 当前时间:$datetime" Write-Output "$ScriptName - 用 户名: $env:USERNAME" Write-Output "$ScriptName - 计算机名: $env:COMPUTERNAME" Write-Output "$ScriptName - IP 地址: $ipdizhi" Write-Output "$ScriptName - 网 关: $ipwgdef" Write-Output "$ScriptName - IP 掩码: $ipyanma" Write-Output "$ScriptName - 当前域名: $env:USERDNSDOMAIN" Write-Output "$ScriptName - 源 路径: $executingScriptDirectory" Write-Output "$ScriptName - 目的路径:$newapplication" Write-Output "$ScriptName - 操作系统: $OS $ws " Write-Output "$ScriptName - 当前语言: $LANG " Write-Output "$ScriptName - PSVersion:$newPSVersion $($PSVersionTable.PSVersion.tostring())" #开始复制文件,并排除复制指定Copy20200315.ps1脚本文件 Get-ChildItem -Path "$executingScriptDirectory" -Exclude "*.ps1" | Copy-Item -Recurse -Destination "$newapplication" #(Get-ChildItem -Path "$executingScriptDirectory" -Exclude "*.ps1" | Copy-Item -Recurse -Destination "$newapplication" -verbose 4>&1).Message #开始创建快捷键图标步骤 $shortcut_name = "$lnkshortcutname" #快捷键图标名称 $shortcut_target = "$lnknewapplication" #设置快捷键桌面图标路径 $sh = new-object -com "WScript.Shell" $p = $sh.SpecialFolders.item("AllUsersDesktop") #设置到 All\Users\Desktop\ 桌面路径 $lnk = $sh.CreateShortcut( (join-path $p $shortcut_name) + ".lnk" ) $lnk.TargetPath = $shortcut_target $lnk.IconLocation = "$lnknewapplication" #设置快捷键桌面图标ICO $lnk.Save() $end = Get-Date #脚本总运行时间 Write-Host ('Total Runtime: ' + ($end - $start).TotalSeconds)秒 Start-Sleep -s 60 #停止powershell控制台日志 Stop-transcript
  3. Hi friend, I do n’t see the icon option when I open Orca software. Why is this?
  4. I remember this error was some system patches released in March or May last year, updated and then caused this error. Later, a fix patch released by Microsoft around October resolved the sccm pxe boot error. In addition, does the boot integrate the VMXNET3 network card driver? The TFTP accelerated startup mode is modified to try to adjust parameters according to the respective corporate network environment.
  5. Thank you very much for anyweb. I tried to write a simple ps script to execute the exe to solve the software center status failure problem. I am sorry that I still have a bad command of the powershell script. Please tell me how to hide the powershell window. PS:\#Start-Process .\DingTalk_v4.7.29.19.exe -NoNewWindow -Wait
  6. I know that it is possible to distribute and repackage software by application (after all, repackaging software is also a laborious task. Not all system administrators know how to operate repackaging software, especially some complex installation packages) Solve the successful installation of this software and customize the detection of successful installation conditions. What I want to know is when distributing software through packages, is there any way to solve it, or is there any way to set the corresponding attributes when the software is released by the package? When the system detects this information, it means that the installation has been successful. For example, although this dingtalk installation was successful, the returned result is a 1223 code causing the software center status to indicate that the installation failed. You can fill in the corresponding information attribute values through the attribute information here, such as General or Reporting, such as comparing the information generated from the software installation and registration to indicate the conditions for successful installation, or how to customize the MIF file yourself. I have been puzzled for a long time. How to solve this problem when using software to distribute software? The software has been successfully installed. The software center status is detected as a failure indicator. Can anyone help? Thank you very much.
  7. Support for the Application Catalog role has ended since version 1910 Since version 1806 Specify the visibility of the Application Catalog website link on the Installation Status tab in the Software Center. For more information, see Software Center Client Settings. You no longer need the Application Catalog role to display the applications available to users in Software Center. This change helps reduce the server infrastructure required to deliver applications to users. Software Center now relies on management points to get this information, helping them scale better by assigning larger environments to boundary groups Refer to the official Microsoft documentation
  8. About automatic computer naming when SCCM deploys computers I have a powershell script that is used to automatically name the computer when the OS is deployed. But when a known computer is deployed, skip this based on task variables or how to satisfy the name of a known computer Script execution. Name is win7x64-test 101 About automatic computer naming when SCCM deploys computers I have a Powershell script for automatically naming computers when OS is deployed. However, when deploying a known computer, depending on the task variable or how the name of the known computer is satisfied, the script will be skipped and not executed. For example, the known computer name is win7x64-test101
  9. Yes, I know win7 will stop updating, I'm testing. This is my calculation name named script. How to use conditional skip script execution when the computer is known to be deployed on the OS, use this ps script to automatically name the computer only if the computer is unknown
  10. Yes, I know win7 will stop updating, I'm testing. This is my calculation name named script. In the case where the OS deployment computer is known, if you use conditions to skip this script execution, use this ps script to automatically name the computer only if the computer is unknown
  11. 关于SCCM部署计算机时候自动计算机命名问题 我有个powershell脚本是用来自动部署OS时给计算机自动命名规则的, 但是在已知计算机部署时,根据任务变量或如何满足已知计算机的名字跳过这个不 脚本执行。的名字为win7x64-测试101 关于SCCM部署计算机时的自动计算机命名 我有一个Powershell脚本,用于在部署OS时自动命名计算机。 但是,在部署已知计算机时,根据任务变量或如何满足已知计算机的名称,将跳过该脚本并不执行此脚本。 例如,已知的计算机名称是win7x64-test101 About automatic computer naming when SCCM deploys computers I have a powershell script that is used to automatically name the computer when the OS is deployed. But when a known computer is deployed, skip this based on task variables or how to satisfy the name of a known computer Script execution. Name is win7x64-test 101 About automatic computer naming when SCCM deploys computers I have a Powershell script for automatically naming computers when OS is deployed. However, when deploying a known computer, depending on the task variable or how the name of the known computer is satisfied, the script will be skipped and not executed. For example, the known computer name is win7x64-test101 客户端GUID = GUID:50026e2f-8972-4596-bd14-6b395b710c89,Netbios名称= WIN7X64-TEST101,状态=已知 TL TIME OSDComputerName.ps1 win7x64.zip smsts.log
  12. 在wsus和SCCM 看到的软件补丁不一致 该如何解决,有的补丁没有过期或者被取代, 在SCCM看不到而在WSUS里面能看到,也就是说没有同步到SCCM里面去。 The software patches seen in wsus and SCCM are inconsistent. How to solve them? Some patches have not expired or been replaced. They can not be seen in SCCM but can be seen in WSUS, that is, they are not synchronized to SCCM.
  13. 你好,请问我在SCCM 搜索KB4054518补丁,在WSUS控制台里面能看到,在SCCM里面看不到这KB4054518补丁,我该如何设置操作才能在SCCM看到这个KB4054518补丁呢?还是说取代 和过期的补丁是没办法同步到SCCM? Hello, may I search for the KB4054518 patch in SCCM, which can be seen in the WSUS console. I can't see this KB4054518 patch in SCCM. How can I set up the operation to see this KB4054518 patch in SCCM? Or is there a way to replace and expire the patch to sync to SCCM?
  14. Yes, it’s right upstairs, click on the action he said to check the error message. yes,楼上说的没错,按他说的操作点击进去查查错误信息
  15. Hello, can you solve your problem? I also encountered the same problem.
  16. [ChangeComputerName] WebService=http://sccm/risnaming/service1.asmx/GenerateName Replace it with this? [ChangeComputerName] WebService=http://sccm/OnevinnWS/sccm.asmx/GenerateName
  17. Hey, please feel free to help me analyze it. I really can't help it. Thank you. Also, does the CustomSettings.ini configuration need to be set?
  18. MaikKoster.Deployment.Webservice_v7_3.zip This Maik Koster 7.3 is hard to find and share with people in need.
  19. Thank you, I have solved the above problem. However, when reinstalling the system, select the english language and shut down the prompt. After booting into the system, nothing has changed? 201908060117Logs.zip
  20. failed to run the action create backup network scanstate folder incorrect function error 0000001 soruce windows Seems to be a problem with the network road, can't access? scanstate.log scanstateprogress.log smsts.log
  21. 感谢你的帮助, 不过又遇见新问题了,再USMT进行备份时候报错了 Thank you for your help, but have encountered new problems, and then USMT made a backup error. 是否我的utms没有这个配置文件造成的故障,默认usmt的配置文件没办法备份吗 Is my utms not caused by this configuration file, the default usmt configuration file can not be backed up? MigLog.xml scanstate.log scanstateprogress.log BDD.log checkcomputername.log Get-Driveletter.log GetComputerName.log GetResourceID.log IsComputerKnown.log IsVolumeEncrypted_ENCPART.log shutdownonerror.log sitecode.log smsts-20190806-120009.log smsts.log zticopylogs.log ZTIGather.log ZTISCCM.log
  22. What is going on, how to fix it? ZTISCCM.log 201908043SMSTSLog.zip BDD.log smsts.log zticopylogs.log ZTISCCM.log
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.