GithubHelp home page GithubHelp logo

powershellmodules's Introduction

powershellmodules's People

Contributors

bdukes avatar engage-chancock avatar kevinholtkamp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

powershellmodules's Issues

Remove-ItemSafely on some computers asks confirmation

Hi,

I have a question regarding 'recycle' 1.5.0.
In this version I noticed that my script does not give me a 'are you sure to send to recycle bin' dialog, but my colleague does.
I do not use the '-conform' option, but still my colleague gets a dialog.

Why is this happening in 1.5.0?

does not remove dir/files if name has [] or ()

Hello @bdukes
I encountered a problem, where the directory containing [ ] did not get removed, also it gave no error message. (i.e. D:\test[1])
When trying to remove files in the given folder, also nothing happens, and no errors.

However, if the name contains ( ) that gives out an error:
;D:>powershell "Remove-ItemSafely D:\test(1)"
;Remove-ItemSafely` : A positional parameter cannot be found that accepts argument '1'.
;At line:1 char:1
;+ Remove-ItemSafely D:\test(1)
;+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
; + CategoryInfo : InvalidArgument: (:) [Remove-ItemSafely], ParameterBindingException
; + FullyQualifiedErrorId : PositionalParameterNotFound,Remove-ItemSafely

I have tried containing the argument in different ways with either ' or " but nothing seems to work...

Hope there is a workaround for this issue :)

Recycle - Force option shouldn't delete permanently

Remove-ItemSafely -Force becomes a misnomer if the -Force switch makes the command unsafe (delete permanently, without a confirmation prompt). For deleting permanently users ought to use Remove-Item.

Maybe a change of name of the cmdlet?

Remove-ItemSafely -LiteralPath does not work w/ special characters (brackets, backticks,...)

This is the issue to my Pull request #1 .

Hello! Thanks for your effort with these nice modules. However, I encountered an error:

    $foo = @(Get-ChildItem -File | Select-Object -ExpandProperty FullName)
    $foo | ForEach-Object {
        Remove-ItemSafely -LiteralPath $_
    }

Does not work if files have backticks, brackets, or spaces in their name:

> Get-Item : Cannot find path
> At C:\Program Files\WindowsPowerShell\Modules\Recycle\1.0.2\Recycle.psm1:93 char:13
> +    $item = Get-Item $Path

Remove-ItemSafely halts and asks if you want to permanently delete a file if you're holding shift

I ran a powershell command in a terminal that looped over many files, processing each to create a new file and then deleting the original file with Remove-ItemSafely. I minimized the terminal and did other things while the command ran. I noticed multiple times that if I happened to be holding shift while the Remove-ItemSafely call happened, the command would halt there and Windows would pop open a modal asking if I wanted to instead permanently delete the file. This would either interrupt my typing, or sometimes the modal would appear in the background and I wouldn't notice it until later, leaving my script halted until I addressed the modal.

use in pipe

I use

get-childitem | where-object { $_.Name -match 'myregex' } | remove-item

to delete files, so I installed the Recycle module hoping I could just replace remove-item with Remove-ItemSafely

but I got the following error:

Get-Item : Impossibile associare l'argomento al parametro 'Path' perché è null.
In C:\Program Files\WindowsPowerShell\Modules\Recycle\1.2.0\Recycle.psm1:59 car:47
+ ...                 $items = @(Get-Item -Path:$PSBoundParameters['Path'])
+                                               ~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Get-Item], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.GetItemCommand

Is it an issue or simply I cannot use Remove-ItemSafely in a pipe?

Recycle hidden files

Looks like I can't add -Force flag to the Remove-ItemSafely to move hidden files to recycle bin like Get-ChildItem 'somewere' -Force | Remove-ItemSafely -Force.
Without it, on hidden files, I get messages that the item was not found.

get-item : Can't find item C:\Users\root\ (1).bash_profile.
Line:1 char:1
+ get-item 'C:\Users\root\ (1).bash_profile'
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\Users\root\ (1).bash_profile:String) [Get-Item], IOException
    + FullyQualifiedErrorId : ItemNotFound,Microsoft.PowerShell.Commands.GetItemCommand

Making -caption parameter non-mandatory in Read-Choice

For me personally, it would be enough to have one message/caption parameter, however since caption is a mandatory parameter, you cannot use an empty string. or omit it

Removing the mandatory aspect would help when using named parameters, however you would still have to supply an empty string when using positional parameters.

The solution for that would be to move the caption parameter to the end (or at least after the message parameter), however this would break backwards compatibility.

Recycle on Linux

Just wondering, as their aren't any documented restrictions on the operating system for the use of Recyle. Does the use of New-Object -ComObject "Shell.Application" introduce a dependency on Microsoft Windows?

Support zips that include development files in Restore-DNNSite

When restoring the site zip, if it contains a single directory, we assume that directory includes the DNN site. Otherwise, we assume that the contents of the zip are the site contents. In cases where there are development files (e.g. .git, .gitignore, package.json, etc.), it would be great if we can handle this scenario, and fail fast if we can't handle it.

Update Fattmerchant references to Stax

DNN-Restore prints this error because it is looking for SQL columns that have been renamed:

Invoke-Sqlcmd : Invalid column name 'MerchantRegistrationStatusId'.
Invalid column name 'FattmerchantMerchantId'.
Invalid column name 'FattmerchantApiKey'.
Invalid column name 'FattmerchantPaymentsToken'.
 Msg 207, Level 16, State 1, Procedure , Line 1.

Need to target the new column names.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.