This post: Page 51, Post #501
https://excelfox.com/forum/showthrea...ge51#post12776
https://excelfox.com/forum/showthread.php/2408-Windows-10-and-Office-Excel/page51#post12776
( link to last post on page #50 https://excelfox.com/forum/showthrea...ge50#post12775 )
#501 From about here is…. Clearing up some other minor issues, making up a few extra bits, along the way to and before doing my own complete rewrite from scratch
Examining Services
Following on, and in support of, this Forum Post: http://www.eileenslounge.com/viewtop...292266#p292266
In that Post we figured out how to get a text file 3 column list of the Service´s Name , DisplayName and StartType, using a single PowerShell script commandlet.
Get-Service|Select-Object name,displayname,starttype|Format-Table -AutoSize|Out-File -FilePath\ 'C:\Users\acer\Desktop\test.txt' -Width 1000
Here I want to automate that a bit, and get the result somewhere convenient, such as an excel spreadsheet.
I took a look at the text file produced, and based on that did a typical bit of coding to get all text column stuff into a convenient 3 “column” VBA array. It was all standard stuff.
https://excelfox.com/forum/showthrea...ll=1#post15357 https://excelfox.com/forum/showthrea...5356#post15356
Then I got some info for doing that PowerShell commandLet in VBA from Daniel Pineault here https://www.devhut.net/vba-run-powershell-command/
Here is a final macro
https://excelfox.com/forum/showthrea...ll=1#post16368
Example, on a Windows 10 Pro ( Version 20h2 19042.1466 )
Share ‘PowerShell.xls’ https://app.box.com/s/t65uuhic69g64yo4se2xuwopo9ezefa6
Share ‘test.txt’ https://app.box.com/s/lhln63eqcsn8d8zi0gd4yhrn09b3r79c
Share ‘Polak Services.JPG’ https://app.box.com/s/1ydaab5e5518flphg05i36xrp9n34r2q https://i.postimg.cc/65Rdrbvm/Polak-Services.jpg
Edit Some issues…
I messed up with a few things.
_ the display name could be long and go up to the startuptype in the text file, which messed up the manipulation of a line of data from the text file a bit. For now I fiddled that by adding some spaces before the words used for the startuptype. A better solution will probably wait until I fully understand the PowerShell code line
_ There seems to be some strange effects with something somewhere working too slow, too fast or not giving accurate information about if a text file is present. For now that is fiddled with some Waits , Dirs and a Kill. That will do for now, but that need to be looked at again when I understand better wots going on
https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA
https://www.youtube.com/watch?v=SIDLFRkUEIo&lc=UgzTF5vvB67Zbfs9qvx4AaABAg
https://www.youtube.com/watch?v=v_1iqtOnUMg&lc=UgxLtKj969oiIu7zNb94AaABAg
https://www.youtube.com/watch?v=f7xZivqLZxc&lc=Ugxq4JHRza_zx3sz0fx4AaABAg
https://www.youtube.com/watch?v=f7xZivqLZxc&lc=Ugxq4JHRza_zx3sz0fx4AaABAg
https://www.youtube.com/watch?v=f7xZivqLZxc&lc=UgzMCQUIQgrbec400jl4AaABAg
https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=Ugz0Uy2bCSCTb1W-0_14AaABAg
https://www.youtube.com/watch?v=ITI1HaFeq_g&lc=Ugx12mI-a39T41NaZ8F4AaABAg.9iDQqIP56NV9iFD0AkeeJG
https://www.youtube.com/watch?v=vXyMScSbhk4&lc=Ugxa2VYHMWJWXA6QI294AaABAg.9irLgSdeU3r9itU7zdnW Hw
https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=UgzFkoI0n_BxwnwVMcZ4AaABAg
https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=Ugz0Uy2bCSCTb1W-0_14AaABAg.9htChVuaX9W9htG01cKBzX
https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=Ugw6UrV69zpeKvLOeOV4AaABAg.9ht16tzryC49htJ6TpIO XR
https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=UgwMKwGZpDjv7vi7pCx4AaABAg
https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=Ugw6UrV69zpeKvLOeOV4AaABAg.9ht16tzryC49htOKs4jh 3M
https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=UgxVW-am20rQ5GFuJ9F4AaABAg
https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA
Bookmarks