Questions tagged «mdt»

2
有没有办法遍历Windows 8 Apps并将其全部删除?
Windows应用程序很烦人,我想将其删除。一直在玩Powershell和脚本,我想知道是否有办法让Powershell遍历所有应用程序并将其删除。 # List of Applications that will be removed $AppsList = "Microsoft.BingTravel","Microsoft.WindowsAlarms","Microsoft.Reader",` "Microsoft.WindowsScan","Microsoft.WindowsSoundRecorder","Microsoft.SkypeApp","Microsoft.BingFoodAndDrink","Microsoft.BingMaps",` "Microsoft.HelpAndTips","Microsoft.BingFinance","Microsoft.ZuneMusic","Microsoft.Reader","Microsoft.BingNews","Microsoft.AkypeApp",` "Microsoft.ZuneVideo","Microsoft.BingTravel","Microsoft.BingSports","Microsoft.BingWeather","Microsoft.BingHealthAndFitness",` "Microsoft.Media.PlayReadyClient.2","Microsoft.XboxLIVEGames","Microsoft.WindowsReadingList","Microsoft.WindowsAlarms" ForEach ($App in $AppsList) { $Packages = Get-AppxPackage | Where-Object {$_.Name -eq $App} if ($Packages -ne $null) { foreach ($Package in $Packages) { Remove-AppxPackage -package $Package.PackageFullName } } $ProvisionedPackage = Get-AppxProvisionedPackage -online | Where-Object …

1
在MDT任务序列中导入Powershell AD模块
我编写了这个简短的powershell脚本,将计算机重命名为MDT任务序列的一部分: Import-Module ActiveDirectory $AdminUsername = 'domain.com\administrator' $AdminPassword = 'password' | ConvertTo-SecureString -asPlainText -Force $cred = New-Object System.Management.Automation.PSCredential -ArgumentList $AdminUsername, $AdminPassword $Domain = Get-ADDomainController –DomainName domain.com -Discover -NextClosestSite $Site = $Domain.Site $DomainComputer = Get-WmiObject Win32_BIOS $Serial = $DomainComputer.SerialNumber $Computername = $Site + "-" + $Serial Rename-Computer -NewName $Computername -DomainCredential $cred MDT运行此任务时,它将以本地管理员身份运行。尝试加载AD模块时出现以下错误。 …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.