Category : powershell

I am trying to import data from a csv file, and link the content with Powershell System.IO.StreamReader Read method. But here is the error message I get in my console. I don’t understand why, it doesn’t handle the Extract_AGRe_TWS_ALL_20200925-02.csv file. function Update-ArchiWithImportData{ # Import the contents of the Extract_AGRe_TWS_ALL_20200925-01.csv and Create ElementCsv object $ElementCsv=Get-Content "$env:USERPROFILEDesktopArchiExtract_AGRe_TWS_ALL_20200925-xxxx.csv" ..

Read more

I have been provided with this Windows registry check that should tell if the local security policies are configured to prohibit the execution of problematic file types: VBS, CPL and SCR. $data = @() $keys = Get-ChildItem -Path ‘HKLM:SOFTWAREPoliciesMicrosoftWindowsSafercodeidentifiers{$content}Paths’ foreach ($key in $keys) { $data += (Get-ItemProperty -Path Registry::$key).ItemData } Now $data contains a big ..

Read more

I have a task to track the readiness of Windows Servers after installing updates. In a simple case, the steps for installing updates are as follows: Manual start of update installation Manual server reboot Automatic completion of the installation of updates. Lock screen But sometimes the scenario is more complex: Manual start of update installation ..

Read more

Testing the functions of wuapi.dll I noticed that some updates are not listed in the results (obviously because they are visible from the update manager). Code used(c#): public ISearchResult CheckUpdates() { IUpdateSearcher uSearcher = uSession.CreateUpdateSearcher(); uSearcher.Online = true; ISearchResult uResult = uSearcher.Search("Type=’Software’ and IsInstalled=0"); return uResult; } Also tried all possible filters combination. Update Manager ..

Read more