A collection of PowerShell modules
bdukes / powershellmodules Goto Github PK
View Code? Open in Web Editor NEWA collection of PowerShell modules
License: Apache License 2.0
A collection of PowerShell modules
License: Apache License 2.0
A collection of PowerShell modules
Ideally, we'd create a single trusted root the first time it's run and then generate certificates from that later on.
In the meantime, can we generate a single certificate for all bindings?
It would be nice if the script had a switch to avoid popping up that dialog going Are you sure you want to move example-file to Recycle Bin?
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?
If there are failures, it just continues and fails the subsequent steps.
@ohine suggested that a switch be added which would get the latest development build of DNN
Perhaps starting with an API request like https://dotnet.visualstudio.com/DNN/_apis/build/builds?api-version=4.1&repositoryId=dnnsoftware/Dnn.Platform&repositoryType=GitHub&branchName=refs%2Fheads%2Fdevelopment&resultFilter=succeeded to find the build artifacts
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 :)
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?
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
When sending -SiteZipPath
a folder path with a trailing slash, all of the files end up in the root with Website
prepended to the file name according to @DanielBolef
The copy routine probably needs to use -LiteralPath
instead of -Path
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.
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?
Not sure where these scripts could live.
One option would be to register them in your profile, associating them with old domains.
Another option is to add an option to specify a Git repo URL, and restore that first, and then look in a well-known location for the restore script.
There are scenarios where a specific database name may be desired. Add a flag to allow overriding the default.
/cc @DanielBolef
What if we didn't have to unzip it ourselves?
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
When restoring a site with multiple domains, it would be nice to be able to specify custom domains.
Or, alternatively, optionally prompt for names for the aliases.
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.
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?
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.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.