I am working on a app that does not always cleanly remove reg keys. I started playing with remove-registrykey -key.... -name... etc. Its really, really close to remove-item -path hklm....
the question is this;
Can I have a line like so and will it work?
Remove-registryKey -Key "HKCR:\CLSID{F2EFC293-6D96-43A5-B043-BC80F000AD7A}" -ErrorAction SilentlyContinue
The doc talks about continueonerror but not how to properly use it. Also I looked at the appdeploy main ps1 file and see that there are references to recurse in it as well. Will recurse be used always or is that another item I need to add?
Like so;
Remove-registryKey -Key "HKCR:\CLSID{F2EFC293-6D96-43A5-B043-BC80F000AD7A}" -ErrorAction SilentlyContinue -recurse
thanks in advance.
I am using 3.2.0 and powershell 4.0 with various OS versions via CM12 r2 CU3.
the question is this;
Can I have a line like so and will it work?
Remove-registryKey -Key "HKCR:\CLSID{F2EFC293-6D96-43A5-B043-BC80F000AD7A}" -ErrorAction SilentlyContinue
The doc talks about continueonerror but not how to properly use it. Also I looked at the appdeploy main ps1 file and see that there are references to recurse in it as well. Will recurse be used always or is that another item I need to add?
Like so;
Remove-registryKey -Key "HKCR:\CLSID{F2EFC293-6D96-43A5-B043-BC80F000AD7A}" -ErrorAction SilentlyContinue -recurse
thanks in advance.
I am using 3.2.0 and powershell 4.0 with various OS versions via CM12 r2 CU3.